README
1 This directory contains the 3.81 release of GNU Make.
2
3 See the file NEWS for the user-visible changes from previous releases.
4 In addition, there have been bugs fixed.
5
6 Please check the system-specific notes below for any caveats related to
7 your operating system.
8
9 For general building and installation instructions, see the file INSTALL.
10
11 If you need to build GNU Make and have no other `make' program to use,
12 you can use the shell script `build.sh' instead. To do this, first run
13 `configure' as described in INSTALL. Then, instead of typing `make' to
14 build the program, type `sh build.sh'. This should compile the program
15 in the current directory. Then you will have a Make program that you can
16 use for `./make install', or whatever else.
17
18 Some systems' Make programs are broken and cannot process the Makefile for
19 GNU Make. If you get errors from your system's Make when building GNU
20 Make, try using `build.sh' instead.
21
22
23 GNU Make is free software. See the file COPYING for copying conditions.
24
25
26 Downloading
27 -----------
28
29 GNU Make can be obtained in many different ways. See a description here:
30
31 http://www.gnu.org/software/software.html
32
33
34 Documentation
35 -------------
36
37 GNU make is fully documented in the GNU Make manual, which is contained
38 in this distribution as the file make.texinfo. You can also find
39 on-line and preformatted (PostScript and DVI) versions at the FSF's web
40 site. There is information there about ordering hardcopy documentation.
41
42 http://www.gnu.org/
43 http://www.gnu.org/doc/doc.html
44 http://www.gnu.org/manual/manual.html
45
46
47 Development
48 -----------
49
50 GNU Make development is hosted by Savannah, the FSF's online development
51 management tool. Savannah is here:
52
53 http://savannah.gnu.org
54
55 And the GNU Make development page is here:
56
57 http://savannah.gnu.org/projects/make/
58
59 You can find most information concerning the development of GNU Make at
60 this site.
61
62
63 Bug Reporting
64 -------------
65
66 You can send GNU make bug reports to <bug-make (a] gnu.org>. Please see the
67 section of the GNU make manual entitled `Problems and Bugs' for
68 information on submitting useful and complete bug reports.
69
70 You can also use the online bug tracking system in the Savannah GNU Make
71 project to submit new problem reports or search for existing ones:
72
73 http://savannah.gnu.org/bugs/?group=make
74
75 If you need help using GNU make, try these forums:
76
77 help-make (a] gnu.org
78 help-utils (a] gnu.org
79 news:gnu.utils.help
80 news:gnu.utils.bug
81
82 http://savannah.gnu.org/support/?group=make
83
84 You may also find interesting patches to GNU Make available here:
85
86 http://savannah.gnu.org/patch/?group=make
87
88 Note these patches are provided by our users as a service and we make no
89 statements regarding their correctness. Please contact the authors
90 directly if you have a problem or suggestion for a patch available on
91 this page.
92
93
94 CVS Access
95 ----------
96
97 The GNU make source repository is available via anonymous CVS from the
98 GNU Subversions CVS server; look here for details:
99
100 http://savannah.gnu.org/cvs/?group=make
101
102 Please note: you won't be able to build GNU make from CVS without
103 installing appropriate maintainer's tools, such as GNU m4, automake,
104 autoconf, Perl, GNU make, and GCC. See the README.cvs file for hints on
105 how to build GNU make once these tools are available. We make no
106 guarantees about the contents or quality of the latest code in the CVS
107 repository: it is not unheard of for code that is known to be broken to
108 be checked in. Use at your own risk.
109
110
111 System-specific Notes
112 ---------------------
113
114 It has been reported that the XLC 1.2 compiler on AIX 3.2 is buggy such
115 that if you compile make with `cc -O' on AIX 3.2, it will not work
116 correctly. It is said that using `cc' without `-O' does work.
117
118 The standard /bin/sh on SunOS 4.1.3_U1 and 4.1.4 is broken and cannot be
119 used to configure GNU make. Please install a different shell such as
120 bash or pdksh in order to run "configure". See this message for more
121 information:
122 http://mail.gnu.org/archive/html/bug-autoconf/2003-10/msg00190.html
123
124 One area that is often a problem in configuration and porting is the code
125 to check the system's current load average. To make it easier to test and
126 debug this code, you can do `make check-loadavg' to see if it works
127 properly on your system. (You must run `configure' beforehand, but you
128 need not build Make itself to run this test.)
129
130 Another potential source of porting problems is the support for large
131 files (LFS) in configure for those operating systems that provide it.
132 Please report any bugs that you find in this area. If you run into
133 difficulties, then as a workaround you should be able to disable LFS by
134 adding the `--disable-largefile' option to the `configure' script.
135
136 On systems that support micro- and nano-second timestamp values and
137 where stat(2) provides this information, GNU make will use it when
138 comparing timestamps to get the most accurate possible result. However,
139 note that many current implementations of tools that *set* timestamps do
140 not preserve micro- or nano-second granularity. This means that "cp -p"
141 and other similar tools (tar, etc.) may not exactly duplicate timestamps
142 with micro- and nano-second granularity on some systems. If your build
143 system contains rules that depend on proper behavior of tools like "cp
144 -p", you should consider using the .LOW_RESOLUTION_TIME pseudo-target to
145 force make to treat them properly. See the manual for details.
146
147
148 Ports
149 -----
150
151 - See README.customs for details on integrating GNU make with the
152 Customs distributed build environment from the Pmake distribution.
153
154 - See readme.vms for details about GNU Make on OpenVMS.
155
156 - See README.Amiga for details about GNU Make on AmigaDOS.
157
158 - See README.W32 for details about GNU Make on Windows NT, 95, or 98.
159
160 - See README.DOS for compilation instructions on MS-DOS and MS-Windows
161 using DJGPP tools.
162
163 A precompiled binary of the MSDOS port of GNU Make is available as part
164 of DJGPP; see the WWW page http://www.delorie.com/djgpp/ for more
165 information.
166
167 Please note there are two _separate_ ports of GNU make for Microsoft
168 systems: a native Windows tool built with (for example) MSVC or Cygwin,
169 and a DOS-based tool built with DJGPP. Please be sure you are looking
170 at the right README!
171
172
174 -------------------------------------------------------------------------------
175 Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
176 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
177 Inc.
178 This file is part of GNU Make.
179
180 GNU Make is free software; you can redistribute it and/or modify it under the
181 terms of the GNU General Public License as published by the Free Software
182 Foundation; either version 2, or (at your option) any later version.
183
184 GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
185 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
186 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
187
188 You should have received a copy of the GNU General Public License along with
189 GNU Make; see the file COPYING. If not, write to the Free Software
190 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
191
README.Amiga
1 Short: Port of GNU make with SAS/C (no ixemul.library required)
2 Author: GNU, Amiga port by Aaron "Optimizer" Digulla
3 Uploader: Aaron "Optimizer" Digulla (digulla (a] fh-konstanz.de)
4 Type: dev/c
5
6 This is a pure Amiga port of GNU make. It needs no extra libraries or
7 anything. It has the following features (in addition to any features of
8 GNU make):
9
10 - Runs Amiga-Commands with SystemTags() (Execute)
11 - Can run multi-line statements
12 - Allows to use Device-Names in targets:
13
14 c:make : make.o
15
16 is ok. To distinguish between device-names and target : or ::, MAKE
17 looks for spaces. If there are any around :, it's taken as a target
18 delimiter, if there are none, it's taken as the name of a device. Note
19 that "make:make.o" tries to create "make.o" on the device "make:".
20 - Replaces @@ by a newline in any command line:
21
22 if exists make @@\
23 delete make.bak quiet @@\
24 rename make make.bak @@\
25 endif @@\
26 $(CC) Link Make.o To make
27
28 works. Note that the @@ must stand alone (ie. "make@@\" is illegal).
29 Also be carefull that there is a space after the "\" (ie, at the
30 beginning of the next line).
31 - Can be made resident to save space and time
32 - Amiga specific wildcards can be used in $(wildcard ...)
33
34 BUGS:
35 - The line
36
37 dummy.h : src/*.c
38
39 tries to make dummy.h from "src/*.c" (ie. no wildcard-expansion takes
40 place). You have to use "$(wildcard src/*.c)" instead.
41
42 COMPILING FROM SCRATCH
43 ----------------------
44
45 To recompile, you need SAS/C 6.51. make itself is not neccessary, there
46 is an smakefile.
47
48 1. Copy config.ami to config.h
49 2. If you use make to compie, copy Makefile.ami to Makefile and
50 glob/Makefile.ami to glob/Makefile. Copy make into the current
51 directory.
52
53 3. Run smake/make
54
55 INSTALLATION
56
57 Copy make somewhere in your search path (eg. sc:c or sc:bin).
58 If you plan to use recursive makes, install make resident:
59
60 Resident make Add
61
62
64 -------------------------------------------------------------------------------
65 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
66 2005, 2006 Free Software Foundation, Inc.
67 This file is part of GNU Make.
68
69 GNU Make is free software; you can redistribute it and/or modify it under the
70 terms of the GNU General Public License as published by the Free Software
71 Foundation; either version 2, or (at your option) any later version.
72
73 GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
74 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
75 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
76
77 You should have received a copy of the GNU General Public License along with
78 GNU Make; see the file COPYING. If not, write to the Free Software
79 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
80
README.customs
1 -*-indented-text-*-
2
3 GNU make can utilize the Customs library, distributed with Pmake, to
4 provide builds distributed across multiple hosts.
5
6 In order to utilize this capability, you must first download and build
7 the Customs library. It is contained in the Pmake distribution, which
8 can be obtained at:
9
10 ftp://ftp.icsi.berkeley.edu/pub/ai/stolcke/software/
11
12 This integration was tested (superficially) with Pmake 2.1.33.
13
14
15 BUILDING CUSTOMS
16 ----------------
17
18 First, build pmake and Customs. You need to build pmake first, because
19 Customs require pmake to build. Unfortunately, this is not trivial;
20 please see the pmake and Customs documentation for details. The best
21 place to look for instructions is in the pmake-2.1.33/INSTALL file.
22
23 Note that the 2.1.33 Pmake distribution comes with a set of patches to
24 GNU make, distributed in the pmake-2.1.33/etc/gnumake/ directory. These
25 patches are based on GNU make 3.75 (there are patches for earlier
26 versions of GNU make, also). The parts of this patchfile which relate
27 directly to Customs support have already been incorporated into this
28 version of GNU make, so you should _NOT_ apply the patch file.
29
30 However, there are a few non-Customs specific (as far as I could tell)
31 changes here which are not incorporated (for example, the modification
32 to try expanding -lfoo to libfoo.so). If you rely on these changes
33 you'll need to re-apply them by hand.
34
35 Install the Customs library and header files according to the
36 documentation. You should also install the man pages (contrary to
37 comments in the documentation, they weren't installed automatically for
38 me; I had to cd to the ``pmake-2.1.33/doc'' directory and run ``pmake
39 install'' there directly).
40
41
42 BUILDING GNU MAKE
43 -----------------
44
45 Once you've installed Customs, you can build GNU make to use it. When
46 configuring GNU make, merely use the ``--with-customs=DIR'' option.
47 Provide the directory containing the ``lib'' and ``include/customs''
48 subdirectories as DIR. For example, if you installed the customs
49 library in /usr/local/lib and the headers in /usr/local/include/customs,
50 then you'd pass ``--with-customs=/usr/local'' as an option to configure.
51
52 Run make (or use build.sh) normally to build GNU make as described in
53 the INSTALL file.
54
55 See the documentation for Customs for information on starting and
56 configuring Customs.
57
58
59 INVOKING CUSTOMS-IZED GNU MAKE
60 -----------------------------
61
62 One thing you should be aware of is that the default build environment
63 for Customs requires root permissions. Practically, this means that GNU
64 make must be installed setuid root to use Customs.
65
66 If you don't want to do this, you can build Customs such that root
67 permissions are not necessary. Andreas Stolcke <stolcke (a] speech.sri.com>
68 writes:
69
70 > pmake, gnumake or any other customs client program is not required to
71 > be suid root if customs was compiled WITHOUT the USE_RESERVED_PORTS
72 > option in customs/config.h. Make sure the "customs" service in
73 > /etc/services is defined accordingly (port 8231 instead of 1001).
74
75 > Not using USE_RESERVED_PORTS means that a user with programming
76 > skills could impersonate another user by writing a fake customs
77 > client that pretends to be someone other than himself. See the
78 > discussion in etc/SECURITY.
79
80
81 PROBLEMS
82 --------
83
84 SunOS 4.1.x:
85 The customs/sprite.h header file #includes the <malloc.h> header
86 files; this conflicts with GNU make's configuration so you'll get a
87 compile error if you use GCC (or any other ANSI-capable C compiler).
88
89 I commented out the #include in sprite.h:107:
90
91 #if defined(sun) || defined(ultrix) || defined(hpux) || defined(sgi)
92 /* #include <malloc.h> */
93 #else
94
95 YMMV.
96
97
99 -------------------------------------------------------------------------------
100 Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
101 Free Software Foundation, Inc.
102 This file is part of GNU Make.
103
104 GNU Make is free software; you can redistribute it and/or modify it under the
105 terms of the GNU General Public License as published by the Free Software
106 Foundation; either version 2, or (at your option) any later version.
107
108 GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
109 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
110 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
111
112 You should have received a copy of the GNU General Public License along with
113 GNU Make; see the file COPYING. If not, write to the Free Software
114 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
115
README.DOS
1 Port of GNU Make to 32-bit protected mode on MSDOS and MS-Windows.
2
3 Builds with DJGPP v2 port of GNU C/C++ compiler and utilities.
4
5
6 New (since 3.74) DOS-specific features:
7
8 1. Supports long filenames when run from DOS box on Windows 9x.
9
10 2. Supports both stock DOS COMMAND.COM and Unix-style shells
11 (details in ``Notes'' below).
12
13 3. Supports DOS drive letters in dependencies and pattern rules.
14
15 4. Better support for DOS-style backslashes in pathnames (but see
16 ``Notes'' below).
17
18 5. The $(shell) built-in can run arbitrary complex commands,
19 including pipes and redirection, even when COMMAND.COM is your
20 shell.
21
22 6. Can be built without floating-point code (see below).
23
24 7. Supports signals in child programs and restores the original
25 directory if the child was interrupted.
26
27 8. Can be built without (a previous version of) Make.
28
29 9. The build process requires only standard tools. (Optional
30 targets like "install:" and "clean:" still need additional
31 programs, though, see below.)
32
33 10. Beginning with v3.78, the test suite works in the DJGPP
34 environment (requires Perl and auxiliary tools; see below).
35
36
37 To install a binary distribution:
38
39 Simply unzip the makNNNb.zip file (where NNN is the version number)
40 preserving the directory structure (-d switch if you use PKUNZIP).
41 If you are installing Make on Windows 9X or Windows 2000, use an
42 unzip program that supports long filenames in zip files. After
43 unzipping, make sure the directory with make.exe is on your PATH,
44 and that's all you need to use Make.
45
46
47 To build from sources:
48
49 1. Unzip the archive, preserving the directory structure (-d switch
50 if you use PKUNZIP). If you build Make on Windows 9X or Windows
51 2000, use an unzip program that supports long filenames in zip
52 files.
53
54 If you are unpacking an official GNU source distribution, use
55 either DJTAR (which is part of the DJGPP development
56 environment), or the DJGPP port of GNU Tar.
57
58 2. Invoke the `configure.bat' batch file.
59
60 If you are building Make in-place, i.e. in the same directory
61 where its sources are kept, just type "configure.bat" and press
62 [Enter]. Otherwise, you need to supply the path to the source
63 directory as an argument to the batch file, like this:
64
65 c:\djgpp\gnu\make-3.81\configure.bat c:/djgpp/gnu/make-3.81
66
67 Note the forward slashes in the source path argument: you MUST
68 use them here.
69
70 3. If configure.bat doesn't find a working Make, it will suggest to
71 use the `dosbuild.bat' batch file to build Make. Either do as it
72 suggests or install another Make program (a pre-compiled binary
73 should be available from the usual DJGPP sites) and rerun
74 configure.bat.
75
76 4. If you will need to run Make on machines without an FPU, you
77 might consider building a version of Make which doesn't issue
78 floating-point instructions (they don't help much on MSDOS
79 anyway). To this end, edit the Makefile created by
80 configure.bat and add -DNO_FLOAT to the value of CPPFLAGS.
81
82 5. Invoke Make.
83
84 If you are building from outside of the source directory, you
85 need to tell Make where the sources are, like this:
86
87 make srcdir=c:/djgpp/gnu/make-3.81
88
89 (configure.bat will tell you this when it finishes). You MUST
90 use a full, not relative, name of the source directory here, or
91 else Make might fail.
92
93 6. After Make finishes, if you have a Unix-style shell installed,
94 you can use the `install' target to install the package. You
95 will also need GNU Fileutils and GNU Sed for this (they should
96 be available from the DJGPP sites).
97
98 By default, GNU make will install into your DJGPP installation
99 area. If you wish to use a different directory, override the
100 DESTDIR variable when invoking "make install", like this:
101
102 make install DESTDIR=c:/other/dir
103
104 This causes the make executable to be placed in c:/other/dir/bin,
105 the man pages in c:/other/dir/man, etc.
106
107 Without a Unix-style shell, you will have to install programs
108 and the docs manually. Copy make.exe to a directory on your
109 PATH, make.i* info files to your Info directory, and update the
110 file `dir' in your Info directory by adding the following item
111 to the main menu:
112
113 * Make: (make.info). The GNU make utility.
114
115 If you have the `install-info' program (from the GNU Texinfo
116 package), it will do that for you if you invoke it like this:
117
118 install-info --info-dir=c:/djgpp/info c:/djgpp/info/make.info
119
120 (If your Info directory is other than C:\DJGPP\INFO, change this
121 command accordingly.)
122
123 7. The `clean' targets also require Unix-style shell, and GNU Sed
124 and `rm' programs (the latter from Fileutils).
125
126 8. To run the test suite, type "make check". This requires a Unix
127 shell (I used the DJGPP port of Bash 2.03), Perl, Sed, Fileutils
128 and Sh-utils.
129
130
131 Notes:
132 -----
133
134 1. The shell issue.
135
136 This is probably the most significant improvement, first
137 introduced in the port of GNU Make 3.75.
138
139 The original behavior of GNU Make is to invoke commands
140 directly, as long as they don't include characters special to
141 the shell or internal shell commands, because that is faster.
142 When shell features like redirection or filename wildcards are
143 involved, Make calls the shell.
144
145 This port supports both DOS shells (the stock COMMAND.COM and its
146 4DOS/NDOS replacements), and Unix-style shells (tested with the
147 venerable Stewartson's `ms_sh' 2.3 and the DJGPP port of `bash' by
148 Daisuke Aoyama <jack (a] st.rim.or.jp>).
149
150 When the $SHELL variable points to a Unix-style shell, Make
151 works just like you'd expect on Unix, calling the shell for any
152 command that involves characters special to the shell or
153 internal shell commands. The only difference is that, since
154 there is no standard way to pass command lines longer than the
155 infamous DOS 126-character limit, this port of Make writes the
156 command line to a temporary disk file and then invokes the shell
157 on that file.
158
159 If $SHELL points to a DOS-style shell, however, Make will not
160 call it automatically, as it does with Unix shells. Stock
161 COMMAND.COM is too dumb and would unnecessarily limit the
162 functionality of Make. For example, you would not be able to
163 use long command lines in commands that use redirection or
164 pipes. Therefore, when presented with a DOS shell, this port of
165 Make will emulate most of the shell functionality, like
166 redirection and pipes, and shall only call the shell when a
167 batch file or a command internal to the shell is invoked. (Even
168 when a command is an internal shell command, Make will first
169 search the $PATH for it, so that if a Makefile calls `mkdir',
170 you can install, say, a port of GNU `mkdir' and have it called
171 in that case.)
172
173 The key to all this is the extended functionality of `spawn' and
174 `system' functions from the DJGPP library; this port just calls
175 `system' where it would invoke the shell on Unix. The most
176 important aspect of these functions is that they use a special
177 mechanism to pass long (up to 16KB) command lines to DJGPP
178 programs. In addition, `system' emulates some internal
179 commands, like `cd' (so that you can now use forward slashes
180 with it, and can also change the drive if the directory is on
181 another drive). Another aspect worth mentioning is that you can
182 call Unix shell scripts directly, provided that the shell whose
183 name is mentioned on the first line of the script is installed
184 anywhere along the $PATH. It is impossible to tell here
185 everything about these functions; refer to the DJGPP library
186 reference for more details.
187
188 The $(shell) built-in is implemented in this port by calling
189 `popen'. Since `popen' calls `system', the above considerations
190 are valid for $(shell) as well. In particular, you can put
191 arbitrary complex commands, including pipes and redirection,
192 inside $(shell), which is in many cases a valid substitute for
193 the Unix-style command substitution (`command`) feature.
194
195
196 2. "SHELL=/bin/sh" -- or is it?
197
198 Many Unix Makefiles include a line which sets the SHELL, for
199 those versions of Make which don't have this as the default.
200 Since many DOS systems don't have `sh' installed (in fact, most
201 of them don't even have a `/bin' directory), this port takes
202 such directives with a grain of salt. It will only honor such a
203 directive if the basename of the shell name (like `sh' in the
204 above example) can indeed be found in the directory that is
205 mentioned in the SHELL= line (`/bin' in the above example), or
206 in the current working directory, or anywhere on the $PATH (in
207 that order). If the basename doesn't include a filename
208 extension, Make will look for any known extension that indicates
209 an executable file (.exe, .com, .bat, .btm, .sh, and even .sed
210 and .pl). If any such file is found, then $SHELL will be
211 defined to the exact pathname of that file, and that shell will
212 hence be used for the rest of processing. But if the named
213 shell is *not* found, the line which sets it will be effectively
214 ignored, leaving the value of $SHELL as it was before. Since a
215 lot of decisions that this port makes depend on the gender of
216 the shell, I feel it doesn't make any sense to tailor Make's
217 behavior to a shell which is nowhere to be found.
218
219 Note that the above special handling of "SHELL=" only happens
220 for Makefiles; if you set $SHELL in the environment or on the
221 Make command line, you are expected to give the complete
222 pathname of the shell, including the filename extension.
223
224 The default value of $SHELL is computed as on Unix (see the Make
225 manual for details), except that if $SHELL is not defined in the
226 environment, $COMSPEC is used. Also, if an environment variable
227 named $MAKESHELL is defined, it takes precedence over both
228 $COMSPEC and $SHELL. Note that, unlike Unix, $SHELL in the
229 environment *is* used to set the shell (since on MSDOS, it's
230 unlikely that the interactive shell will not be suitable for
231 Makefile processing).
232
233 The bottom line is that you can now write Makefiles where some
234 of the targets require a real (i.e. Unix-like) shell, which will
235 nevertheless work when such shell is not available (provided, of
236 course, that the commands which should always work, don't
237 require such a shell). More important, you can convert Unix
238 Makefiles to MSDOS and leave the line which sets the shell
239 intact, so that people who do have Unixy shell could use it for
240 targets which aren't converted to DOS (like `install' and
241 `uninstall', for example).
242
243
244 3. Default directories.
245
246 GNU Make knows about standard directories where it searches for
247 library and include files mentioned in the Makefile. Since
248 MSDOS machines don't have standard places for these, this port
249 will search ${DJDIR}/lib and ${DJDIR}/include respectively.
250 $DJDIR is defined automatically by the DJGPP startup code as the
251 root of the DJGPP installation tree (unless you've tampered with
252 the DJGPP.ENV file). This should provide reasonable default
253 values, unless you moved parts of DJGPP to other directories.
254
255
256 4. Letter-case in filenames.
257
258 If you run Make on Windows 9x, you should be aware of the
259 letter-case issue. Make is internally case-sensitive, but all
260 file operations are case-insensitive on Windows 9x, so
261 e.g. files `FAQ', `faq' and `Faq' all refer to the same file, as
262 far as Windows is concerned. The underlying DJGPP C library
263 functions honor the letter-case of the filenames they get from
264 the OS, except that by default, they down-case 8+3 DOS filenames
265 which are stored in upper case in the directory and would break
266 many Makefiles otherwise. (The details of which filenames are
267 converted to lower case are explained in the DJGPP libc docs,
268 under the `_preserve_fncase' and `_lfn_gen_short_fname'
269 functions, but as a thumb rule, any filename that is stored in
270 upper case in the directory, is a valid DOS 8+3 filename and
271 doesn't include characters invalid on MSDOS FAT filesystems,
272 will be automatically down-cased.) User reports that I have
273 indicate that this default behavior is generally what you'd
274 expect; however, your input is most welcome.
275
276 In any case, if you hit a situation where you must force Make to
277 get the 8+3 DOS filenames in upper case, set FNCASE=y in the
278 environment or in the Makefile.
279
280
281 5. DOS-style pathnames.
282
283 There are a lot of places throughout the program sources which
284 make implicit assumptions about the pathname syntax. In
285 particular, the directories are assumed to be separated by `/',
286 and any pathname which doesn't begin with a `/' is assumed to be
287 relative to the current directory. This port attempts to
288 support DOS-style pathnames which might include the drive letter
289 and use backslashes instead of forward slashes. However, this
290 support is not complete; I feel that pursuing this support too
291 far might break some more important features, particularly if
292 you use a Unix-style shell (where a backslash is a quote
293 character). I only consider support of backslashes desirable
294 because some Makefiles invoke non-DJGPP programs which don't
295 understand forward slashes. A notable example of such programs
296 is the standard programs which come with MSDOS. Otherwise, you
297 are advised to stay away from backslashes whenever possible. In
298 particular, filename globbing won't work on pathnames with
299 backslashes, because the GNU `glob' library doesn't support them
300 (backslash is special in filename wildcards, and I didn't want
301 to break that).
302
303 One feature which *does* work with backslashes is the filename-
304 related built-in functions such as $(dir), $(notdir), etc.
305 Drive letters in pathnames are also fully supported.
306
307
308
309 Bug reports:
310 -----------
311
312 Bugs that are clearly related to the MSDOS/DJGPP port should be
313 reported first on the comp.os.msdos.djgpp news group (if you cannot
314 post to Usenet groups, write to the DJGPP mailing list,
315 <djgpp (a] delorie.com>, which is an email gateway into the above news
316 group). For other bugs, please follow the procedure explained in
317 the "Bugs" chapter of the Info docs. If you don't have an Info
318 reader, look up that chapter in the `make.i1' file with any text
319 browser/editor.
320
321
322 Enjoy,
323 Eli Zaretskii <eliz (a] is.elta.co.il>
324
325
327 -------------------------------------------------------------------------------
328 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
329 2006 Free Software Foundation, Inc.
330 This file is part of GNU Make.
331
332 GNU Make is free software; you can redistribute it and/or modify it under the
333 terms of the GNU General Public License as published by the Free Software
334 Foundation; either version 2, or (at your option) any later version.
335
336 GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
337 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
338 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
339
340 You should have received a copy of the GNU General Public License along with
341 GNU Make; see the file COPYING. If not, write to the Free Software
342 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
343
README.OS2
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
readme.vms
1 This is the VMS version of GNU Make, updated by Hartmut Becker
2
3 Changes are based on GNU make 3.80. Latest changes are for OpenVMS/I64
4 and new VMS CRTLs.
5
6 This version was tested on OpenVMS/I64 V8.2 (field test) with hp C
7 X7.1-024 OpenVMS/Alpha V7.3-2 with Compaq C V6.5-001 and OpenVMS/VAX 7.1
8 with Compaq C V6.2-003 There are still some warning and informational
9 message issued by the compilers.
10
11 Build instructions
12 Make a 1st version
13 $ @makefile.com
14 $ rena make.exe 1st-make.exe
15 Use the 1st version to generate a 2nd version
16 $ mc sys$disk:[]1st-make clean
17 $ mc sys$disk:[]1st-make
18 Verify your 2nd version
19 $ rena make.exe 2nd-make.exe
20 $ mc sys$disk:[]2nd-make clean
21 $ mc sys$disk:[]2nd-make
22
23 Changes:
24
25 . In default.c define variable ARCH as IA64 for VMS on Itanium systems.
26
27 . In makefile.vms avoid name collision for glob and globfree.
28
29 In newer version of the VMS CRTL there are glob and globfree implemented.
30 Compiling and linking may result in
31
32 %ILINK-W-MULDEFLNKG, symbol DECC$GLOBFREE has subsequent linkage definition
33 in module DECC$SHR file SYS$COMMON:[SYSLIB]DECC$SHR.EXE;1
34 %ILINK-W-MULDEF, symbol DECC$GLOBFREE multiply defined
35 in module DECC$SHR file SYS$COMMON:[SYSLIB]DECC$SHR.EXE;1
36
37 linker messages (and similar for DECC$GLOB). The messages just say, that
38 globfree is a known CRTL whose name was mapped by the compiler to
39 DECC$GLOBFREE. This is done in glob.c as well, so this name is defined
40 twice. One possible solution is to use the VMS versions of glob and
41 globfree. However, then the build environment needs to figure out if
42 there is a new CRTL supporting these or not. This adds complexity. Even
43 more, these functions return VMS file specifications, which is not
44 expected by the other make sources. There is a switch at run time (a VMS
45 logical DECC$GLOB_UNIX_STYLE), which can be set to get Unix style
46 names. This may conflict with other software. The recommended solution
47 for this is to set this switch just prior to calling main: in an
48 initialization routine. This adds more complexity and more VMS specific
49 code. It is easier to tell the compiler NOT to map the routine names
50 with a simple change in makefile.vms.
51
52 Some notes on case sensitive names in rules and on the disk. In the VMS
53 template for CONFIG.H case sensitive rules can be enabled with defining
54 WANT_CASE_SENSITIVE_TARGETS. For recent version of VMS there is a case
55 sensitive file system: ODS5. To make use of that, additionally un-defining
56 the HAVE_CASE_INSENSITIVE_FS is required. As these are C macros, different
57 versions of make need to be built to have any case sensitivity for VMS
58 working. Unfortunately, for ODS5 disks that's not all.
59
60 - Usually DCL upcases command line tokens (except strings) and usually the
61 file system is case blind (similar to how Windows systems work)
62 $ set proc/parse=extended/case=sensitive
63 preserves lower and UPPER on the command line and (for this process and all
64 sub-processes) enables case sensitivity in the file system
65
66 - Usually the CRTL tries to reverse what DCL did with command line tokens, it
67 lowercases all tokens (except strings)
68 $ define DECC$ARGV_PARSE_STYLE enable
69 passes (the now preserved) lower and UPPER from the command line to main()
70
71 - Usually the CRTL upcases the arguments to open() and friends
72 $ define DECC$EFS_CASE_PRESERVE enable
73 preserves the names as is.
74
75 It is important to know that not all VMS tools are ready for case sensitivity.
76 With this setup some tools may not work as expected. The setup should not
77 blindly be applied for all users in default login procedures.
78
79 Example? The poor coding gives a compiler message, showing that there are
80 different files:
81
82 $ dir
83
84 Directory ODS5DISK[HB]
85
86 A.c;1 B.c;1 c.c;1 X.c;1
87 x.c;1
88
89 Total of 5 files.
90 $ ods5make x.obj
91 cc /obj=x.obj x.c
92
93 foo(){lowercase_x();}
94 ......^
95 %CC-I-IMPLICITFUNC, In this statement, the identifier "lowercase_x" is implicitly declared as a function.
96 at line number 1 in file ODS5DISK[HB]x.c;1
97 $ mc SYS$SYSDEVICE:[HARTMUT.MAKE_3_80P]ods5make X.obj
98 cc /obj=X.obj X.c
99
100 foo() {UPPERCASE_X();}
101 .......^
102 %CC-I-IMPLICITFUNC, In this statement, the identifier "UPPERCASE_X" is implicitly declared as a function.
103 at line number 1 in file ODS5DISK[HB]X.c;1
104 $ dir
105
106 Directory ODS5DISK[HB]
107
108 A.c;1 B.c;1 c.c;1 X.c;1
109 x.c;1 X.obj;1 x.obj;1
110
111 Total of 7 files.
112 $
113
115 This is the VMS port of GNU Make done by Hartmut.Becker (a] compaq.com.
116
117 It is based on the specific version 3.77k and on 3.78.1. 3.77k was done
118 by Klaus Kmpf <kkaempf (a] rmi.de>, the code was based on the VMS port of
119 GNU Make 3.60 by Mike Moretti.
120
121 It was ported on OpenVMS/Alpha V7.1, DECC V5.7-006. It was re-build and
122 tested on OpenVMS/Alpha V7.2, OpenVMS/VAX 7.1 and 5.5-2. Different
123 versions of DECC were used. VAXC was tried: it fails; but it doesn't
124 seem worth to get it working. There are still some PTRMISMATCH warnings
125 during the compile. Although perl is working on VMS the test scripts
126 don't work. The function $shell is still missing.
127
128 There is a known bug in some of the VMS CRTLs. It is in the shipped
129 versions of VMS V7.2 and V7.2-1 and in the currently (October 1999)
130 available ECOs for VMS V7.1 and newer versions. It is fixed in versions
131 shipped with newer VMS versions and all ECO kits after October 1999. It
132 only shows up during the daylight saving time period (DST): stat()
133 returns a modification time 1 hour ahead. This results in GNU make
134 warning messages. For a just created source you will see:
135
136 $ gmake x.exe
137 gmake.exe;1: *** Warning: File `x.c' has modification time in the future (940582863 > 940579269)
138 cc /obj=x.obj x.c
139 link x.obj /exe=x.exe
140 gmake.exe;1: *** Warning: Clock skew detected. Your build may be incomplete.
141
142
143 New in 3.78.1:
144
145 Fix a problem with automatically remaking makefiles. GNU make uses an
146 execve to restart itself after a successful remake of the makefile. On
147 UNIX systems execve replaces the running program with a new one and
148 resets all signal handling to the default. On VMS execve creates a child
149 process, signal and exit handlers of the parent are still active, and,
150 unfortunately, corrupt the exit code from the child. Fix in job.c:
151 ignore SIGCHLD.
152
153 Added some switches to reflect latest features of DECC. Modifications in
154 makefile.vms.
155
156 Set some definitions to reflect latest features of DECC. Modifications in
157 config.h-vms (which is copied to config.h).
158
159 Added extern strcmpi declaration to avoid 'implicitly declared' messages.
160 Modification in make.h.
161
162 Default rule for C++, conditionals for gcc (GCC_IS_NATIVE) or DEC/Digital/
163 Compaq c/c++ compilers. Modifications in default.c.
164
165 Usage of opendir() and friends, suppress file version. Modifications in dir.c.
166
167 Added VMS specific code to handle ctrl+c and ctrl+y to abort make.
168 Modifications in job.c.
169
170 Added support to have case sensitive targets and dependencies but to
171 still use case blind file names. This is especially useful for Java
172 makefiles on VMS:
173
174 .SUFFIXES :
175 .SUFFIXES : .class .java
176 .java.class :
177 javac "$<
178 HelloWorld.class : HelloWorld.java
179
180 A new macro WANT_CASE_SENSITIVE_TARGETS in config.h-vms was introduced.
181 It needs to be enabled to get this feature; default is disabled. The
182 macro HAVE_CASE_INSENSITIVE_FS must not be touched: it is still enabled.
183 Modifications in file.c and config.h-vms.
184
185 Bootstrap make to start building make is still makefile.com, but make
186 needs to be re-made with a make to make a correct version: ignore all
187 possible warnings, delete all objects, rename make.exe to a different
188 name and run it.
189
190 Made some minor modifications to the bootstrap build makefile.com.
191
193 This is the VMS port of GNU Make.
194
195 It is based on the VMS port of GNU Make 3.60 by Mike Moretti.
196
197 This port was done by Klaus Kmpf <kkaempf (a] rmi.de>
198
199 There is first-level support available from proGIS Software, Germany.
200 Visit their web-site at http://www.progis.de to get information
201 about other vms software and forthcoming updates to gnu make.
202
203 New for 3.77:
204
205 /bin/sh style I/O redirection is supported. You can now write lines like
206 mcr sys$disk:[]program.exe < input.txt > output.txt &> error.txt
207
208 Makefile variables are looked up in the current environment. You can set
209 symbols or logicals in DCL and evaluate them in the Makefile via
210 $(<name-of-symbol-or-logical>). Variables defined in the Makefile
211 override VMS symbols/logicals !
212
213 Functions for file names are working now. See the GNU Make manual for
214 $(dir ...) and $(wildcard ...). Unix-style and VMS-style names are
215 supported as arguments.
216
217 The default rules are set up for GNU C. Building an executable from a
218 single source file is as easy as 'make file.exe'.
219
220 The variable $(ARCH) is predefined as ALPHA or VAX resp. Makefiles for
221 different VMS systems can now be written by checking $(ARCH) as in
222 ifeq ($(ARCH),ALPHA)
223 $(ECHO) "On the Alpha"
224 else
225 $(ECHO) "On the VAX"
226 endif
227
228 Command lines of excessive length are correctly broken and written to a
229 batch file in sys$scratch for later execution. There's no limit to the
230 lengths of commands (and no need for .opt files :-) any more.
231
232 Empty commands are handled correctly and don't end in a new DCL process.
233
234
235 New for 3.76:
236
237 John W. Eaton has updated the VMS port to support libraries and VPATH.
238
239
240 To build Make, simply type @makefile. This should compile all the
241 necessary files and link Make. There is also a file called
242 makefile.vms. If you already have GNU Make built you can just use
243 Make with this makefile to rebuild.
244
245 Here are some notes about GNU Make for VMS:
246
247 The cd command is supported if it's called as $(CD). This invokes
248 the 'builtin_cd' command which changes the directory.
249 Calling 'set def' doesn't do the trick, since a sub-shell is
250 spawned for this command, the directory is changed *in this sub-shell*
251 and the sub-shell ends.
252
253 Libraries are not supported. They were in GNU Make 3.60 but somehow I
254 didn't care porting the code. If there is enough interest, I'll do it at
255 some later time.
256
257 The variable $^ separates files with commas instead of spaces (It's the
258 natural thing to do for VMS).
259
260 See defaults.c for VMS default suffixes and my definitions for default
261 rules and variables.
262
263 The shell function is not implemented yet.
264
265 Load average routines haven't been implemented for VMS yet.
266
267 The default include directory for including other makefiles is
268 SYS$SYSROOT:[SYSLIB] (I don't remember why I didn't just use
269 SYS$LIBRARY: instead; maybe it wouldn't work that way).
270
271 The default makefiles make looks for are: makefile.vms, gnumakefile,
272 makefile., and gnumakefile. .
273
274 The stat() function and handling of time stamps in VMS is broken, so I
275 replaced it with a hack in vmsfunctions.c. I will provide a full rewrite
276 somewhere in the future. Be warned, the time resolution inside make is
277 less than what vms provides. This might be a problem on the faster Alphas.
278
279 You can use a : in a filename only if you preceed it with a backslash ('\').
280 E.g.- hobbes\:[bogas.files]
281
282 Make ignores success, informational, or warning errors (-S-, -I-, or
283 -W-). But it will stop on -E- and -F- errors. (unless you do something
284 to override this in your makefile, or whatever).
285
286 Remote stuff isn't implemented yet.
287
288 Multiple line DCL commands, such as "if" statements, must be put inside
289 command files. You can run a command file by using \@.
290
291
292 VMS changes made for 3.74.3
293
294 Lots of default settings are adapted for VMS. See default.c.
295
296 Long command lines are now converted to command files.
297
298 Comma (',') as a separator is now allowed. See makefile.vms for an example.
299
300 -------------------------------------------------------------------------------
301 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
302 2006 Free Software Foundation, Inc.
303 This file is part of GNU Make.
304
305 GNU Make is free software; you can redistribute it and/or modify it under the
306 terms of the GNU General Public License as published by the Free Software
307 Foundation; either version 2, or (at your option) any later version.
308
309 GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
310 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
311 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
312
313 You should have received a copy of the GNU General Public License along with
314 GNU Make; see the file COPYING. If not, write to the Free Software
315 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
316
README.W32
1 This version of GNU make has been tested on Microsoft Windows 2000/XP/2003.
2 It has also been used on Windows 95/98/NT, and on OS/2.
3
4 It builds natively with MSVC 2.x, 4.x, 5.x, 6.x, and 2003 as well as
5 .NET 7.x and .NET 2003.
6
7 It builds with the MinGW port of GCC 3.x (tested with GCC 3.4.2).
8
9 The Windows 32-bit port of GNU make is maintained jointly by various
10 people. It was originally made by Rob Tulloh.
11
12
13 Do this first, regardless of the build method you choose:
14 ---------------------------------------------------------
15
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
22 defines near the end, or HAVE_CASE_INSENSITIVE_FS which corresponds
23 to './configure --enable-case-insensitive-file-system').
24
25
26 Using make_msvc_net2003.vcproj
27 ------------------------------
28
29 2. Open make_msvc_net2003.vcproj in MSVS71 or MSVC71 or any compatible IDE,
30 then build this project as usual.
31
32
33 Building with (MinGW-)GCC using build_w32.bat
34 ---------------------------------------------
35
36 2. Open a W32 command prompt for your installed (MinGW-)GCC, setup a
37 correct PATH and other environment variables for it, then execute ...
38
39 build_w32.bat gcc
40
41 This produces gnumake.exe in the current directory.
42
43
44 Building with (MSVC++-)cl using build_w32.bat or NMakefile
45 ----------------------------------------------------------
46
47 2. Open a W32 command prompt for your installed (MSVC++-)cl, setup a
48 correct PATH and other environment variables for it (usually via
49 executing vcvars32.bat or vsvars32.bat from the cl-installation,
50 e.g. "%VS71COMNTOOLS%vsvars32.bat"; or using a corresponding start
51 menue entry from the cl-installation), then execute EITHER ...
52
53 build_w32.bat
54
55 (this produces WinDebug/gnumake.exe and WinRel/gnumake.exe)
56
57 ... OR ...
58
59 nmake /f NMakefile
60
61 (this produces WinDebug/make.exe and WinRel/make.exe).
62
63
64 -------------------
65 -- Notes/Caveats --
66 -------------------
67
68 GNU make on Windows 32-bit platforms:
69
70 This version of make is ported natively to Windows32 platforms
71 (Windows NT 3.51, Windows NT 4.0, Windows 95, and Windows 98). It
72 does not rely on any 3rd party software or add-on packages for
73 building. The only thing needed is a version of Visual C++,
74 which is the predominant compiler used on Windows32 platforms.
75
76 Do not confuse this port of GNU make with other Windows32 projects
77 which provide a GNU make binary. These are separate projects
78 and are not connected to this port effort.
79
80 GNU make and sh.exe:
81
82 This port prefers you have a working sh.exe somewhere on your
83 system. If you don't have sh.exe, the port falls back to
84 MSDOS mode for launching programs (via a batch file).
85 The MSDOS mode style execution has not been tested that
86 carefully though (The author uses GNU bash as sh.exe).
87
88 There are very few true ports of Bourne shell for NT right now.
89 There is a version of GNU bash available from Cygnus "Cygwin"
90 porting effort (http://www.cygwin.com/).
91 Other possibilities are the MKS version of sh.exe, or building
92 your own with a package like NutCracker (DataFocus) or Portage
93 (Consensys). Also MinGW includes sh (http://mingw.org/).
94
95 GNU make and brain-dead shells (BATCH_MODE_ONLY_SHELL):
96
97 Some versions of Bourne shell do not behave well when invoked
98 as 'sh -c' from CreateProcess(). The main problem is they seem
99 to have a hard time handling quoted strings correctly. This can
100 be circumvented by writing commands to be executed to a batch
101 file and then executing the command by calling 'sh file'.
102
103 To work around this difficulty, this version of make supports
104 a batch mode. When BATCH_MODE_ONLY_SHELL is defined at compile
105 time, make forces all command lines to be executed via script
106 files instead of by command line. In this mode you must have a
107 working sh.exe in order to use parallel builds (-j).
108
109 A native Windows32 system with no Bourne shell will also run
110 in batch mode. All command lines will be put into batch files
111 and executed via $(COMSPEC) (%COMSPEC%). Note that parallel
112 builds (-j) require a working Bourne shell; they will not work
113 with COM.
114
115 GNU make and Cygnus GNU Windows32 tools:
116
117 Good news! Make now has native support for Cygwin sh. To enable,
118 define the HAVE_CYGWIN_SHELL in config.h and rebuild make
119 from scratch. This version of make tested with B20.1 of Cygwin.
120 Do not define BATCH_MODE_ONLY_SHELL if you use HAVE_CYGWIN_SHELL.
121
122 GNU make and the MKS shell:
123
124 There is now semi-official support for the MKS shell. To turn this
125 support on, define HAVE_MKS_SHELL in the config.h.W32 before you
126 build make. Do not define BATCH_MODE_ONLY_SHELL if you turn
127 on HAVE_MKS_SHELL.
128
129 GNU make handling of drive letters in pathnames (PATH, vpath, VPATH):
130
131 There is a caveat that should be noted with respect to handling
132 single character pathnames on Windows systems. When colon is
133 used in PATH variables, make tries to be smart about knowing when
134 you are using colon as a separator versus colon as a drive
135 letter. Unfortunately, something as simple as the string 'x:/'
136 could be interpreted 2 ways: (x and /) or (x:/).
137
138 Make chooses to interpret a letter plus colon (e.g. x:/) as a
139 drive letter pathname. If it is necessary to use single
140 character directories in paths (VPATH, vpath, Path, PATH), the
141 user must do one of two things:
142
143 a. Use semicolon as the separator to disambiguate colon. For
144 example use 'x;/' if you want to say 'x' and '/' are
145 separate components.
146
147 b. Qualify the directory name so that there is more than
148 one character in the path(s) used. For example, none
149 of these settings are ambiguous:
150
151 ./x:./y
152 /some/path/x:/some/path/y
153 x:/some/path/x:x:/some/path/y
154
155 Please note that you are free to mix colon and semi-colon in the
156 specification of paths. Make is able to figure out the intended
157 result and convert the paths internally to the format needed
158 when interacting with the operating system, providing the path
159 is not within quotes, e.g. "x:/test/test.c".
160
161 You are encouraged to use colon as the separator character.
162 This should ease the pain of deciding how to handle various path
163 problems which exist between platforms. If colon is used on
164 both Unix and Windows systems, then no ifdef'ing will be
165 necessary in the makefile source.
166
167 GNU make test suite:
168
169 I verified all functionality with a slightly modified version
170 of make-test-3.81 (modifications to get test suite to run
171 on Windows NT). All tests pass in an environment that includes
172 sh.exe. Tests were performed on both Windows NT and Windows 95.
173
174 Building GNU make on Windows NT and Windows 95/98 with Microsoft Visual C:
175
176 I did not provide a Visual C project file with this port as
177 the project file would not be considered freely distributable
178 (or so I think). It is easy enough to create one, though, if
179 you know how to use Visual C.
180
181 I build the program statically to avoid problems locating DLL's
182 on machines that may not have MSVC runtime installed. If you
183 prefer, you can change make to build with shared libraries by
184 changing /MT to /MD in the NMakefile (or in build_w32.bat).
185
186 The program has not been built for non-Intel architectures (yet).
187
188 I have not tried to build with any other compilers than MSVC. I
189 have heard that this is possible though so don't be afraid to
190 notify me of your successes!
191
192 Pathnames and white space:
193
194 Unlike Unix, Windows 95/NT systems encourage pathnames which
195 contain white space (e.g. C:\Program Files\). These sorts of
196 pathnames are legal under Unix too, but are never encouraged.
197 There is at least one place in make (VPATH/vpath handling) where
198 paths containing white space will simply not work. There may be
199 others too. I chose to not try and port make in such a way so
200 that these sorts of paths could be handled. I offer these
201 suggestions as workarounds:
202
203 1. Use 8.3 notation. i.e. "x:/long~1/", which is actually
204 "x:\longpathtest". Type "dir /x" to view these filenames
205 within the cmd.exe shell.
206 2. Rename the directory so it does not contain white space.
207
208 If you are unhappy with this choice, this is free software
209 and you are free to take a crack at making this work. The code
210 in w32/pathstuff.c and vpath.c would be the places to start.
211
212 Pathnames and Case insensitivity:
213
214 Unlike Unix, Windows 95/NT systems are case insensitive but case
215 preserving. For example if you tell the file system to create a
216 file named "Target", it will preserve the case. Subsequent access to
217 the file with other case permutations will succeed (i.e. opening a
218 file named "target" or "TARGET" will open the file "Target").
219
220 By default, GNU make retains its case sensitivity when comparing
221 target names and existing files or directories. It can be
222 configured, however, into a case preserving and case insensitive
223 mode by adding a define for HAVE_CASE_INSENSITIVE_FS to
224 config.h.W32.
225
226 For example, the following makefile will create a file named
227 Target in the directory subdir which will subsequently be used
228 to satisfy the dependency of SUBDIR/DepTarget on SubDir/TARGET.
229 Without HAVE_CASE_INSENSITIVE_FS configured, the dependency link
230 will not be made:
231
232 subdir/Target:
233 touch $@
234
235 SUBDIR/DepTarget: SubDir/TARGET
236 cp $^ $@
237
238 Reliance on this behavior also eliminates the ability of GNU make
239 to use case in comparison of matching rules. For example, it is
240 not possible to set up a C++ rule using %.C that is different
241 than a C rule using %.c. GNU make will consider these to be the
242 same rule and will issue a warning.
243
244 SAMBA/NTFS/VFAT:
245
246 I have not had any success building the debug version of this
247 package using SAMBA as my file server. The reason seems to be
248 related to the way VC++ 4.0 changes the case name of the pdb
249 filename it is passed on the command line. It seems to change
250 the name always to to lower case. I contend that the VC++
251 compiler should not change the casename of files that are passed
252 as arguments on the command line. I don't think this was a
253 problem in MSVC 2.x, but I know it is a problem in MSVC 4.x.
254
255 The package builds fine on VFAT and NTFS filesystems.
256
257 Most all of the development I have done to date has been using
258 NTFS and long file names. I have not done any considerable work
259 under VFAT. VFAT users may wish to be aware that this port of
260 make does respect case sensitivity.
261
262 FAT:
263
264 Version 3.76 added support for FAT filesystems. Make works
265 around some difficulties with stat'ing of files and caching of
266 filenames and directories internally.
267
268 Bug reports:
269
270 Please submit bugs via the normal bug reporting mechanism which
271 is described in the GNU make manual and the base README.
272
274 -------------------------------------------------------------------------------
275 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
276 2006 Free Software Foundation, Inc.
277 This file is part of GNU Make.
278
279 GNU Make is free software; you can redistribute it and/or modify it under the
280 terms of the GNU General Public License as published by the Free Software
281 Foundation; either version 2, or (at your option) any later version.
282
283 GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
284 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
285 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
286
287 You should have received a copy of the GNU General Public License along with
288 GNU Make; see the file COPYING. If not, write to the Free Software
289 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
290