README.Amiga
1Short: Port of GNU make with SAS/C (no ixemul.library required)
2Author: GNU, Amiga port by Aaron "Optimizer" Digulla
3Uploader: Aaron "Optimizer" Digulla (digulla@fh-konstanz.de)
4Type: dev/c
5
6This is a pure Amiga port of GNU make. It needs no extra libraries or
7anything. It has the following features (in addition to any features of
8GNU 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 (i.e., "make@@\" is illegal).
29 Also be careful that there is a space after the "\" (i.e., 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
34BUGS:
35- The line
36
37 dummy.h : src/*.c
38
39tries to make dummy.h from "src/*.c" (i.e., no wildcard-expansion takes
40place). You have to use "$(wildcard src/*.c)" instead.
41
42COMPILING FROM SCRATCH
43----------------------
44
45To recompile, you need SAS/C 6.51.
46
47As of GNU make 4.3, the build environment has been cleaned up and alternate
48make files (including smakefiles) have been removed. If you have an existing
49version of GNU make available you _should_ be able to run:
50
51 make -f Basic.mk
52
53However this is untested.
54
55If you have an Amiga system and would like to collaborate on getting
56bootstrapping to work properly please contact bug-make@gnu.org.
57
58INSTALLATION
59
60Copy make somewhere in your search path (e.g., sc:c or sc:bin).
61If you plan to use recursive makes, install make resident:
62
63 Resident make Add
64
65
66-------------------------------------------------------------------------------
67Copyright (C) 1995-2022 Free Software Foundation, Inc.
68This file is part of GNU Make.
69
70GNU Make is free software; you can redistribute it and/or modify it under the
71terms of the GNU General Public License as published by the Free Software
72Foundation; either version 3 of the License, or (at your option) any later
73version.
74
75GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
76WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
77A PARTICULAR PURPOSE. See the GNU General Public License for more details.
78
79You should have received a copy of the GNU General Public License along with
80this program. If not, see <http://www.gnu.org/licenses/>.
81
README.customs
1 -*-indented-text-*-
2
3GNU make can utilize the Customs library, distributed with Pmake, to
4provide builds distributed across multiple hosts.
5
6In order to utilize this capability, you must first download and build
7the Customs library. It is contained in the Pmake distribution, which
8can be obtained at:
9
10 ftp://ftp.icsi.berkeley.edu/pub/ai/stolcke/software/
11
12This integration was tested (superficially) with Pmake 2.1.33.
13
14
15BUILDING CUSTOMS
16----------------
17
18First, build pmake and Customs. You need to build pmake first, because
19Customs require pmake to build. Unfortunately, this is not trivial;
20please see the pmake and Customs documentation for details. The best
21place to look for instructions is in the pmake-2.1.33/INSTALL file.
22
23Note that the 2.1.33 Pmake distribution comes with a set of patches to
24GNU make, distributed in the pmake-2.1.33/etc/gnumake/ directory. These
25patches are based on GNU make 3.75 (there are patches for earlier
26versions of GNU make, also). The parts of this patchfile which relate
27directly to Customs support have already been incorporated into this
28version of GNU make, so you should _NOT_ apply the patch file.
29
30However, there are a few non-Customs specific (as far as I could tell)
31changes here which are not incorporated (for example, the modification
32to try expanding -lfoo to libfoo.so). If you rely on these changes
33you'll need to re-apply them by hand.
34
35Install the Customs library and header files according to the
36documentation. You should also install the man pages (contrary to
37comments in the documentation, they weren't installed automatically for
38me; I had to cd to the 'pmake-2.1.33/doc' directory and run 'pmake
39install' there directly).
40
41
42BUILDING GNU MAKE
43-----------------
44
45Once you've installed Customs, you can build GNU make to use it. When
46configuring GNU make, merely use the '--with-customs=DIR' option.
47Provide the directory containing the 'lib' and 'include/customs'
48subdirectories as DIR. For example, if you installed the customs
49library in /usr/local/lib and the headers in /usr/local/include/customs,
50then you'd pass '--with-customs=/usr/local' as an option to configure.
51
52Run make (or use build.sh) normally to build GNU make as described in
53the INSTALL file.
54
55See the documentation for Customs for information on starting and
56configuring Customs.
57
58
59INVOKING CUSTOMS-IZED GNU MAKE
60-----------------------------
61
62One thing you should be aware of is that the default build environment
63for Customs requires root permissions. Practically, this means that GNU
64make must be installed setuid root to use Customs.
65
66If you don't want to do this, you can build Customs such that root
67permissions are not necessary. Andreas Stolcke <stolcke@speech.sri.com>
68writes:
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
81PROBLEMS
82--------
83
84SunOS 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
98-------------------------------------------------------------------------------
99Copyright (C) 1998-2022 Free Software Foundation, Inc.
100This file is part of GNU Make.
101
102GNU Make is free software; you can redistribute it and/or modify it under the
103terms of the GNU General Public License as published by the Free Software
104Foundation; either version 3 of the License, or (at your option) any later
105version.
106
107GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
108WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
109A PARTICULAR PURPOSE. See the GNU General Public License for more details.
110
111You should have received a copy of the GNU General Public License along with
112this program. If not, see <http://www.gnu.org/licenses/>.
113
README.DOS.template
1Port of GNU Make to 32-bit protected mode on MSDOS and MS-Windows.
2
3Builds with DJGPP v2 port of GNU C/C++ compiler and utilities.
4
5
6New (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 "check:" still need additional programs, though,
31 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
37To 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
47To 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. If you have a working Make already, you can run:
59
60 make -f Basic.mk
61
62 3. If you don't have a working Make already you can bootstrap one
63 by running:
64
65 .\builddos.bat
66
67 4. If you are building from outside of the source directory, you
68 need to tell Make where the sources are, like this:
69
70 make -f c:/djgpp/gnu/make/Basic.mk SRCDIR=c:/djgpp/gnu/make
71
72 or:
73
74 c:/djgpp/gnu/make/builddos.bat c:/djgpp/gnu/make
75
76 5. To run the test suite, type "make check". This requires a Unix
77 shell (I used the DJGPP port of Bash 2.03), Perl, Sed, Fileutils
78 and Sh-utils.
79
80 6. To install copy make.exe to the preferred location.
81
82 Since GNU make 4.3, support for customized platform installations
83 has been removed. If you'd like to collaborate on reinstating
84 these capabilities, contact bug-make@gnu.org.
85
86
87Notes:
88-----
89
90 1. The shell issue.
91
92 This is probably the most significant improvement, first
93 introduced in the port of GNU Make 3.75.
94
95 The original behavior of GNU Make is to invoke commands
96 directly, as long as they don't include characters special to
97 the shell or internal shell commands, because that is faster.
98 When shell features like redirection or filename wildcards are
99 involved, Make calls the shell.
100
101 This port supports both DOS shells (the stock COMMAND.COM and its
102 4DOS/NDOS replacements), and Unix-style shells (tested with the
103 venerable Stewartson's 'ms_sh' 2.3 and the DJGPP port of 'bash' by
104 Daisuke Aoyama <jack@st.rim.or.jp>).
105
106 When the $SHELL variable points to a Unix-style shell, Make
107 works just like you'd expect on Unix, calling the shell for any
108 command that involves characters special to the shell or
109 internal shell commands. The only difference is that, since
110 there is no standard way to pass command lines longer than the
111 infamous DOS 126-character limit, this port of Make writes the
112 command line to a temporary disk file and then invokes the shell
113 on that file.
114
115 If $SHELL points to a DOS-style shell, however, Make will not
116 call it automatically, as it does with Unix shells. Stock
117 COMMAND.COM is too dumb and would unnecessarily limit the
118 functionality of Make. For example, you would not be able to
119 use long command lines in commands that use redirection or
120 pipes. Therefore, when presented with a DOS shell, this port of
121 Make will emulate most of the shell functionality, like
122 redirection and pipes, and shall only call the shell when a
123 batch file or a command internal to the shell is invoked. (Even
124 when a command is an internal shell command, Make will first
125 search the $PATH for it, so that if a Makefile calls 'mkdir',
126 you can install, say, a port of GNU 'mkdir' and have it called
127 in that case.)
128
129 The key to all this is the extended functionality of 'spawn' and
130 'system' functions from the DJGPP library; this port just calls
131 'system' where it would invoke the shell on Unix. The most
132 important aspect of these functions is that they use a special
133 mechanism to pass long (up to 16KB) command lines to DJGPP
134 programs. In addition, 'system' emulates some internal
135 commands, like 'cd' (so that you can now use forward slashes
136 with it, and can also change the drive if the directory is on
137 another drive). Another aspect worth mentioning is that you can
138 call Unix shell scripts directly, provided that the shell whose
139 name is mentioned on the first line of the script is installed
140 anywhere along the $PATH. It is impossible to tell here
141 everything about these functions; refer to the DJGPP library
142 reference for more details.
143
144 The $(shell) built-in is implemented in this port by calling
145 'popen'. Since 'popen' calls 'system', the above considerations
146 are valid for $(shell) as well. In particular, you can put
147 arbitrary complex commands, including pipes and redirection,
148 inside $(shell), which is in many cases a valid substitute for
149 the Unix-style command substitution (`command`) feature.
150
151
152 2. "SHELL=/bin/sh" -- or is it?
153
154 Many Unix Makefiles include a line which sets the SHELL, for
155 those versions of Make which don't have this as the default.
156 Since many DOS systems don't have 'sh' installed (in fact, most
157 of them don't even have a '/bin' directory), this port takes
158 such directives with a grain of salt. It will only honor such a
159 directive if the basename of the shell name (like 'sh' in the
160 above example) can indeed be found in the directory that is
161 mentioned in the SHELL= line ('/bin' in the above example), or
162 in the current working directory, or anywhere on the $PATH (in
163 that order). If the basename doesn't include a filename
164 extension, Make will look for any known extension that indicates
165 an executable file (.exe, .com, .bat, .btm, .sh, and even .sed
166 and .pl). If any such file is found, then $SHELL will be
167 defined to the exact pathname of that file, and that shell will
168 hence be used for the rest of processing. But if the named
169 shell is *not* found, the line which sets it will be effectively
170 ignored, leaving the value of $SHELL as it was before. Since a
171 lot of decisions that this port makes depend on the gender of
172 the shell, I feel it doesn't make any sense to tailor Make's
173 behavior to a shell which is nowhere to be found.
174
175 Note that the above special handling of "SHELL=" only happens
176 for Makefiles; if you set $SHELL in the environment or on the
177 Make command line, you are expected to give the complete
178 pathname of the shell, including the filename extension.
179
180 The default value of $SHELL is computed as on Unix (see the Make
181 manual for details), except that if $SHELL is not defined in the
182 environment, $COMSPEC is used. Also, if an environment variable
183 named $MAKESHELL is defined, it takes precedence over both
184 $COMSPEC and $SHELL. Note that, unlike Unix, $SHELL in the
185 environment *is* used to set the shell (since on MSDOS, it's
186 unlikely that the interactive shell will not be suitable for
187 Makefile processing).
188
189 The bottom line is that you can now write Makefiles where some
190 of the targets require a real (i.e. Unix-like) shell, which will
191 nevertheless work when such shell is not available (provided, of
192 course, that the commands which should always work, don't
193 require such a shell). More important, you can convert Unix
194 Makefiles to MSDOS and leave the line which sets the shell
195 intact, so that people who do have Unixy shell could use it for
196 targets which aren't converted to DOS (like 'install' and
197 'uninstall', for example).
198
199
200 3. Default directories.
201
202 GNU Make knows about standard directories where it searches for
203 library and include files mentioned in the Makefile. Since
204 MSDOS machines don't have standard places for these, this port
205 will search ${DJDIR}/lib and ${DJDIR}/include respectively.
206 $DJDIR is defined automatically by the DJGPP startup code as the
207 root of the DJGPP installation tree (unless you've tampered with
208 the DJGPP.ENV file). This should provide reasonable default
209 values, unless you moved parts of DJGPP to other directories.
210
211
212 4. Letter-case in filenames.
213
214 If you run Make on Windows 9x, you should be aware of the
215 letter-case issue. Make is internally case-sensitive, but all
216 file operations are case-insensitive on Windows 9x, so
217 e.g. files 'FAQ', 'faq' and 'Faq' all refer to the same file, as
218 far as Windows is concerned. The underlying DJGPP C library
219 functions honor the letter-case of the filenames they get from
220 the OS, except that by default, they down-case 8+3 DOS filenames
221 which are stored in upper case in the directory and would break
222 many Makefiles otherwise. (The details of which filenames are
223 converted to lower case are explained in the DJGPP libc docs,
224 under the '_preserve_fncase' and '_lfn_gen_short_fname'
225 functions, but as a thumb rule, any filename that is stored in
226 upper case in the directory, is a valid DOS 8+3 filename and
227 doesn't include characters invalid on MSDOS FAT filesystems,
228 will be automatically down-cased.) User reports that I have
229 indicate that this default behavior is generally what you'd
230 expect; however, your input is most welcome.
231
232 In any case, if you hit a situation where you must force Make to
233 get the 8+3 DOS filenames in upper case, set FNCASE=y in the
234 environment or in the Makefile.
235
236
237 5. DOS-style pathnames.
238
239 There are a lot of places throughout the program sources which
240 make implicit assumptions about the pathname syntax. In
241 particular, the directories are assumed to be separated by '/',
242 and any pathname which doesn't begin with a '/' is assumed to be
243 relative to the current directory. This port attempts to
244 support DOS-style pathnames which might include the drive letter
245 and use backslashes instead of forward slashes. However, this
246 support is not complete; I feel that pursuing this support too
247 far might break some more important features, particularly if
248 you use a Unix-style shell (where a backslash is a quote
249 character). I only consider support of backslashes desirable
250 because some Makefiles invoke non-DJGPP programs which don't
251 understand forward slashes. A notable example of such programs
252 is the standard programs which come with MSDOS. Otherwise, you
253 are advised to stay away from backslashes whenever possible. In
254 particular, filename globbing won't work on pathnames with
255 backslashes, because the GNU 'glob' library doesn't support them
256 (backslash is special in filename wildcards, and I didn't want
257 to break that).
258
259 One feature which *does* work with backslashes is the filename-
260 related built-in functions such as $(dir), $(notdir), etc.
261 Drive letters in pathnames are also fully supported.
262
263
264
265Bug reports:
266-----------
267
268 Bugs that are clearly related to the MSDOS/DJGPP port should be
269 reported first on the comp.os.msdos.djgpp news group (if you cannot
270 post to Usenet groups, write to the DJGPP mailing list,
271 <djgpp@delorie.com>, which is an email gateway into the above news
272 group). For other bugs, please follow the procedure explained in
273 the "Bugs" chapter of the Info docs. If you don't have an Info
274 reader, look up that chapter in the 'make.i1' file with any text
275 browser/editor.
276
277
278 Enjoy,
279 Eli Zaretskii <eliz@is.elta.co.il>
280
281
282-------------------------------------------------------------------------------
283Copyright (C) 1996-2022 Free Software Foundation, Inc.
284This file is part of GNU Make.
285
286GNU Make is free software; you can redistribute it and/or modify it under the
287terms of the GNU General Public License as published by the Free Software
288Foundation; either version 3 of the License, or (at your option) any later
289version.
290
291GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
292WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
293A PARTICULAR PURPOSE. See the GNU General Public License for more details.
294
295You should have received a copy of the GNU General Public License along with
296this program. If not, see <http://www.gnu.org/licenses/>.
297
README.git
1 -*-text-*-
2
3-------------------------------------------------------------------------------
4Copyright (C) 2002-2022 Free Software Foundation, Inc.
5This file is part of GNU Make.
6
7GNU Make is free software; you can redistribute it and/or modify it under the
8terms of the GNU General Public License as published by the Free Software
9Foundation; either version 3 of the License, or (at your option) any later
10version.
11
12GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License along with
17this program. If not, see <https://www.gnu.org/licenses/>.
18-------------------------------------------------------------------------------
19
20Obtaining Git Code
21------------------
22
23This seems redundant, since if you're reading this you most likely have
24already performed this step; however, for completeness, you can obtain the GNU
25make source code via Git from the FSF's Savannah project
26<https://savannah.gnu.org/projects/make/>:
27
28 $ git clone git://git.savannah.gnu.org/make.git
29
30
31Changes using Git
32-----------------
33
34If you do not have push privileges to the GNU make Git repository, see the
35README file section "Submitting Patches" for information.
36
37If you have push privileges to the GNU make Git repository keep this
38information in mind:
39
40Starting with GNU make 4.0 we no longer keep a separate ChangeLog file in
41source control. We use the Gnulib git-to-changelog conversion script to
42convert the Git comments into ChangeLog-style entries for release. As a
43result, please format your Git comments carefully so they will look clean
44after conversion. In particular, each line of your comment will have a TAB
45added before it so be sure your comment lines are not longer than 72
46characters; prefer 70 or less. Please use standard ChangeLog formats for
47your commit messages (sans the leading TAB of course).
48
49Rule #1: Don't rewrite pushed history (don't use "git push --force").
50
51Typical simple workflow might be:
52
53 * Edit files / make / make check
54 * Use "git status" and "git diff" to verify your changes
55 * Use "git add" to stage the changes you want to make
56 * Use "git commit" to commit the staged changes to your local repository
57 * Use "git pull" to accept & merge new changes from the Savannah repository
58 * Use "git push" to push your commits back to the Savannah repository
59
60For Emacs users, there are many options for Git integration but I strongly
61recommend the Magit package: https://www.emacswiki.org/emacs/Magit
62It makes the workflow much clearer, and has advanced features such as
63constructing multiple commits from various files and even from different
64diff chunks in the same file. There is a video available which helps a lot.
65
66
67Coding Standards
68----------------
69
70GNU make code adheres to the GNU Coding Standards. Please use only spaces and
71no TAB characters in source code.
72
73Additionally, GNU make is a foundational bootstrap package for the GNU
74project; as such it is conservative about language features it expects.
75However, GNU make does rely on the Gnulib portability library, and Gnulib
76currently requires a ISO C99 compiler. So features in ISO C99 can be
77assumed.
78
79
80Building From Git for POSIX
81---------------------------
82
83To build GNU make from Git on POSIX systems such as GNU/Linux, you will
84need to install the following extra software:
85
86* autoconf
87* automake >= 1.16.1
88* gettext
89* autopoint
90* pkg-config
91* texinfo (for makeinfo)
92* GCC
93* GNU make (POSIX make is not sufficient)
94
95And any tools that those utilities require (GNU m4, etc.)
96
97To run the tests you must install Perl.
98
99To build a release you'll need to install lzip.
100
101GNU make requires Gnulib to provide some facilities. If you want to maintain
102a local installation of gnulib you can set GNULIB_SRCDIR to point to it.
103Otherwise, ./bootstrap will obtain a clone for you.
104
105Unfortunately due to issues with gnulib's getloadavg, you must have automake
1061.16.1 or above. This version may not yet be available through GNU/Linux
107package managers. If you need to install from source be sure to set
108ACLOCAL_PATH to point to the pkg-config location (e.g., /usr/share/aclocal).
109
110If you want to build from Git with a non-GCC compiler, add "MAKE_CFLAGS=" to
111your make command line (or at least remove any flags your compiler does not
112support).
113
114When building from Git you must build in the source directory: "VPATH
115builds" from remote directories are not supported. Once you've created
116a distribution, of course, you can unpack it and do a VPATH build from
117there.
118
119After checking out the code, you will need to run the bootstrap script:
120
121 $ ./bootstrap
122
123At this point you have successfully brought your Git copy of the GNU
124make source directory up to the point where it can be treated
125more-or-less like the official package you would get from ftp.gnu.org.
126That is, you can just run:
127
128 $ ./configure
129 $ make check
130
131to build and test GNU make.
132
133NOTE! This method builds GNU make in "maintainer mode". Make programs built
134 in this mode it will be slower, possibly MUCH slower: there are various
135 sanity checks enabled. Further this mode assumes a modern GCC, GNU
136 libc, and well-formed system headers and enables a high level of
137 warnings AND enables -Werror to turn warnings into failures.
138
139 If you want to build from Git with "maintainer mode" disabled, add
140 "MAKE_MAINTAINER_MODE=" to the make command line. If you want to turn
141 off the extra warning flags, add "MAKE_CFLAGS=" to the make command
142 line.
143
144 For example:
145 $ ./configure
146 $ make check MAKE_MAINTAINER_MODE= MAKE_CFLAGS=
147 $ make install
148
149
150Building From Git for Windows
151-----------------------------
152
153If you have a UNIX emulation like CYGWIN you can opt to run the general
154build procedure above; it will work. Consult README.W32.template for
155information on options you might want to use when running ./configure.
156
157If you can't or don't want to do that, then first run the .\bootstrap.bat
158script to prime your Git workspace:
159
160 > .\bootstrap.bat
161
162Next, rename the file README.W32.template to README.W32 and follow those
163instructions.
164
165
166Debugging and Testing
167---------------------
168
169These instructions have been tested on GNU systems. I have no idea if they
170work on non-GNU systems (Windows, MacOS, etc.)
171
172* Alternate Configurations:
173 The maintMakefile has a rule for running configure with various different
174 options, with and without packages. Run:
175
176 make check-alt-config
177
178* Valgrind:
179 You can run all tests under valgrind by passing the -memcheck option:
180
181 (cd tests && ./run_make_tests -make ../make -memcheck)
182
183 Note, this is slow! Also some tests will fail because of invoking valgrind.
184
185* ASAN:
186 You can build with ASAN and run tests, like this:
187
188 make clean
189 make -j8 CFLAGS='-ggdb3 -fsanitize=address' LDFLAGS='-ggdb3 -fsanitize=address'
190 (cd tests && ./run_make_tests -make ../make)
191
192 Note that ASAN is reporting many more errors than valgrind. I don't know
193 which one is wrong: I haven't looked at them closely.
194
195
196Creating a Package
197------------------
198
199Once you have performed the above steps (including the configuration and
200build) you can create a GNU make package. This is very simple, just
201run:
202
203 $ make dist-gzip
204
205and, if you like:
206
207 $ make dist-lzip
208
209Even better, you should run this:
210
211 $ make distcheck
212
213Which will build both .gz and .lz package files, then unpack one into a
214temporary location, try to build it and repack it, then verifying that
215everything works, you get the same results, _and_ no extraneous files are
216left over after the "distclean" rule.
217
218This package can be unpacked and built to give a "normal" (non-maintainer
219mode) result.
220
221
222Steps to Release
223----------------
224
225Here are the things that need to be done (in more or less this order)
226before making an official release. If something breaks such that you need to
227change code, be sure to start over again sufficiently that everything is
228consistent (that's why we don't finalize the Git tag, etc. until the end).
229
230 * Update the configure.ac file with the new release number.
231 * Update the EDITION value in the doc/make.texi file.
232 * Update the NEWS file with the release number and date.
233 * Ensure the Savannah bug list URL in the NEWS file uses the correct
234 "Fixed Release" ID number.
235 * Run "make distcheck" to be sure it all works.
236 * Run "make check-alt-config" to be sure alternative configurations work
237 * Run "make update-makeweb" to get a copy of the GNU make web pages
238 * Run "make update-gnuweb" to get a copy of the GNU website boilerplate pages
239 * Update the web page boilerplate if necessary:
240 ../gnu-www/www/server/standards/patch-from-parent ../make-web/make.html \
241 ../gnu-www/www/server/standards/boilerplate.html
242 * Run "make gendocs" (requires gnulib) to generate the manual files for
243 the GNU make web pages.
244 * Follow the directions from gendocs for the web page repository
245 * run "make tag-release" to create a Git tag for the release
246 * Push everything:
247 git push --tags origin master
248
249Manage the Savannah project for GNU make:
250
251 >>> This is only for real releases, not release candidate builds <<<
252
253 * In Savannah modify the "Value", "Rank", and "Description" values for the
254 current "SCM" entry in both "Component Version" and "Fix Release" fields
255 to refer to the new release. The "Rank" field should be 10 less than the
256 previous release so it orders properly.
257 * In Savannah create a new entry for the "Component Version" and "Fix
258 Release" fields:
259 - Value: SCM
260 - Rank: 20
261 - Descr: Issues found in code retrieved from Source Code Management (Git), rather than a distributed version. Please include the SHA you are working with.
262
263 - Descr: Fixed in Source Code Management (Git). The fix will be included in the next release of GNU make.
264
265Start the next release:
266
267 * Update configure.ac and add a ".90" to the release number.
268 * Update the NEWS file with a new section for the release / date.
269 * Update the Savannah URL for the bugs fixed in the NEWS section.
270
271
272Publishing a Package
273--------------------
274
275In order to publish a package on the FSF FTP site, either the release
276site ftp://ftp.gnu.org, or the prerelease site ftp://alpha.gnu.org, you
277first need to have my GPG private key and my passphrase to unlock it.
278And, you can't have them! So there! But, just so I remember here's
279what to do:
280
281 Make sure the "Steps to Release" are complete and committed and tagged.
282
283 git clone git://git.savannah.gnu.org/make.git make-release
284
285 cd make-release
286
287 <run the commands above to build the release>
288
289 make upload-alpha # for alpha.gnu.org (pre-releases)
290 -OR-
291 make upload-ftp # for ftp.gnu.org (official releases)
292
293Depending on your distribution (whether GnuPG is integrated with your keyring
294etc.) it will either pop up a window asking for your GPG key passphrase one
295time, or else it will use the CLI to ask for the GPG passphrase _THREE_ times.
296Sigh.
297
298
299For both final releases and pre-releases, send an email with the URL of
300the package to the GNU translation robot to allow the translators to
301work on it:
302
303 <coordinator@translationproject.org>
304
305
306Where to Announce
307-----------------
308
309Create the announcement in a text file, using 'git shortlog',
310then sign it with GPG:
311
312 gpg --clearsign <announcement.txt>
313
314Or, use your mail client's PGP/GPG signing capabilities.
315
316Announce the release:
317
318 * For release candidate builds:
319 To: bug-make@gnu.org
320 CC: coordinator@translationproject.org
321 BCC: help-make@gnu.org, make-w32@gnu.org, make-alpha@gnu.org
322
323 * For release builds
324 To: info-gnu@gnu.org, bug-make@gnu.org
325 CC: coordinator@translationproject.org
326 BCC: help-make@gnu.org, make-w32@gnu.org, make-alpha@gnu.org
327
328 * Add a news item to the Savannah project site.
329 * Add an update to freecode.com (nee freshmeat.net)
330
331
332Appendix A - For The Brave
333--------------------------
334
335For those of you who trust me implicitly, or are just brave (or
336foolhardy), here is a canned sequence of commands to build a GNU make
337distribution package from a virgin Git source checkout (assuming all the
338prerequisites are available of course).
339
340This list is eminently suitable for a quick swipe o' the mouse and a
341swift click o' mouse-2 into an xterm. Go for it!
342
343For a debugging version:
344
345./bootstrap && ./configure CFLAGS=-g && make check
346
347For a release version
348
349./bootstrap && ./configure && make check
350
README.OS2.template
1Port of GNU make to OS/2.
2
3Features of GNU make that do not work under OS/2:
4 - remote job execution
5 - dynamic load balancing
6
7
8Special features of the OS/2 version:
9
10Due to the fact that some people might want to use sh syntax in
11Makefiles while others might want to use OS/2's native shell cmd.exe,
12GNU make supports both shell types. The following list defines the order
13that 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. Like
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
23Note: - 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
30COMPILATION OF GNU MAKE FOR OS/2:
31
32I. ***** 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
44II. ***** REQUIREMENTS FOR THE COMPILATION *****
45
46A 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
66If you want to recreate the configuration files (developers only!)
67you need also: GNU m4 1.4, autoconf 2.59, automake 1.9.6 (or compatible)
68
69
70III. ***** 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
82b) 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 0x6000" because the default
87 stack size is far to small and make will not work properly!
88
89Recommended 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 0x6000"
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
100Note: If you use gcc 2.9.x I recommend to set also LIBS="-lgcc"
101
102Note: You can add -DNO_CMD_DEFAULT and -DNO_CHDIR2 to CPPFLAGS.
103 See section I. for details.
104
105
106IV. ***** NLS support *****
107
108GNU make has NLS (National Language Support), with the following
109caveats:
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
114Therefore, if you wish to enable the internationalization features of
115GNU make you must install GNU gettext on your system before configuring
116GNU make.
117
118You can choose the languages to be installed. To install support for
119English, German and French only enter:
120
121 export LINGUAS="en de fr"
122
123If you don't specify LINGUAS all languages are installed.
124
125If you don't want NLS support (English only) use the option
126--disable-nls for the configure script. Note if GNU gettext is not
127installed then NLS will not be enabled regardless of this flag.
128
129
130V. ***** Running the make test suite *****
131
132To run the included make test suite you have to set
133
134 CPPFLAGS="-D__ST_MT_ERRNO__ -DNO_CMD_DEFAULT -DNO_CHDIR2"
135
136before you compile make. This is due to some restrictions of the
137testsuite itself. -DNO_CMD_DEFAULT causes make to use /bin/sh as default
138shell in every case. Normally you could simply set MAKESHELL="/bin/sh"
139to do this but the testsuite ignores the environment. -DNO_CHDIR2 causes
140make not to use drive letters for directory names (i.e. _chdir2() and
141_getcwd2() are NOT used). The testsuite interprets the whole output of
142make, especially statements like make[1]: Entering directory
143'C:/somewhere/make-3.79.1/tests' where the testsuite does not expect the
144drive letter. This would be interpreted as an error even if there is
145none.
146
147To 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 0x6000"
152 export RANLIB="echo"
153 ./configure --prefix=x:/usr --disable-nls
154 make AR=emxomfar
155 make check
156
157All tests should work fine with the exception of one of the "INCLUDE_DIRS"
158tests which will fail if your /usr/include directory is on a drive different
159from the make source tree.
160
161
162-------------------------------------------------------------------------------
163Copyright (C) 2003-2022 Free Software Foundation, Inc.
164This file is part of GNU Make.
165
166GNU Make is free software; you can redistribute it and/or modify it under the
167terms of the GNU General Public License as published by the Free Software
168Foundation; either version 3 of the License, or (at your option) any later
169version.
170
171GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
172WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
173A PARTICULAR PURPOSE. See the GNU General Public License for more details.
174
175You should have received a copy of the GNU General Public License along with
176this program. If not, see <http://www.gnu.org/licenses/>.
177
README.template
1This directory contains the %VERSION% release of GNU Make.
2
3See the file NEWS for the user-visible changes from previous releases.
4In addition, there have been bugs fixed.
5
6Please check the system-specific notes below for any caveats related to your
7operating system.
8
9If you are trying to build GNU make from a Git clone rather than a downloaded
10source distribution, see the README.git file for instructions.
11
12For source distribution building and installation instructions, see the file
13INSTALL.
14
15If you need to build GNU Make and have no other 'make' program to use, you can
16use the shell script 'build.sh' instead. To do this, first run 'configure' as
17described in INSTALL. Then, instead of typing 'make' to build the program,
18type 'sh build.sh'. This should compile the program in the current directory.
19Then you will have a Make program that you can use for './make install', or
20whatever else.
21
22Some systems' Make programs cannot process the Makefile for GNU Make. If you
23get errors from your system's Make when building GNU Make, try using
24'build.sh' instead.
25
26
27GNU Make is free software. See the file COPYING for copying conditions.
28GNU Make is copyright by the Free Software Foundation. Copyright notices
29condense sequential years into a range; e.g. "1987-1994" means all years
30from 1987 to 1994 inclusive.
31
32Downloading
33-----------
34
35GNU Make can be obtained in many different ways. See a description here:
36
37 https://www.gnu.org/software/software.html
38
39
40Documentation
41-------------
42
43GNU make is fully documented in the GNU Make manual, which is contained
44in this distribution as the file make.texinfo. You can also find
45on-line and preformatted (PostScript and DVI) versions at the FSF's web
46site. There is information there about ordering hardcopy documentation.
47
48 https://www.gnu.org/
49 https://www.gnu.org/doc/doc.html
50 https://www.gnu.org/manual/manual.html
51
52
53Development
54-----------
55
56GNU Make development is hosted by Savannah, the FSF's online development
57management tool. Savannah is here:
58
59 https://savannah.gnu.org
60
61And the GNU Make development page is here:
62
63 https://savannah.gnu.org/projects/make/
64
65You can find most information concerning the development of GNU Make at
66this site.
67
68
69Bug Reporting
70-------------
71
72You can send GNU make bug reports to <bug-make@gnu.org>. Please see the
73section of the GNU make manual entitled 'Problems and Bugs' for
74information on submitting useful and complete bug reports.
75
76You can also use the online bug tracking system in the Savannah GNU Make
77project to submit new problem reports or search for existing ones:
78
79 https://savannah.gnu.org/bugs/?group=make
80
81If you need help using GNU make, try these forums:
82
83 help-make@gnu.org
84 help-utils@gnu.org
85 news:gnu.utils.help
86 news:gnu.utils.bug
87
88
89Submitting Patches
90------------------
91
92If you'd like to propose a change to GNU make, you can provide a patch with
93your changes. If you are making your changes in a Git workspace you can run
94"git format-patch" to create a patch file. If not, you can use the diff(1)
95utility to create a patch file; please use "diff -u".
96
97Once you have a patch you can submit it in any of these ways:
98
99 * Create a bug on Savannah and add the patch as an attachment:
100 https://savannah.gnu.org/bugs/?group=make&func=additem
101
102 * Send the patch via email to <bug-make@gnu.org>: be sure to add it as an
103 attachment to avoid interference by email processors.
104
105Be aware that all non-trivial changes proposed for GNU make require FSF
106copyright paperwork to be completed before they can be accepted. Contact
107<bug-make@gnu.org> for help.
108
109
110Git Access
111----------
112
113The GNU make source repository is available via Git from the GNU Savannah Git
114server; look here for details:
115
116 https://savannah.gnu.org/git/?group=make
117
118Please note: you won't be able to build GNU make from Git without installing
119appropriate maintainer's tools, such as GNU m4, automake, autoconf, Perl, GNU
120make, and GCC.
121
122See the README.git file for instructions on how to build GNU make once these
123tools are available. We make no guarantees about the contents or quality of
124the latest code in the Git repository: it is not unheard of for code that is
125known to be broken to be checked in. Use at your own risk.
126
127
128System-specific Notes
129---------------------
130
131It has been reported that the XLC 1.2 compiler on AIX 3.2 is buggy such
132that if you compile make with 'cc -O' on AIX 3.2, it will not work
133correctly. It is said that using 'cc' without '-O' does work.
134
135The standard /bin/sh on SunOS 4.1.3_U1 and 4.1.4 is broken and cannot be
136used to configure GNU make. Please install a different shell such as
137bash or pdksh in order to run "configure". See this message for more
138information:
139 https://mail.gnu.org/archive/html/bug-autoconf/2003-10/msg00190.html
140
141One area that is often a problem in configuration and porting is the code
142to check the system's current load average. To make it easier to test and
143debug this code, you can do 'make check-loadavg' to see if it works
144properly on your system. (You must run 'configure' beforehand, but you
145need not build Make itself to run this test.)
146
147Another potential source of porting problems is the support for large
148files (LFS) in configure for those operating systems that provide it.
149Please report any bugs that you find in this area. If you run into
150difficulties, then as a workaround you should be able to disable LFS by
151adding the '--disable-largefile' option to the 'configure' script.
152
153On systems that support micro- and nano-second timestamp values and
154where stat(2) provides this information, GNU make will use it when
155comparing timestamps to get the most accurate possible result. However,
156note that many current implementations of tools that *set* timestamps do
157not preserve micro- or nano-second granularity. This means that "cp -p"
158and other similar tools (tar, etc.) may not exactly duplicate timestamps
159with micro- and nano-second granularity on some systems. If your build
160system contains rules that depend on proper behavior of tools like "cp
161-p", you should consider using the .LOW_RESOLUTION_TIME pseudo-target to
162force make to treat them properly. See the manual for details.
163
164
165Ports
166-----
167
168 - See README.customs for details on integrating GNU make with the
169 Customs distributed build environment from the Pmake distribution.
170
171 - See README.VMS for details about GNU Make on OpenVMS.
172
173 - See README.Amiga for details about GNU Make on AmigaDOS.
174
175 - See README.W32 for details about GNU Make on Windows NT, 95, or 98.
176
177 - See README.DOS for compilation instructions on MS-DOS and MS-Windows
178 using DJGPP tools.
179
180 A precompiled binary of the MSDOS port of GNU Make is available as part
181 of DJGPP; see the WWW page https://www.delorie.com/djgpp/ for more
182 information.
183
184 The Cygwin project maintains its own port of GNU make. That port may have
185 patches which are not present in this version. If you are using Cygwin
186 you should use their version of GNU make, and if you have questions about
187 it you should start by asking on those mailing lists and forums.
188
189Please note there are two _separate_ ports of GNU make for Microsoft
190systems: a native Windows tool built with (for example) MSVC or Cygwin,
191and a DOS-based tool built with DJGPP. Please be sure you are looking
192at the right README!
193
194
195-------------------------------------------------------------------------------
196Copyright (C) 1988-2022 Free Software Foundation, Inc.
197This file is part of GNU Make.
198
199GNU Make is free software; you can redistribute it and/or modify it under the
200terms of the GNU General Public License as published by the Free Software
201Foundation; either version 3 of the License, or (at your option) any later
202version.
203
204GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
205WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
206A PARTICULAR PURPOSE. See the GNU General Public License for more details.
207
208You should have received a copy of the GNU General Public License along with
209this program. If not, see <https://www.gnu.org/licenses/>.
210
README.VMS
1Overview: -*-text-mode-*-
2---------
3
4 This version of GNU make has been tested on:
5 OpenVMS V8.3/V8.4 (Alpha) and V8.4 (Integrity) AND V7.3 (VAX)
6
7 This version of GNU Make is intended to be run from DCL to run
8 make scripts with a special syntax that is described below. It
9 likely will not be able to run unmodified Unix makefiles.
10
11 There is an older implementation of GNU Make that was ported to GNV.
12 Work is now in progress to merge that port to get a single version
13 of GNU Make available. When that merge is done, GNU Make will auto
14 detect that it is running under a POSIX shell and then operate as close to
15 GNU Make on Unix as possible.
16
17 The descriptions below are for running GNU make from DCL or equivalent.
18
19Recipe differences:
20-------------------
21
22 GNU Make for OpenVMS can not currently run native Unix make files because of
23 differences in the implementation.
24
25 I am trying to document the current behavior in this section. This is based
26 on the information in the file NEWS. and running the test suite.
27 TODO: More tests are needed to validate and demonstrate the OpenVMS
28 expected behavior.
29
30 In some cases the older behavior of GNU Make when run from DCL is not
31 compatible with standard makefile behavior.
32
33 This behavior can be changed when running GNU Make from DCL by setting
34 either DCL symbols or logical names of the format GNV$. The settings
35 are enabled with a string starting with one of '1', 'T', or 'E' for "1",
36 "TRUE", or "ENABLE". They are disabled with a '0', 'F', or 'D' for "1",
37 "FALSE", or "DISABLE". If they are not explicitly set to one of these
38 values, then they will be set to their default values.
39
40 The value of the setting DECC$FILENAME_UNIX_REPORT or
41 DECC$FILENAME_UNIX_ONLY will now cause the $(dir x) function to return
42 './' or '[]' as appropriate.
43
44 The name GNV$MAKE_OLD_VMS when enabled will cause GNU Make to behave as
45 much as the older method as can be done with out disabling VMS features.
46 When it is disabled GNU Make have the new behavior which more closely
47 matches Unix Make behavior.
48
49 The default is currently the old behavior when running GNU Make from DCL.
50 In the future this may change. When running make from GNV Bash the new
51 behavior is the default.
52
53 This is a global setting that sets the default behavior for several other
54 options that can be individually changed. Many of the individual settings
55 are to make it so that the self tests for GNU Make need less VMS specific
56 modifications.
57
58 The name GNV$MAKE_COMMA when enabled will cause GNU Make to expect a comma
59 for a path separator and use a comma for the separator for a list of files.
60 When disabled, it will cause GNU Make to use a colon for a path separator
61 and a space for the separator for a list of files. The default is to be
62 enabled if the GNU Make is set to the older behavior.
63
64 The name GNV$MAKE_SHELL_SIM when enabled will cause GNU Make to try to
65 simulate a POSIX shell more closely. The following behaviors occur:
66
67 * Single quotes are converted to double quotes and any double
68 quotes inside of them are doubled. No environment variable expansion
69 is simulated.
70 * A exit command status will be converted to a POSIX Exit
71 where 0 is success and non-zero is failure.
72 * The $ character will cause environment variable expansion.
73 * Environment variables can be set on the command line before a command.
74
75 VMS generally uses logical name search lists instead of path variables
76 where the resolution is handled by VMS independent of the program. Which
77 means that it is likely that nothing will notice if the default path
78 specifier is changed in the future.
79
80 Currently the built in VMS specific macros and recipes depend on the comma
81 being used as a file list separator.
82 TODO: Remove this dependency as other functions in GNU Make depend on a
83 space being used as a separator.
84
85 The format for recipes are a combination of Unix macros, a subset of
86 simulated UNIX commands, some shell emulation, and OpenVMS commands.
87 This makes the resulting makefiles unique to the OpenVMS port of GNU make.
88
89 If you are creating a OpenVMS specific makefile from scratch, you should also
90 look at MMK (Madgoat Make) available at https://github.com/endlesssoftware/mmk
91 MMK uses full OpenVMS syntax and a persistent sub-process is used for the
92 recipe lines, allowing multiple line rules.
93
94 The default makefile search order is "makefile.vms", "gnumakefile",
95 "makefile". TODO: See if that lookup is case sensitive.
96
97 When Make is invoked from DCL, it will create a foreign command
98 using the name of executable image, with any facility prefix removed,
99 for the duration of the make program, so it can be used internally
100 to recursively run make(). The macro MAKE_COMMAND will be set to
101 this foreign command.
102
103 When make is launched from an exec*() command from a C program,
104 the foreign command is not created. The macro MAKE_COMMAND will be
105 set to the actual command passed as argv[0] to the exec*() function.
106
107 If the DCL symbol or logical name GNV$MAKE_USE_MCR exists, then
108 the macro MAKE_COMMAND will be set to be an "MCR" command with the
109 absolute path used by DCL to launch make. The foreign command
110 will not be created.
111
112 The macro MAKE is set to be the same value as the macro MAKE_COMMAND
113 on all platforms.
114
115 Each recipe command is normally run as a separate spawned processes,
116 except for the cases documented below where a temporary DCL command
117 file may be used.
118
119 BUG: Testing has shown that the commands in the temporary command files
120 are not always created properly. This issue is still under investigation.
121
122 Any macros marked as exported are temporarily created as DCL symbols
123 for child images to use. DCL symbol substitution is not done with these
124 commands.
125 Untested: Symbol substitution.
126
127 When a temporary DCL command file is used, DCL symbol substitution
128 will work.
129
130 For VMS 7.3-1 and earlier, command lines are limited to 255 characters
131 or 1024 characters in a command file.
132 For VMS 7.3-2 and later, command lines are limited to 4059 characters
133 or 8192 characters in a command file.
134
135 VMS limits each token of a command line to 256 characters, and limits
136 a command line to 127 tokens.
137
138 Command lines above the limit length are written to a command file
139 in sys$scratch:.
140
141 In order to handle Unix style extensions to VMS DCL, GNU Make has
142 parsed the recipe commands and them modified them as needed. The
143 parser has been re-written to resolve numerous bugs in handling
144 valid VMS syntax and potential buffer overruns.
145
146 The new parser may need whitespace characters where DCL does not require
147 it, and also may require that quotes are matched were DCL forgives if
148 they are not. There is a small chance that existing VMS specific makefiles
149 will be affected.
150
151 The '<', '>' was previously implemented using command files. Now
152 GNU Make will check to see if the is already a VMS "PIPE" command and
153 if it is not, will convert the command to a VMS "PIPE" command.
154
155 The '>>' redirection has been implemented by using a temporary command file.
156 This will be described later.
157
158 The DCL symbol or logical name GNV$MAKE_USE_CMD_FILE when set to a
159 string starting with one of '1','T', or 'E' for "1", "TRUE", or "ENABLE",
160 then temporary DCL command files are always used for running commands.
161
162 Some recipe strings with embedded new lines will not be handled correctly
163 when a command file is used.
164
165 GNU Make generally does text comparisons for the targets and sources. The
166 make program itself can handle either Unix or OpenVMS format filenames, but
167 normally does not do any conversions from one format to another.
168 TODO: The OpenVMS format syntax handling is incomplete.
169 TODO: ODS-5 EFS support is missing.
170 BUG: The internal routines to convert filenames to and from OpenVMS format
171 do not work correctly.
172
173 Note: In the examples below, line continuations such as a backslash may have
174 been added to make the examples easier to read in this format.
175 BUG: That feature does not completely work at this time.
176
177 Since the OpenVMS utilities generally expect OpenVMS format paths, you will
178 usually have to use OpenVMS format paths for rules and targets.
179 BUG: Relative OpenVMS paths may not work in targets, especially combined
180 with vpaths. This is because GNU make will just concatenate the directories
181 as it does on Unix.
182
183 The variables $^ and $@ separate files with commas instead of spaces.
184 This is controlled by the name GNV$MAKE_COMMA as documented in the
185 previous section.
186
187 While this may seem the natural thing to do with OpenVMS, it actually
188 causes problems when trying to use other make functions that expect the
189 files to be separated by spaces. If you run into this, you need the
190 following workaround to convert the output.
191 TODO: Look at have the $^ and $@ use spaces like on Unix and have
192 and easy to use function to do the conversions and have the built
193 in OpenVMS specific recipes and macros use it.
194
195 Example:
196
197comma := ,
198empty :=
199space := $(empty) $(empty)
200
201foo: $(addsuffix .3,$(subs $(comma),$(space),$^)
202
203
204 Makefile variables are looked up in the current environment. You can set
205 symbols or logicals in DCL and evaluate them in the Makefile via
206 $(<name-of-symbol-or-logical>). Variables defined in the Makefile
207 override OpenVMS symbols/logicals.
208
209 OpenVMS logical and symbols names show up as "environment" using the
210 origin function. when the "-e" option is specified, the origin function
211 shows them as "environment override". On POSIX the test scripts indicate
212 that they should show up just as "environment".
213
214 When GNU make reads in a symbol or logical name into the environment, it
215 converts any dollar signs found to double dollar signs for convenience in
216 using DCL symbols and logical names in recipes. When GNU make exports a
217 DCL symbol for a child process, if the first dollar sign found is followed
218 by second dollar sign, then all double dollar signs will be converted to
219 single dollar signs.
220
221 The variable $(ARCH) is predefined as IA64, ALPHA or VAX respectively.
222 Makefiles for different OpenVMS systems can now be written by checking
223 $(ARCH). Since IA64 and ALPHA are similar, usually just a check for
224 VAX or not VAX is sufficient.
225
226 You may have to update makefiles that assume VAX if not ALPHA.
227
228ifeq ($(ARCH),VAX)
229 $(ECHO) "On the VAX"
230else
231 $(ECHO) "On the ALPHA or IA64"
232endif
233
234 Empty commands are handled correctly and don't end in a new DCL process.
235
236 The exit command needs to have OpenVMS exit codes. To pass a POSIX code
237 back to the make script, you need to encode it by multiplying it by 8
238 and then adding %x1035a002 for a failure code and %x1035a001 for a
239 success. Make will interpret any POSIX code other than 0 as a failure.
240 TODO: Add an option have simulate POSIX exit commands in recipes.
241
242 Lexical functions can be used in pipes to simulate shell file test rules.
243
244 Example:
245
246 POSIX:
247b : c ; [ -f $@ ] || echo >> $@
248
249 OpenVMS:
250b : c ; if f$$search("$@") then pipe open/append xx $@ ; write xx "" ; close xx
251
252
253 You can also use pipes and turning messages off to silently test for a
254 failure.
255
256x = %x1035a00a
257
258%.b : %.c
259<tab>pipe set mess/nofac/noiden/nosev/notext ; type $^/output=$@ || exit $(x)
260
261
262Runtime issues:
263
264 The OpenVMS C Runtime has a convention for encoding a POSIX exit status into
265 to OpenVMS exit codes. These status codes will have the hex value of
266 0x35a000. OpenVMS exit code may also have a hex value of %x10000000 set on
267 them. This is a flag to tell DCL not to write out the exit code.
268
269 To convert an OpenVMS encoded POSIX exit status code to the original code
270 You subtract %x35a000 and any flags from the OpenVMS code and divide it by 8.
271
272 WARNING: Backward-incompatibility!
273 The make program exit now returns the same encoded POSIX exit code as on
274 Unix. Previous versions returned the OpenVMS exit status code if that is what
275 caused the recipe to fail.
276 TODO: Provide a way for scripts calling make to obtain that OpenVMS status
277 code.
278
279 Make internally has two error codes, MAKE_FAILURE and MAKE_TROUBLE. These
280 will have the error "-E-" severity set on exit.
281
282 MAKE_TROUBLE is returned only if the option "-q" or "--question" is used and
283 has a POSIX value of 1 and an OpenVMS status of %x1035a00a.
284
285 MAKE_FAILURE has a POSIX value of 2 and an OpenVMS status of %x1035a012.
286
287 Output from GNU make may have single quotes around some values where on
288 other platforms it does not. Also output that would be in double quotes
289 on some platforms may show up as single quotes on VMS.
290
291 There may be extra blank lines in the output on VMS.
292 https://savannah.gnu.org/bugs/?func=detailitem&item_id=41760
293
294 There may be a "Waiting for unfinished jobs..." show up in the output.
295
296 Error messages generated by Make or Unix utilities may slightly vary from
297 POSIX platforms. Typically the case may be different.
298
299 When make deletes files, on POSIX platforms it writes out 'rm' and the list
300 of files. On VMS, only the files are written out, one per line.
301 TODO: VMS
302
303 There may be extra leading white space or additional or missing whitespace
304 in the output of recipes.
305
306 GNU Make uses sys$scratch: for the tempfiles that it creates.
307
308 The OpenVMS CRTL library maps /tmp to sys$scratch if the TMP: logical name
309 does not exist. As the CRTL may use both sys$scratch: and /tmp internally,
310 if you define the TMP logical name to be different than SYS$SCRATCH:,
311 you may end up with only some temporary files in TMP: and some in SYS$SCRATCH:
312
313 The default include directory for including other makefiles is
314 SYS$SYSROOT:[SYSLIB] (I don't remember why I didn't just use
315 SYS$LIBRARY: instead; maybe it wouldn't work that way).
316 TODO: A better default may be desired.
317
318 If the device for a file in a recipe does not exist, on OpenVMS an error
319 message of "stat: <file>: no such device or address" will be output.
320
321 Make ignores success, informational, or warning errors (-S-, -I-, or
322 -W-). But it will stop on -E- and -F- errors. (unless you do something
323 to override this in your makefile, or whatever).
324
325
326Unix compatibility features:
327----------------------------
328
329 If the command 'echo' is seen, any single quotes on the line will be
330 converted to double quotes.
331
332 The variable $(CD) is implemented as a built in Change Directory
333 command. This invokes the 'builtin_cd' Executing a 'set default'
334 recipe doesn't do the trick, since it only affects the sub-process
335 spawned for that command.
336
337 The 'builtin_cd' is generally expected to be on its own line.
338 The 'builtin_cd' either from the expansion of $(CD) or directly
339 put in a recipe line will be executed before any other commands in
340 that recipe line. DCL parameter substitution will not work for the
341 'builtin_cd' command.
342
343 Putting a 'builtin_cd' in a pipeline or an IF-THEN line should not be
344 done because the 'builtin_cd' is always executed
345 and executed first. The directory change is persistent.
346
347 Unix shell style I/O redirection is supported. You can now write lines like:
348 "<tab>mcr sys$disk:[]program.exe < input.txt > output.txt &> error.txt"
349
350 POSIX shells have ":" as a null command. These are now handled.
351 https://savannah.gnu.org/bugs/index.php?41761
352
353 A note on appending the redirected output. A simple mechanism is
354 implemented to make ">>" work in action lines. In OpenVMS there is no simple
355 feature like ">>" to have DCL command or program output redirected and
356 appended to a file. GNU make for OpenVMS implements the redirection
357 of ">>" by using a command procedure.
358
359 The current algorithm creates the output file if it does not exist and
360 then uses the DCL open/append to extend it. SYS$OUTPUT is then directed
361 to that file.
362
363 The implementation supports only one redirected append output to a file
364 and that redirection is done before any other commands in that line
365 are executed, so it redirects all output for that command.
366
367 The older implementation wrote the output to a temporary file in
368 in sys$scratch: and then attempted to append the file to the existing file.
369 The temporary file names looked like "CMDxxxxx.". Any time the created
370 command procedure can not complete, this happens. Pressing CTRL+Y to
371 abort make is one case.
372
373 In case of CTRL+Y the associated command procedure is left in SYS$SCRATCH:.
374 The command procedures will be named gnv$make_cmd*.com.
375
376 The CtrlY handler now uses $delprc to delete all children. This way also
377 actions with DCL commands will be stopped. As before the CtrlY handler
378 then sends SIGQUIT to itself, which is handled in common code.
379
380 Temporary command files are now deleted in the OpenVMS child termination
381 handler. That deletes them even if a CTRL+C was pressed.
382 TODO: Does the previous section about >> leaving files still apply?
383
384 The behavior of pressing CTRL+C is not changed. It still has only an effect,
385 after the current action is terminated. If that doesn't happen or takes too
386 long, CTRL+Y should be used instead.
387
388
389Build Options:
390
391 Added support to have case sensitive targets and dependencies but to
392 still use case blind file names. This is especially useful for Java
393 makefiles on VMS:
394
395<TAB>.SUFFIXES :
396<TAB>.SUFFIXES : .class .java
397<TAB>.java.class :
398<TAB><TAB>javac "$<"
399<TAB>HelloWorld.class : HelloWorld.java
400
401 A new macro WANT_CASE_SENSITIVE_TARGETS in config.h-vms was introduced.
402 It needs to be enabled to get this feature; default is disabled.
403 TODO: This should be a run-time setting based on if the process
404 has been set to case sensitive.
405
406
407Unimplemented functionality:
408
409 The new feature "Loadable objects" is not yet supported. If you need it,
410 please send a change request or submit a bug report.
411
412 The new option --output-sync (-O) is accepted but has no effect: GNU make
413 for OpenVMS does not support running multiple commands simultaneously.
414
415
416Self test failures and todos:
417-----------------------------
418
419 The test harness can not handle testing some of the VMS specific modes
420 because of the features needed for to be set for the Perl to run.
421 Need to find a way to set the VMS features before running make as a
422 child.
423
424 GNU make was not currently translating the OpenVMS encoded POSIX values
425 returned to it back to the POSIX values. I have temporarily modified the
426 Perl test script to compensate for it. This should be being handled
427 internally to Make.
428 TODO: Verify and update the Perl test script.
429
430 The features/parallelism test was failing. OpenVMS is executing the rules
431 in sequence not in parallel as this feature was not implemented.
432 GNU Make on VMS no longer claims it is implemented.
433 TODO: Implement it.
434
435 Symlink support is not present. Symlinks are supported by OpenVMS 8.3 and
436 later.
437
438 Error messages should be suppressed with the "-" at the beginning of a line.
439 On openVMS they were showing up. TODO: Is this still an issue?
440
441 The internal vmsify and unixify OpenVMS to/from UNIX are not handling logical
442 names correctly.
443
444
445Build instructions:
446-------------------
447
448 Don't use the HP C V7.2-001 compiler, which has an incompatible change
449 how __STDC__ is defined. This results at least in compile time warnings.
450
451Make a 1st version
452 $ @makefile.com ! ignore any compiler and/or linker warning
453 $ copy make.exe 1st-make.exe
454
455 Use the 1st version to generate a 2nd version as a test.
456 $ mc sys$disk:[]1st-make clean ! ignore any file not found messages
457 $ mc sys$disk:[]1st-make
458
459 Verify your 2nd version by building Make again.
460 $ copy make.exe 2nd-make.exe
461 $ mc sys$disk:[]2nd-make clean
462 $ mc sys$disk:[]2nd-make
463
464
465Running the tests:
466------------------
467
468 Running the tests on OpenVMS requires the following software to be installed
469 as most of the tests are Unix oriented.
470
471 * Perl 5.18 or later.
472 https://sourceforge.net/projects/vmsperlkit/files/
473 * GNV 2.1.3 + Updates including a minimum of:
474 * Bash 4.3.30
475 * ld_tools 3.0.2
476 * coreutils 8.21
477 https://sourceforge.net/p/gnv/wiki/InstallingGNVPackages/
478 https://sourceforge.net/projects/gnv/files/
479
480 As the test scripts need to create some foreign commands that persist
481 after the test is run, it is recommend that either you use a sub-process or
482 a dedicated login to run the tests.
483
484 To get detailed information for running the tests:
485
486 $ set default [.tests]
487 $ @run_make_tests help
488
489 Running the script with no parameters will run all the tests.
490
491 After the the test script has been run once in a session, assuming
492 that you built make in sys$disk:[make], you can redefined the
493 "bin" logical name as follows:
494
495 $ define bin sys$disk:[make],gnv$gnu:[bin]
496
497 Then you can use Perl to run the scripts.
498
499 $ perl run_make_tests.pl
500
501
502Acknowledgments:
503----------------
504
505See NEWS. for details of past changes.
506
507 These are the currently known contributors to this port.
508
509 Hartmut Becker
510 John Malmberg
511 Michael Gehre
512 John Eisenbraun
513 Klaus Kaempf
514 Mike Moretti
515 John W. Eaton
516
README.W32.template
1This version of GNU make has been tested on:
2 Microsoft Windows 2000/XP/2003/Vista/7/8/10
3It has also been used on Windows 95/98/NT, and on OS/2.
4
5It builds with the MinGW port of GCC (tested with GCC 3.4.2, 4.8.1,
6and 4.9.3).
7
8It also builds with MSVC 2.x, 4.x, 5.x, 6.x, 2005, 2008, 2010, 2012,
92013, and 2015 as well as with .NET 7.x and .NET 2003.
10
11Building with Guile is supported (tested with Guile 2.0.x). To build
12with Guile, you will need, in addition to Guile itself, its dependency
13libraries and the pkg-config program. The latter is used to figure out
14which compilation and link switches and libraries need to be mentioned
15on the compiler command lines to correctly link with Guile. A Windows
16port of pkg-config can be found on ezwinports site:
17
18 http://sourceforge.net/projects/ezwinports/
19
20The libraries on which Guile depends can vary depending on your
21version and build of Guile. At the very least, the Boehm's GC library
22will be needed, and typically also GNU MP, libffi, libunistring, and
23libtool's libltdl. Whoever built the port of Guile you have should
24also provide you with these dependencies or a URL where to download
25them. A precompiled 32-bit Windows build of Guile is available from
26the ezwinports site mentioned above.
27
28The Windows port of GNU make is maintained jointly by various people.
29It was originally made by Rob Tulloh.
30It is currently maintained by Eli Zaretskii.
31
32
33Do this first, regardless of the build method you choose:
34---------------------------------------------------------
35
36 1. Edit config.h.W32 to your liking (especially the few shell-related
37 defines near the end, or HAVE_CASE_INSENSITIVE_FS which corresponds
38 to './configure --enable-case-insensitive-file-system'). (We don't
39 recommend to define HAVE_CASE_INSENSITIVE_FS, but you may wish to
40 consider that if you have a lot of files whose names are in upper
41 case, while Makefile rules are written for lower-case versions.)
42
43
44Building with (MinGW-)GCC using build_w32.bat
45---------------------------------------------
46
47 2. Open a W32 command prompt for your installed (MinGW-)GCC, setup a
48 correct PATH and other environment variables for it, then execute ...
49
50 .\build_w32.bat gcc
51
52 This produces gnumake.exe in the GccRel directory.
53
54 If you want a version of GNU make built with debugging enabled,
55 add the --debug option. Output goes into the GccDebug directory.
56
57 The batch file will probe for Guile installation, and will build
58 gnumake.exe with Guile if it finds it. If you have Guile
59 installed, but want to build Make without Guile support, type
60
61 .\build_w32.bat --without-guile gcc
62
63
64Building with (MSVC++-)cl using build_w32.bat
65---------------------------------------------
66
67 2. Open a command shell, then execute ...
68
69 .\build_w32.bat
70
71 This produces a 64bit Release build of gnumake.exe in .\WinRel, using
72 the compiler found on the %Path%. If no compiler is found, the batch
73 file will probe your system and choose the newest MSVC version it can
74 find.
75
76 If you want a 32bit version of GNU make, add the --x86 option.
77
78 If you want a Debug build of GNU make, add the --debug option. Output
79 will go into the .\WinDebug directory.
80
81 The batch file will probe for Guile installation, and will build
82 gnumake.exe with Guile if it finds it. If Guile is installed,
83 but you prefer to build GNU make without Guile support, add the
84 --without-guile option.
85
86
87Building with (MinGW-)GCC using GNU make
88----------------------------------------
89
90 2. If you already have a version of GNU make available you can use it
91 to build this version. Open a W32 command prompt for your installed
92 (MinGW-)GCC, setup a correct PATH and other environment variables
93 for it, then execute ...
94
95 make -f Basic.mk TOOLCHAIN=gcc
96
97 This produces GccRel\gnumake.exe.
98 If you want a version of GNU make built with debugging enabled,
99 add the TARGET_TYPE=debug option:
100
101 make -f Basic.mk TOOLCHAIN=gcc TARGET_TYPE=debug
102
103 The makefile doesn't support Guile integration. Use build_w32.bat
104 if you want to build with Guile support.
105
106
107Building with (MSVC++-)cl using GNU make
108----------------------------------------
109
110 2. If you already have a version of GNU make available you can use it
111 to build this version. Open a W32 command prompt for your installed
112 (MSVC++-)cl, setup a correct PATH and other environment variables
113 for it (usually via executing vcvars32.bat or vsvars32.bat from the
114 cl-installation, or using a corresponding start menu entry from the
115 cl-installation), then execute ...
116
117 make -f Basic.mk
118
119 This produces an optimized WinRel/gnumake.exe.
120 If you want a version of GNU make built with debugging enabled,
121 add the TARGET_TYPE=debug option:
122
123 make -f Basic.mk TARGET_TYPE=debug
124
125 The makefile doesn't support Guile integration. Use build_w32.bat
126 if you want to build with Guile support.
127
128
129Running the test suite
130----------------------
131
132 3. You will need an installation of Perl. Be sure to use a relatively
133 modern version: older versions will sometimes throw spurious errors.
134
135 To run the suite after building using GNU make, use:
136
137 make -f Basic.mk check
138
139 Alternatively if you'd like to run tests by hand, use:
140
141 cd tests
142 .\run_make_tests.bat -make <path-to-make>
143
144 I've found <path-to-make> seems to want forward-slashes in the path.
145 For example if building with .\build_w32.bat non-debug, use:
146
147 cd tests
148 .\run_make_tests.bat -make ../WinRel/gnumake.exe
149
150 I've tested this with the MSYS2 shell and POSIX tools installation
151 that you get by installing Git for Windows.
152
153
154
155-------------------
156-- Notes/Caveats --
157-------------------
158
159GNU make on Windows 32-bit platforms:
160
161 This version of make is ported natively to Windows32 platforms
162 (Windows NT 3.51, Windows NT 4.0, Windows 2000, Windows XP,
163 Windows 95, and Windows 98). It does not rely on any 3rd party
164 software or add-on packages for building. The only thing
165 needed is a Windows compiler. Two compilers supported
166 officially are the MinGW port of GNU GCC, and the various
167 versions of the Microsoft C compiler.
168
169 Do not confuse this port of GNU make with other Windows32 projects
170 which provide a GNU make binary. These are separate projects
171 and are not connected to this port effort.
172
173GNU make and sh.exe:
174
175 This port prefers if you have a working sh.exe somewhere on
176 your system. If you don't have sh.exe, the port falls back to
177 MSDOS mode for launching programs (via a batch file). The
178 MSDOS mode style execution has not been tested that carefully
179 though (The author uses GNU bash as sh.exe).
180
181 There are very few true ports of Bourne shell for NT right now.
182 There is a version of GNU bash available from Cygnus "Cygwin"
183 porting effort (http://www.cygwin.com/).
184 Other possibilities are the MKS version of sh.exe, or building
185 your own with a package like NutCracker (DataFocus) or Portage
186 (Consensys). Also MinGW includes sh (http://mingw.org/).
187
188GNU make and brain-dead shells (BATCH_MODE_ONLY_SHELL):
189
190 Some versions of Bourne shell do not behave well when invoked
191 as 'sh -c' from CreateProcess(). The main problem is they seem
192 to have a hard time handling quoted strings correctly. This can
193 be circumvented by writing commands to be executed to a batch
194 file and then executing the command by calling 'sh file'.
195
196 To work around this difficulty, this version of make supports
197 a batch mode. When BATCH_MODE_ONLY_SHELL is defined at compile
198 time, make forces all command lines to be executed via script
199 files instead of by command line. In this mode you must have a
200 working sh.exe in order to use parallel builds (-j).
201
202 A native Windows32 system with no Bourne shell will also run
203 in batch mode. All command lines will be put into batch files
204 and executed via $(COMSPEC) (%COMSPEC%). However, parallel
205 builds ARE supported with Windows shells (cmd.exe and
206 command.com). See the next section about some peculiarities
207 of parallel builds on Windows.
208
209Support for parallel builds
210
211 Parallel builds (-jN) are supported in this port. The number of
212 concurrent processes has a hard limit of 4095.
213
214GNU make and Cygnus GNU Windows32 tools:
215
216 Good news! Make now has native support for Cygwin sh. To enable,
217 define the HAVE_CYGWIN_SHELL in config.h and rebuild make
218 from scratch. This version of make tested with B20.1 of Cygwin.
219 Do not define BATCH_MODE_ONLY_SHELL if you use HAVE_CYGWIN_SHELL.
220
221GNU make and the MKS shell:
222
223 There is now semi-official support for the MKS shell. To turn this
224 support on, define HAVE_MKS_SHELL in the config.h.W32 before you
225 build make. Do not define BATCH_MODE_ONLY_SHELL if you turn
226 on HAVE_MKS_SHELL.
227
228GNU make handling of drive letters in pathnames (PATH, vpath, VPATH):
229
230 There is a caveat that should be noted with respect to handling
231 single character pathnames on Windows systems. When colon is
232 used in PATH variables, make tries to be smart about knowing when
233 you are using colon as a separator versus colon as a drive
234 letter. Unfortunately, something as simple as the string 'x:/'
235 could be interpreted 2 ways: (x and /) or (x:/).
236
237 Make chooses to interpret a letter plus colon (e.g. x:/) as a
238 drive letter pathname. If it is necessary to use single
239 character directories in paths (VPATH, vpath, Path, PATH), the
240 user must do one of two things:
241
242 a. Use semicolon as the separator to disambiguate colon. For
243 example use 'x;/' if you want to say 'x' and '/' are
244 separate components.
245
246 b. Qualify the directory name so that there is more than
247 one character in the path(s) used. For example, none
248 of these settings are ambiguous:
249
250 ./x:./y
251 /some/path/x:/some/path/y
252 x:/some/path/x:x:/some/path/y
253
254 Please note that you are free to mix colon and semi-colon in the
255 specification of paths. Make is able to figure out the intended
256 result and convert the paths internally to the format needed
257 when interacting with the operating system, providing the path
258 is not within quotes, e.g. "x:/test/test.c".
259
260 You are encouraged to use colon as the separator character.
261 This should ease the pain of deciding how to handle various path
262 problems which exist between platforms. If colon is used on
263 both Unix and Windows systems, then no ifdef'ing will be
264 necessary in the makefile source.
265
266Pathnames and white space:
267
268 Unlike Unix, Windows 95/NT systems encourage pathnames which
269 contain white space (e.g. C:\Program Files\). These sorts of
270 pathnames are valid on Unix too, but are never encouraged.
271 There is at least one place in make (VPATH/vpath handling) where
272 paths containing white space will simply not work. There may be
273 others too. I chose to not try and port make in such a way so
274 that these sorts of paths could be handled. I offer these
275 suggestions as workarounds:
276
277 1. Use 8.3 notation. i.e. "x:/long~1/", which is actually
278 "x:\longpathtest". Type "dir /x" to view these filenames
279 within the cmd.exe shell.
280 2. Rename the directory so it does not contain white space.
281
282 If you are unhappy with this choice, this is free software
283 and you are free to take a crack at making this work. The code
284 in w32/pathstuff.c and vpath.c would be the places to start.
285
286Pathnames and Case insensitivity:
287
288 Unlike Unix, Windows 95/NT systems are case insensitive but case
289 preserving. For example if you tell the file system to create a
290 file named "Target", it will preserve the case. Subsequent access to
291 the file with other case permutations will succeed (i.e. opening a
292 file named "target" or "TARGET" will open the file "Target").
293
294 By default, GNU make retains its case sensitivity when comparing
295 target names and existing files or directories. It can be
296 configured, however, into a case preserving and case insensitive
297 mode by adding a define for HAVE_CASE_INSENSITIVE_FS to
298 config.h.W32.
299
300 For example, the following makefile will create a file named
301 Target in the directory subdir which will subsequently be used
302 to satisfy the dependency of SUBDIR/DepTarget on SubDir/TARGET.
303 Without HAVE_CASE_INSENSITIVE_FS configured, the dependency link
304 will not be made:
305
306 subdir/Target:
307 touch $@
308
309 SUBDIR/DepTarget: SubDir/TARGET
310 cp $^ $@
311
312 Reliance on this behavior also eliminates the ability of GNU make
313 to use case in comparison of matching rules. For example, it is
314 not possible to set up a C++ rule using %.C that is different
315 than a C rule using %.c. GNU make will consider these to be the
316 same rule and will issue a warning.
317
318SAMBA/NTFS/VFAT:
319
320 I have not had any success building the debug version of this
321 package using SAMBA as my file server. The reason seems to be
322 related to the way VC++ 4.0 changes the case name of the pdb
323 filename it is passed on the command line. It seems to change
324 the name always to to lower case. I contend that the VC++
325 compiler should not change the casename of files that are passed
326 as arguments on the command line. I don't think this was a
327 problem in MSVC 2.x, but I know it is a problem in MSVC 4.x.
328
329 The package builds fine on VFAT and NTFS filesystems.
330
331 Most all of the development I have done to date has been using
332 NTFS and long file names. I have not done any considerable work
333 under VFAT. VFAT users may wish to be aware that this port of
334 make does respect case sensitivity.
335
336FAT:
337
338 Version 3.76 added support for FAT filesystems. Make works
339 around some difficulties with stat'ing of files and caching of
340 filenames and directories internally.
341
342Bug reports:
343
344 Please submit bugs via the normal bug reporting mechanism which
345 is described in the GNU make manual and the base README.
346
347-------------------------------------------------------------------------------
348Copyright (C) 1996-2022 Free Software Foundation, Inc.
349This file is part of GNU Make.
350
351GNU Make is free software; you can redistribute it and/or modify it under the
352terms of the GNU General Public License as published by the Free Software
353Foundation; either version 3 of the License, or (at your option) any later
354version.
355
356GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
357WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
358A PARTICULAR PURPOSE. See the GNU General Public License for more details.
359
360You should have received a copy of the GNU General Public License along with
361this program. If not, see <http://www.gnu.org/licenses/>.
362