Changeset 3140 for trunk/src/kmk/README.W32.template
- Timestamp:
- Mar 14, 2018, 10:28:10 PM (8 years ago)
- Location:
- trunk/src/kmk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
README.W32.template (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk
-
Property svn:mergeinfo
set to
/vendor/gnumake/current merged eligible
-
Property svn:mergeinfo
set to
-
trunk/src/kmk/README.W32.template
r2591 r3140 1 This version of GNU make has been tested on Microsoft Windows 2000/XP/2003. 1 This version of GNU make has been tested on: 2 Microsoft Windows 2000/XP/2003/Vista/7/8/10 2 3 It has also been used on Windows 95/98/NT, and on OS/2. 3 4 4 It builds with the MinGW port of GCC (tested with GCC 3.4.2). 5 6 It also builds with MSVC 2.x, 4.x, 5.x, 6.x, and 2003 as well as 7 with .NET 7.x and .NET 2003. 8 9 The Windows 32-bit port of GNU make is maintained jointly by various 10 people. It was originally made by Rob Tulloh. 5 It builds with the MinGW port of GCC (tested with GCC 3.4.2, 4.8.1, 6 and 4.9.3). 7 8 It also builds with MSVC 2.x, 4.x, 5.x, 6.x, 2003, and 14 (2015) as 9 well as with .NET 7.x and .NET 2003. 10 11 As of version 4.0, a build with Guile is supported (tested with Guile 12 2.0.3). To build with Guile, you will need, in addition to Guile 13 itself, its dependency libraries and the pkg-config program. The 14 latter is used to figure out which compilation and link switches and 15 libraries need to be mentioned on the compiler command lines to 16 correctly link with Guile. A Windows port of pkg-config can be found 17 on ezwinports site: 18 19 http://sourceforge.net/projects/ezwinports/ 20 21 The libraries on which Guile depends can vary depending on your 22 version and build of Guile. At the very least, the Boehm's GC library 23 will be needed, and typically also GNU MP, libffi, libunistring, and 24 libtool's libltdl. Whoever built the port of Guile you have should 25 also provide you with these dependencies or a URL where to download 26 them. A precompiled 32-bit Windows build of Guile is available from 27 the ezwinports site mentioned above. 28 29 The Windows port of GNU make is maintained jointly by various people. 30 It was originally made by Rob Tulloh. 31 It is currently maintained by Eli Zaretskii. 11 32 12 33 … … 14 35 --------------------------------------------------------- 15 36 16 1. At the Windows command prompt run: 17 18 if not exist NMakefile copy NMakefile.template NMakefile 19 if not exist config.h copy config.h.W32 config.h 20 21 Then edit config.h to your liking (especially the few shell-related 37 1. Edit config.h.W32 to your liking (especially the few shell-related 22 38 defines near the end, or HAVE_CASE_INSENSITIVE_FS which corresponds 23 to './configure --enable-case-insensitive-file-system'). 39 to './configure --enable-case-insensitive-file-system'). (We don't 40 recommend to define HAVE_CASE_INSENSITIVE_FS, but you may wish to 41 consider that if you have a lot of files whose names are in upper 42 case, while Makefile rules are written for lower-case versions.) 24 43 25 44 … … 38 57 correct PATH and other environment variables for it, then execute ... 39 58 40 build_w32.bat gcc 41 42 This produces gnumake.exe in the current directory. 59 build_w32.bat gcc 60 61 This produces gnumake.exe in the GccRel directory. 62 If you want a version of GNU make built with debugging enabled, 63 add the --debug option. 64 65 The batch file will probe for Guile installation, and will build 66 gnumake.exe with Guile if it finds it. If you have Guile 67 installed, but want to build Make without Guile support, type 68 69 build_w32.bat --without-guile gcc 43 70 44 71 … … 52 79 menue entry from the cl-installation), then execute EITHER ... 53 80 54 build_w32.bat 55 56 (this produces WinDebug/gnumake.exe and WinRel/gnumake.exe) 81 build_w32.bat 82 83 This produces gnumake.exe in the WinRel directory. 84 If you want a version of GNU make built with debugging enabled, 85 add the --debug option. 57 86 58 87 ... OR ... 59 88 60 nmake /f NMakefile89 nmake /f NMakefile 61 90 62 91 (this produces WinDebug/make.exe and WinRel/make.exe). 63 92 93 The batch file will probe for Guile installation, and will build 94 gnumake.exe with Guile if it finds it. If you have Guile 95 installed, but want to build Make without Guile support, type 96 97 build_w32.bat --without-guile 64 98 65 99 ------------------- … … 69 103 GNU make on Windows 32-bit platforms: 70 104 71 This version of make is ported natively to Windows32 platforms72 (Windows NT 3.51, Windows NT 4.0, Windows 2000, Windows XP,73 Windows 95, and Windows 98). It does not rely on any 3rd party74 software or add-on packages for building. The only thing75 needed is a Windows compiler. Two compilers supported76 officially are the MinGW port of GNU GCC, and the various77 versions of the Microsoft C compiler.78 79 Do not confuse this port of GNU make with other Windows32 projects80 which provide a GNU make binary. These are separate projects81 and are not connected to this port effort.105 This version of make is ported natively to Windows32 platforms 106 (Windows NT 3.51, Windows NT 4.0, Windows 2000, Windows XP, 107 Windows 95, and Windows 98). It does not rely on any 3rd party 108 software or add-on packages for building. The only thing 109 needed is a Windows compiler. Two compilers supported 110 officially are the MinGW port of GNU GCC, and the various 111 versions of the Microsoft C compiler. 112 113 Do not confuse this port of GNU make with other Windows32 projects 114 which provide a GNU make binary. These are separate projects 115 and are not connected to this port effort. 82 116 83 117 GNU make and sh.exe: 84 118 85 This port prefers if you have a working sh.exe somewhere on86 your system. If you don't have sh.exe, the port falls back to87 MSDOS mode for launching programs (via a batch file). The88 MSDOS mode style execution has not been tested that carefully89 though (The author uses GNU bash as sh.exe).90 91 There are very few true ports of Bourne shell for NT right now.92 There is a version of GNU bash available from Cygnus "Cygwin"93 porting effort (http://www.cygwin.com/).94 Other possibilities are the MKS version of sh.exe, or building119 This port prefers if you have a working sh.exe somewhere on 120 your system. If you don't have sh.exe, the port falls back to 121 MSDOS mode for launching programs (via a batch file). The 122 MSDOS mode style execution has not been tested that carefully 123 though (The author uses GNU bash as sh.exe). 124 125 There are very few true ports of Bourne shell for NT right now. 126 There is a version of GNU bash available from Cygnus "Cygwin" 127 porting effort (http://www.cygwin.com/). 128 Other possibilities are the MKS version of sh.exe, or building 95 129 your own with a package like NutCracker (DataFocus) or Portage 96 130 (Consensys). Also MinGW includes sh (http://mingw.org/). … … 98 132 GNU make and brain-dead shells (BATCH_MODE_ONLY_SHELL): 99 133 100 Some versions of Bourne shell do not behave well when invoked101 as 'sh -c' from CreateProcess(). The main problem is they seem102 to have a hard time handling quoted strings correctly. This can103 be circumvented by writing commands to be executed to a batch104 file and then executing the command by calling 'sh file'.105 106 To work around this difficulty, this version of make supports107 a batch mode. When BATCH_MODE_ONLY_SHELL is defined at compile108 time, make forces all command lines to be executed via script109 files instead of by command line. In this mode you must have a110 working sh.exe in order to use parallel builds (-j).111 112 A native Windows32 system with no Bourne shell will also run113 in batch mode. All command lines will be put into batch files114 and executed via $(COMSPEC) (%COMSPEC%). However, parallel115 builds ARE supported with Windows shells (cmd.exe and116 command.com). See the next section about some peculiarities117 of parallel builds on Windows.134 Some versions of Bourne shell do not behave well when invoked 135 as 'sh -c' from CreateProcess(). The main problem is they seem 136 to have a hard time handling quoted strings correctly. This can 137 be circumvented by writing commands to be executed to a batch 138 file and then executing the command by calling 'sh file'. 139 140 To work around this difficulty, this version of make supports 141 a batch mode. When BATCH_MODE_ONLY_SHELL is defined at compile 142 time, make forces all command lines to be executed via script 143 files instead of by command line. In this mode you must have a 144 working sh.exe in order to use parallel builds (-j). 145 146 A native Windows32 system with no Bourne shell will also run 147 in batch mode. All command lines will be put into batch files 148 and executed via $(COMSPEC) (%COMSPEC%). However, parallel 149 builds ARE supported with Windows shells (cmd.exe and 150 command.com). See the next section about some peculiarities 151 of parallel builds on Windows. 118 152 119 153 Support for parallel builds 120 154 121 Parallel builds (-jN) are supported in this port, with 2 122 limitations: 123 124 - The number of concurrent processes has a hard limit of 64, 125 due to the way this port implements waiting for its 126 subprocesses; 127 128 - The job server method (available when Make runs on Posix 129 platforms) is not supported, which means you must pass an 130 explicit -jN switch to sub-Make's in a recursive Makefile. 131 If a sub-Make does not receive an explicit -jN switch, it 132 will default to -j1, i.e. no parallelism in sub-Make's. 155 Parallel builds (-jN) are supported in this port, with 1 156 limitation: The number of concurrent processes has a hard 157 limit of 64, due to the way this port implements waiting for 158 its subprocesses. 133 159 134 160 GNU make and Cygnus GNU Windows32 tools: 135 161 136 Good news! Make now has native support for Cygwin sh. To enable,137 define the HAVE_CYGWIN_SHELL in config.h and rebuild make138 from scratch. This version of make tested with B20.1 of Cygwin.139 Do not define BATCH_MODE_ONLY_SHELL if you use HAVE_CYGWIN_SHELL.162 Good news! Make now has native support for Cygwin sh. To enable, 163 define the HAVE_CYGWIN_SHELL in config.h and rebuild make 164 from scratch. This version of make tested with B20.1 of Cygwin. 165 Do not define BATCH_MODE_ONLY_SHELL if you use HAVE_CYGWIN_SHELL. 140 166 141 167 GNU make and the MKS shell: 142 168 143 There is now semi-official support for the MKS shell. To turn this144 support on, define HAVE_MKS_SHELL in the config.h.W32 before you145 build make. Do not define BATCH_MODE_ONLY_SHELL if you turn146 on HAVE_MKS_SHELL.169 There is now semi-official support for the MKS shell. To turn this 170 support on, define HAVE_MKS_SHELL in the config.h.W32 before you 171 build make. Do not define BATCH_MODE_ONLY_SHELL if you turn 172 on HAVE_MKS_SHELL. 147 173 148 174 GNU make handling of drive letters in pathnames (PATH, vpath, VPATH): 149 175 150 There is a caveat that should be noted with respect to handling151 single character pathnames on Windows systems.When colon is152 used in PATH variables, make tries to be smart about knowing when153 you are using colon as a separator versus colon as a drive154 letter.Unfortunately, something as simple as the string 'x:/'155 could be interpreted 2 ways: (x and /) or (x:/).156 157 Make chooses to interpret a letter plus colon (e.g. x:/) as a158 drive letter pathname.If it is necessary to use single159 character directories in paths (VPATH, vpath, Path, PATH), the160 user must do one of two things:161 162 a. Use semicolon as the separator to disambiguate colon. For163 example use 'x;/' if you want to say 'x' and '/' are164 separate components.165 166 b. Qualify the directory name so that there is more than167 one character in the path(s) used. For example, none168 of these settings are ambiguous:169 170 ./x:./y171 /some/path/x:/some/path/y172 x:/some/path/x:x:/some/path/y173 174 Please note that you are free to mix colon and semi-colon in the175 specification of paths.Make is able to figure out the intended176 result and convert the paths internally to the format needed177 when interacting with the operating system, providing the path178 is not within quotes, e.g. "x:/test/test.c".179 180 You are encouraged to use colon as the separator character.181 This should ease the pain of deciding how to handle various path182 problems which exist between platforms.If colon is used on183 both Unix and Windows systems, then no ifdef'ing will be184 necessary in the makefile source.176 There is a caveat that should be noted with respect to handling 177 single character pathnames on Windows systems. When colon is 178 used in PATH variables, make tries to be smart about knowing when 179 you are using colon as a separator versus colon as a drive 180 letter. Unfortunately, something as simple as the string 'x:/' 181 could be interpreted 2 ways: (x and /) or (x:/). 182 183 Make chooses to interpret a letter plus colon (e.g. x:/) as a 184 drive letter pathname. If it is necessary to use single 185 character directories in paths (VPATH, vpath, Path, PATH), the 186 user must do one of two things: 187 188 a. Use semicolon as the separator to disambiguate colon. For 189 example use 'x;/' if you want to say 'x' and '/' are 190 separate components. 191 192 b. Qualify the directory name so that there is more than 193 one character in the path(s) used. For example, none 194 of these settings are ambiguous: 195 196 ./x:./y 197 /some/path/x:/some/path/y 198 x:/some/path/x:x:/some/path/y 199 200 Please note that you are free to mix colon and semi-colon in the 201 specification of paths. Make is able to figure out the intended 202 result and convert the paths internally to the format needed 203 when interacting with the operating system, providing the path 204 is not within quotes, e.g. "x:/test/test.c". 205 206 You are encouraged to use colon as the separator character. 207 This should ease the pain of deciding how to handle various path 208 problems which exist between platforms. If colon is used on 209 both Unix and Windows systems, then no ifdef'ing will be 210 necessary in the makefile source. 185 211 186 212 GNU make test suite: 187 213 188 I verified all functionality with a slightly modified version189 of make-test-%VERSION% (modifications to get test suite to run190 on Windows NT). All tests pass in an environment that includes191 sh.exe. Tests were performed on both Windows NT and Windows 95.214 I verified all functionality with a slightly modified version 215 of make-test-%VERSION% (modifications to get test suite to run 216 on Windows NT). All tests pass in an environment that includes 217 sh.exe. Tests were performed on both Windows NT and Windows 95. 192 218 193 219 Pathnames and white space: 194 220 195 Unlike Unix, Windows 95/NT systems encourage pathnames which196 contain white space (e.g. C:\Program Files\). These sorts of197 pathnames are valid on Unix too, but are never encouraged.198 There is at least one place in make (VPATH/vpath handling) where199 paths containing white space will simply not work. There may be200 others too. I chose to not try and port make in such a way so201 that these sorts of paths could be handled. I offer these202 suggestions as workarounds:203 204 1. Use 8.3 notation. i.e. "x:/long~1/", which is actually205 "x:\longpathtest". Type "dir /x" to view these filenames206 within the cmd.exe shell.207 2. Rename the directory so it does not contain white space.208 209 If you are unhappy with this choice, this is free software210 and you are free to take a crack at making this work. The code211 in w32/pathstuff.c and vpath.c would be the places to start.221 Unlike Unix, Windows 95/NT systems encourage pathnames which 222 contain white space (e.g. C:\Program Files\). These sorts of 223 pathnames are valid on Unix too, but are never encouraged. 224 There is at least one place in make (VPATH/vpath handling) where 225 paths containing white space will simply not work. There may be 226 others too. I chose to not try and port make in such a way so 227 that these sorts of paths could be handled. I offer these 228 suggestions as workarounds: 229 230 1. Use 8.3 notation. i.e. "x:/long~1/", which is actually 231 "x:\longpathtest". Type "dir /x" to view these filenames 232 within the cmd.exe shell. 233 2. Rename the directory so it does not contain white space. 234 235 If you are unhappy with this choice, this is free software 236 and you are free to take a crack at making this work. The code 237 in w32/pathstuff.c and vpath.c would be the places to start. 212 238 213 239 Pathnames and Case insensitivity: 214 240 215 Unlike Unix, Windows 95/NT systems are case insensitive but case216 preserving. For example if you tell the file system to create a217 file named "Target", it will preserve the case. Subsequent access to218 the file with other case permutations will succeed (i.e. opening a219 file named "target" or "TARGET" will open the file "Target").220 221 By default, GNU make retains its case sensitivity when comparing222 target names and existing files or directories. It can be223 configured, however, into a case preserving and case insensitive224 mode by adding a define for HAVE_CASE_INSENSITIVE_FS to225 config.h.W32.226 227 For example, the following makefile will create a file named228 Target in the directory subdir which will subsequently be used229 to satisfy the dependency of SUBDIR/DepTarget on SubDir/TARGET.230 Without HAVE_CASE_INSENSITIVE_FS configured, the dependency link231 will not be made:232 233 subdir/Target:234 touch $@235 236 SUBDIR/DepTarget: SubDir/TARGET237 cp $^ $@238 239 Reliance on this behavior also eliminates the ability of GNU make240 to use case in comparison of matching rules. For example, it is241 not possible to set up a C++ rule using %.C that is different242 than a C rule using %.c. GNU make will consider these to be the243 same rule and will issue a warning.241 Unlike Unix, Windows 95/NT systems are case insensitive but case 242 preserving. For example if you tell the file system to create a 243 file named "Target", it will preserve the case. Subsequent access to 244 the file with other case permutations will succeed (i.e. opening a 245 file named "target" or "TARGET" will open the file "Target"). 246 247 By default, GNU make retains its case sensitivity when comparing 248 target names and existing files or directories. It can be 249 configured, however, into a case preserving and case insensitive 250 mode by adding a define for HAVE_CASE_INSENSITIVE_FS to 251 config.h.W32. 252 253 For example, the following makefile will create a file named 254 Target in the directory subdir which will subsequently be used 255 to satisfy the dependency of SUBDIR/DepTarget on SubDir/TARGET. 256 Without HAVE_CASE_INSENSITIVE_FS configured, the dependency link 257 will not be made: 258 259 subdir/Target: 260 touch $@ 261 262 SUBDIR/DepTarget: SubDir/TARGET 263 cp $^ $@ 264 265 Reliance on this behavior also eliminates the ability of GNU make 266 to use case in comparison of matching rules. For example, it is 267 not possible to set up a C++ rule using %.C that is different 268 than a C rule using %.c. GNU make will consider these to be the 269 same rule and will issue a warning. 244 270 245 271 SAMBA/NTFS/VFAT: 246 272 247 I have not had any success building the debug version of this248 package using SAMBA as my file server. The reason seems to be249 related to the way VC++ 4.0 changes the case name of the pdb250 filename it is passed on the command line. It seems to change251 the name always to to lower case. I contend that the VC++252 compiler should not change the casename of files that are passed253 as arguments on the command line. I don't think this was a254 problem in MSVC 2.x, but I know it is a problem in MSVC 4.x.255 256 The package builds fine on VFAT and NTFS filesystems.257 258 Most all of the development I have done to date has been using259 NTFS and long file names. I have not done any considerable work260 under VFAT. VFAT users may wish to be aware that this port of261 make does respect case sensitivity.273 I have not had any success building the debug version of this 274 package using SAMBA as my file server. The reason seems to be 275 related to the way VC++ 4.0 changes the case name of the pdb 276 filename it is passed on the command line. It seems to change 277 the name always to to lower case. I contend that the VC++ 278 compiler should not change the casename of files that are passed 279 as arguments on the command line. I don't think this was a 280 problem in MSVC 2.x, but I know it is a problem in MSVC 4.x. 281 282 The package builds fine on VFAT and NTFS filesystems. 283 284 Most all of the development I have done to date has been using 285 NTFS and long file names. I have not done any considerable work 286 under VFAT. VFAT users may wish to be aware that this port of 287 make does respect case sensitivity. 262 288 263 289 FAT: 264 290 265 Version 3.76 added support for FAT filesystems. Make works266 around some difficulties with stat'ing of files and caching of267 filenames and directories internally.291 Version 3.76 added support for FAT filesystems. Make works 292 around some difficulties with stat'ing of files and caching of 293 filenames and directories internally. 268 294 269 295 Bug reports: 270 296 271 Please submit bugs via the normal bug reporting mechanism which272 is described in the GNU make manual and the base README.297 Please submit bugs via the normal bug reporting mechanism which 298 is described in the GNU make manual and the base README. 273 299 274 300 275 301 ------------------------------------------------------------------------------- 276 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 277 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 302 Copyright (C) 1996-2016 Free Software Foundation, Inc. 278 303 This file is part of GNU Make. 279 304
Note:
See TracChangeset
for help on using the changeset viewer.
