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