| 1 |
====================================================================== |
| 2 |
|
| 3 |
INSTALLATION |
| 4 |
|
| 5 |
0) |
| 6 |
Maybe runawk is already packaged for your platform. See PACKAGES |
| 7 |
section below and your system's packages management tools. |
| 8 |
|
| 9 |
1) |
| 10 |
We need bmake (portable version of NetBSD make) for building runawk. |
| 11 |
I'd recommend to use latest stable version of bmake. |
| 12 |
|
| 13 |
http://crufty.net/help/sjg/bmake.html |
| 14 |
http://freshmeat.net/projects/bmake/ |
| 15 |
|
| 16 |
<<<***!!! GNU make IS NOT GOOD !!!***>>> |
| 17 |
|
| 18 |
2) |
| 19 |
We also need mk-configure >= 0.21.0. |
| 20 |
|
| 21 |
http://sourceforge.net/projects/mk-configure/ |
| 22 |
|
| 23 |
3) Uncompress tarball you've downloaded like this |
| 24 |
gzip -dc runawk-X-Y-Z.tar.gz | tar -xf- |
| 25 |
|
| 26 |
2) cd runawk-X.Y.Z |
| 27 |
|
| 28 |
3) mkcmake |
| 29 |
|
| 30 |
4) mkcmake test |
| 31 |
If this step fails on your system, PLEASE LET ME KNOW. |
| 32 |
|
| 33 |
5) mkcmake install |
| 34 |
|
| 35 |
There is a lot of Makefile variables that can be changed during |
| 36 |
build and installation. |
| 37 |
|
| 38 |
MODULESDIR - directory where modules are installed to [${PREFIX}/share/runawk] |
| 39 |
AWK_PROG - path to the default AWK interpreter |
| 40 |
STDIN_FILENAME - path to stdin device file [-] |
| 41 |
|
| 42 |
PREFIX - where runawk(1) is installed to |
| 43 |
MANDIR - root directory for manual pages |
| 44 |
DESTDIR - fake root for installation |
| 45 |
CPPFLAGS |
| 46 |
CFLAGS |
| 47 |
LDFLAGS |
| 48 |
LDADD |
| 49 |
... |
| 50 |
|
| 51 |
See mk-configure(7) for details. |
| 52 |
|
| 53 |
6) RunAWK distribution consists of the following subprojects: |
| 54 |
- runawk -- runawk executable |
| 55 |
- modules -- modules written in .awk |
| 56 |
- doc -- README, COPYRIGHT, NEW, TODO files |
| 57 |
- examples -- samples of use for runawk and its modules |
| 58 |
- a_getopt -- alt_getopt(1) and alt_getopt.sh |
| 59 |
|
| 60 |
By default only "runawk", "modules" and "a_getopt" are built and installed. |
| 61 |
However you can easily build and install any subproject like the following |
| 62 |
|
| 63 |
mkcmake all-examples install-examples |
| 64 |
mkcmake all-doc install-doc |
| 65 |
etc. |
| 66 |
|
| 67 |
See mk-configure(7) and ./Makefile for details. |
| 68 |
|
| 69 |
You can also set subprojects you need in SUBPRJ_DFLT variable. |
| 70 |
|
| 71 |
export SUBPRJ_DFLT='runawk modules examples a_getopt doc' |
| 72 |
mkcmake all install |
| 73 |
|
| 74 |
7) Non-standard variable you may want to change. |
| 75 |
EGDIR - directiory where examples/ will be installed to |
| 76 |
($PREFIX/share/doc/runawk/examples) |
| 77 |
MODULESDIR - directory where modules/ will be installed to |
| 78 |
($PREFIX/share/runawk) |
| 79 |
DOCDIR - directory where doc/ will be installed to |
| 80 |
($PREFIX/share/doc/runawk) |
| 81 |
AWK_PROG - path to the default AWK interpreter |
| 82 |
(/usr/bin/awk) |
| 83 |
STDIN_FILENAME - path to stdin device file |
| 84 |
(-) |
| 85 |
|
| 86 |
------------------------------ |
| 87 |
Examples of building and installing: |
| 88 |
|
| 89 |
0) |
| 90 |
mkcmake all install |
| 91 |
|
| 92 |
1) |
| 93 |
export PREFIX=/usr SYSCONFDIR=/etc; \ |
| 94 |
mkcmake all install DESTDIR=/tmp/fakeroot |
| 95 |
|
| 96 |
2) |
| 97 |
export PREFIX=/usr SYSCONFDIR=/etc |
| 98 |
export SUBPRJ_DFLT='runawk modules a_getopt examples doc' |
| 99 |
export AWK_PROG=/bin/awk |
| 100 |
mkcmake all install DESTDIR=/tmp/fakeroot |
| 101 |
|
| 102 |
3) |
| 103 |
env CC='icc -no-gcc' \ |
| 104 |
PREFIX=/home/cheusov/local \ |
| 105 |
CPPFLAGS=-I/usr/pkg/include \ |
| 106 |
LDFLAGS='-L/usr/pkg/lib -Wl,-rpath -Wl,/usr/pkg/lib' \ |
| 107 |
LDADD=-lextralib \ |
| 108 |
CFLAGS='-O2 -fomit-frame-pointers' \ |
| 109 |
mkcmake -s all install |