1*69606e3fSchristosPort of GNU make to OS/2. 2*69606e3fSchristos 3*69606e3fSchristosFeatures of GNU make that do not work under OS/2: 4*69606e3fSchristos - remote job execution 5*69606e3fSchristos - dynamic load balancing 6*69606e3fSchristos 7*69606e3fSchristos 8*69606e3fSchristosSpecial features of the OS/2 version: 9*69606e3fSchristos 10*69606e3fSchristosDue to the fact that some people might want to use sh syntax in 11*69606e3fSchristosMakefiles while others might want to use OS/2's native shell cmd.exe, 12*69606e3fSchristosGNU make supports both shell types. The following list defines the order 13*69606e3fSchristosthat is used to determine the shell: 14*69606e3fSchristos 15*69606e3fSchristos 1. The shell specified by the environment variable MAKESHELL. 16*69606e3fSchristos 2. The shell specified by the SHELL variable within a Makefile. As on 17*69606e3fSchristos Unix, SHELL is NOT taken from the environment. 18*69606e3fSchristos 3. The shell specified by the COMSPEC environment variable. 19*69606e3fSchristos 4. The shell specified by the OS2_SHELL environment variable. 20*69606e3fSchristos 5. If none of the above is defined /bin/sh is used as default. This 21*69606e3fSchristos happens e.g. in the make testsuite. 22*69606e3fSchristos 23*69606e3fSchristosNote: - Points 3 and 4 can be turned off at compile time by adding 24*69606e3fSchristos -DNO_CMD_DEFAULT to the CPPFLAGS. 25*69606e3fSchristos - DOS support is not tested for EMX and therefore might not work. 26*69606e3fSchristos - The UNIXROOT environment variable is supported to find /bin/sh 27*69606e3fSchristos if it is not on the current drive. 28*69606e3fSchristos 29*69606e3fSchristos 30*69606e3fSchristosCOMPILATION OF GNU MAKE FOR OS/2: 31*69606e3fSchristos 32*69606e3fSchristosI. ***** SPECIAL OPTIONS ***** 33*69606e3fSchristos 34*69606e3fSchristos - At compile time you can turn off that cmd is used as default shell 35*69606e3fSchristos (but only /bin/sh). Simply set CPPFLAGS="-DNO_CMD_DEFAULT" and make 36*69606e3fSchristos will not use cmd unless you cause it to do so by setting MAKESHELL to 37*69606e3fSchristos cmd or by specifying SHELL=cmd in your Makefile. 38*69606e3fSchristos 39*69606e3fSchristos - At compile time you can set CPPFLAGS="-DNO_CHDIR2" to turn off that 40*69606e3fSchristos GNU make prints drive letters. This is necessary if you want to run 41*69606e3fSchristos the testsuite. 42*69606e3fSchristos 43*69606e3fSchristos 44*69606e3fSchristosII. ***** REQUIREMENTS FOR THE COMPILATION ***** 45*69606e3fSchristos 46*69606e3fSchristosA standard Unix like build environment: 47*69606e3fSchristos 48*69606e3fSchristos - sh compatible shell (ksh, bash, ash, but tested only with pdksh 5.2.14 49*69606e3fSchristos release 2) 50*69606e3fSchristos If you use pdksh it is recommended to update to 5.2.14 release 2. Older 51*69606e3fSchristos versions may not work! You can get this version at 52*69606e3fSchristos http://www.math.ohio-state.edu/~ilya/software/os2/pdksh-5.2.14-bin-2.zip 53*69606e3fSchristos - GNU file utilities (make sure that install.exe from the file utilities 54*69606e3fSchristos is in front of your PATH before X:\OS2\INSTALL\INSTALL.EXE. I recommend 55*69606e3fSchristos also to change the filename to ginstall.exe instead of install.exe 56*69606e3fSchristos to avoid confusion with X:\OS2\INSTALL\INSTALL.EXE) 57*69606e3fSchristos - GNU shell utilities 58*69606e3fSchristos - GNU text utilities 59*69606e3fSchristos - gawk 60*69606e3fSchristos - grep 61*69606e3fSchristos - sed 62*69606e3fSchristos - GNU make 3.79.1 (special OS/2 patched version) or higher 63*69606e3fSchristos - perl 5.005 or higher 64*69606e3fSchristos - GNU texinfo (you can use 3.1 (gnuinfo.zip), but I recommend 4.0) 65*69606e3fSchristos 66*69606e3fSchristosIf you want to recreate the configuration files (developers only!) 67*69606e3fSchristosyou need also: GNU m4 1.4, autoconf 2.59, automake 1.8.2 (or compatible) 68*69606e3fSchristos 69*69606e3fSchristos 70*69606e3fSchristosIII. ***** COMPILATION AND INSTALLATION ***** 71*69606e3fSchristos 72*69606e3fSchristos a) ** Developers only - Everyone else should skip this section ** 73*69606e3fSchristos To recreate the configuration files use: 74*69606e3fSchristos 75*69606e3fSchristos export EMXSHELL=ksh 76*69606e3fSchristos aclocal -I config 77*69606e3fSchristos automake 78*69606e3fSchristos autoconf 79*69606e3fSchristos autoheader 80*69606e3fSchristos 81*69606e3fSchristos 82*69606e3fSchristosb) Installation into x:/usr 83*69606e3fSchristos 84*69606e3fSchristos Note: Although it is possible to compile make using "./configure", 85*69606e3fSchristos "make", "make install" this is not recommended. In particular, 86*69606e3fSchristos you must ALWAYS use LDFLAGS="-Zstack 0x8000" because the default 87*69606e3fSchristos stack size is far to small and make will not work properly! 88*69606e3fSchristos 89*69606e3fSchristosRecommended environment variables and installation options: 90*69606e3fSchristos 91*69606e3fSchristos export ac_executable_extensions=".exe" 92*69606e3fSchristos export CPPFLAGS="-D__ST_MT_ERRNO__" 93*69606e3fSchristos export CFLAGS="-O2 -Zomf -Zmt" 94*69606e3fSchristos export LDFLAGS="-Zcrtdll -Zlinker /exepack:2 -Zlinker /pm:vio -Zstack 0x8000" 95*69606e3fSchristos export RANLIB="echo" 96*69606e3fSchristos ./configure --prefix=x:/usr --infodir=x:/usr/share/info --mandir=x:/usr/share/man --without-included-gettext 97*69606e3fSchristos make AR=emxomfar 98*69606e3fSchristos make install 99*69606e3fSchristos 100*69606e3fSchristosNote: If you use gcc 2.9.x or higher I recommend to set also LIBS="-lgcc" 101*69606e3fSchristos 102*69606e3fSchristosNote: You can add -DNO_CMD_DEFAULT and -DNO_CHDIR2 to CPPFLAGS. 103*69606e3fSchristos See section I. for details. 104*69606e3fSchristos 105*69606e3fSchristos 106*69606e3fSchristosIV. ***** NLS support ***** 107*69606e3fSchristos 108*69606e3fSchristosGNU make has NLS (National Language Support), with the following 109*69606e3fSchristoscaveats: 110*69606e3fSchristos 111*69606e3fSchristos a) It will only work with GNU gettext, and 112*69606e3fSchristos b) GNU gettext support is not included in the GNU make package. 113*69606e3fSchristos 114*69606e3fSchristosTherefore, if you wish to enable the internationalization features of 115*69606e3fSchristosGNU make you must install GNU gettext on your system before configuring 116*69606e3fSchristosGNU make. 117*69606e3fSchristos 118*69606e3fSchristosYou can choose the languages to be installed. To install support for 119*69606e3fSchristosEnglish, German and French only enter: 120*69606e3fSchristos 121*69606e3fSchristos export LINGUAS="en de fr" 122*69606e3fSchristos 123*69606e3fSchristosIf you don't specify LINGUAS all languages are installed. 124*69606e3fSchristos 125*69606e3fSchristosIf you don't want NLS support (English only) use the option 126*69606e3fSchristos--disable-nls for the configure script. Note if GNU gettext is not 127*69606e3fSchristosinstalled then NLS will not be enabled regardless of this flag. 128*69606e3fSchristos 129*69606e3fSchristos 130*69606e3fSchristosV. ***** Running the make test suite ***** 131*69606e3fSchristos 132*69606e3fSchristosTo run the included make test suite you have to set 133*69606e3fSchristos 134*69606e3fSchristos CPPFLAGS="-D__ST_MT_ERRNO__ -DNO_CMD_DEFAULT -DNO_CHDIR2" 135*69606e3fSchristos 136*69606e3fSchristosbefore you compile make. This is due to some restrictions of the 137*69606e3fSchristostestsuite itself. -DNO_CMD_DEFAULT causes make to use /bin/sh as default 138*69606e3fSchristosshell in every case. Normally you could simply set MAKESHELL="/bin/sh" 139*69606e3fSchristosto do this but the testsuite ignores the environment. -DNO_CHDIR2 causes 140*69606e3fSchristosmake not to use drive letters for directory names (i.e. _chdir2() and 141*69606e3fSchristos_getcwd2() are NOT used). The testsuite interpretes the whole output of 142*69606e3fSchristosmake, especially statements like make[1]: Entering directory 143*69606e3fSchristos`C:/somewhere/make-3.79.1/tests' where the testsuite does not expect the 144*69606e3fSchristosdrive letter. This would be interpreted as an error even if there is 145*69606e3fSchristosnone. 146*69606e3fSchristos 147*69606e3fSchristosTo run the testsuite do the following: 148*69606e3fSchristos 149*69606e3fSchristos export CPPFLAGS="-D__ST_MT_ERRNO__ -DNO_CMD_DEFAULT -DNO_CHDIR2" 150*69606e3fSchristos export CFLAGS="-Zomf -O2 -Zmt" 151*69606e3fSchristos export LDFLAGS="-Zcrtdll -s -Zlinker /exepack:2 -Zlinker /pm:vio -Zstack 0x8000" 152*69606e3fSchristos export RANLIB="echo" 153*69606e3fSchristos ./configure --prefix=x:/usr --disable-nls 154*69606e3fSchristos make AR=emxomfar 155*69606e3fSchristos make check 156*69606e3fSchristos 157*69606e3fSchristosAll tests should work fine with the exception of "default_names" which 158*69606e3fSchristosis because OS/2 file systems are not case sensitive ("makefile" and 159*69606e3fSchristos"Makefile" specify the same file). 160*69606e3fSchristos 161*69606e3fSchristos 162*69606e3fSchristos------------------------------------------------------------------------------- 163*69606e3fSchristosCopyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 164*69606e3fSchristosThis file is part of GNU Make. 165*69606e3fSchristos 166*69606e3fSchristosGNU Make is free software; you can redistribute it and/or modify it under the 167*69606e3fSchristosterms of the GNU General Public License as published by the Free Software 168*69606e3fSchristosFoundation; either version 2, or (at your option) any later version. 169*69606e3fSchristos 170*69606e3fSchristosGNU Make is distributed in the hope that it will be useful, but WITHOUT ANY 171*69606e3fSchristosWARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 172*69606e3fSchristosA PARTICULAR PURPOSE. See the GNU General Public License for more details. 173*69606e3fSchristos 174*69606e3fSchristosYou should have received a copy of the GNU General Public License along with 175*69606e3fSchristosGNU Make; see the file COPYING. If not, write to the Free Software 176*69606e3fSchristosFoundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 177