1 GNU make NEWS -*-indented-text-*-
2 History of user-visible changes.
5 Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
6 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
8 This file is part of GNU Make.
10 See the end of this file for copying conditions.
12 All changes mentioned here are more fully described in the GNU make
13 manual, which is contained in this distribution as the file doc/make.texi.
14 See the README file and the GNU make manual for instructions for
19 * GNU make is ported to OS/2.
21 * GNU make is ported to MinGW. The MinGW build is only supported by
22 the build_w32.bat batch file; see the file README.W32 for more
25 * WARNING: Backward-incompatibility!
27 GNU make now implements a generic "second expansion" feature on the
28 prerequisites of both explicit and implicit (pattern) rules. In order
29 to enable this feature, the special target '.SECONDEXPANSION' must be
30 defined before the first target which takes advantage of it. If this
31 feature is enabled then after all rules have been parsed the
32 prerequisites are expanded again, this time with all the automatic
33 variables in scope. This means that in addition to using standard
34 SysV $$@ in prerequisites lists, you can also use complex functions
35 such as $$(notdir $$@) etc. This behavior applies to implicit rules,
36 as well, where the second expansion occurs when the rule is matched.
37 However, this means that when '.SECONDEXPANSION' is enabled you must
38 double-quote any "$" in your filenames; instead of "foo: boo$$bar" you
39 now must write "foo: foo$$$$bar". Note that the SysV $$@ etc. feature,
40 which used to be available by default, is now ONLY available when the
41 .SECONDEXPANSION target is defined. If your makefiles take advantage
42 of this SysV feature you will need to update them.
44 * WARNING: Backward-incompatibility!
45 In order to comply with POSIX, the way in which GNU make processes
46 backslash-newline sequences in command strings has changed. If your
47 makefiles use backslash-newline sequences inside of single-quoted
48 strings in command scripts you will be impacted by this change. See
49 the GNU make manual section "Command Execution" (node "Execution") for
52 * New command-line option: -L (--check-symlink-times). On systems that
53 support symbolic links, if this option is given then GNU make will
54 use the most recent modification time of any symbolic links that are
55 used to resolve target files. The default behavior remains as it
56 always has: use the modification time of the actual target file only.
58 * The "else" conditional line can now be followed by any other valid
59 conditional on the same line: this does not increase the depth of the
60 conditional nesting, so only one "endif" is required to close the
63 * All pattern-specific variables that match a given target are now used
64 (previously only the first match was used).
66 * Target-specific variables can be marked as exportable using the
69 * In a recursive $(call ...) context, any extra arguments from the outer
70 call are now masked in the context of the inner call.
72 * Implemented a solution for the "thundering herd" problem with "-j -l".
73 This version of GNU make uses an algorithm suggested by Thomas Riedl
74 <thomas.riedl@siemens.com> to track the number of jobs started in the
75 last second and artificially adjust GNU make's view of the system's
76 load average accordingly.
78 * New special variables available in this release:
79 - .INCLUDE_DIRS: Expands to a list of directories that make searches
80 for included makefiles.
81 - .FEATURES: Contains a list of special features available in this
83 - .DEFAULT_GOAL: Set the name of the default goal make will
84 use if no goals are provided on the command line.
85 - MAKE_RESTARTS: If set, then this is the number of times this
86 instance of make has been restarted (see "How Makefiles Are Remade"
88 - New automatic variable: $| (added in 3.80, actually): contains all
89 the order-only prerequisites defined for the target.
91 * New functions available in this release:
92 - $(lastword ...) returns the last word in the list. This gives
93 identical results as $(word $(words ...) ...), but is much faster.
94 - $(abspath ...) returns the absolute path (all "." and ".."
95 directories resolved, and any duplicate "/" characters removed) for
97 - $(realpath ...) returns the canonical pathname for each path
98 provided. The canonical pathname is the absolute pathname, with
99 all symbolic links resolved as well.
100 - $(info ...) prints its arguments to stdout. No makefile name or
101 line number info, etc. is printed.
102 - $(flavor ...) returns the flavor of a variable.
103 - $(or ...) provides a short-circuiting OR conditional: each argument
104 is expanded. The first true (non-empty) argument is returned; no
105 further arguments are expanded. Expands to empty if there are no
107 - $(and ...) provides a short-circuiting AND conditional: each
108 argument is expanded. The first false (empty) argument is
109 returned; no further arguments are expanded. Expands to the last
110 argument if all arguments are true.
112 * Changes made for POSIX compatibility:
113 - Only touch targets (under -t) if they have at least one command.
114 - Setting the SHELL make variable does NOT change the value of the
115 SHELL environment variable given to programs invoked by make. As
116 an enhancement to POSIX, if you export the make variable SHELL then
117 it will be set in the environment, just as before.
119 * On MS Windows systems, explicitly setting SHELL to a pathname ending
120 in "cmd" or "cmd.exe" (case-insensitive) will force GNU make to use
121 the DOS command interpreter in batch mode even if a UNIX-like shell
122 could be found on the system.
124 * On VMS there is now support for case-sensitive filesystems such as ODS5.
125 See the readme.vms file for information.
127 * Parallel builds (-jN) no longer require a working Bourne shell on
128 Windows platforms. They work even with the stock Windows shells, such
129 as cmd.exe and command.com.
131 * Updated to autoconf 2.59, automake 1.9.5, and gettext 0.14.1. Users
132 should not be impacted.
134 * New translations for Swedish, Chinese (simplified), Ukrainian,
135 Belarusian, Finnish, Kinyarwandan, and Irish. Many updated
138 A complete list of bugs fixed in this version is available here:
140 http://savannah.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=101
145 * A new feature exists: order-only prerequisites. These prerequisites
146 affect the order in which targets are built, but they do not impact
147 the rebuild/no-rebuild decision of their dependents. That is to say,
148 they allow you to require target B be built before target A, without
149 requiring that target A will always be rebuilt if target B is updated.
150 Patch for this feature provided by Greg McGary <greg@mcgary.org>.
152 * For compatibility with SysV make, GNU make now supports the peculiar
153 syntax $$@, $$(@D), and $$(@F) in the prerequisites list of a rule.
154 This syntax is only valid within explicit and static pattern rules: it
155 cannot be used in implicit (suffix or pattern) rules. Edouard G. Parmelan
156 <egp@free.fr> provided a patch implementing this feature; however, I
157 decided to implement it in a different way.
159 * The argument to the "ifdef" conditional is now expanded before it's
160 tested, so it can be a constructed variable name.
162 Similarly, the arguments to "export" (when not used in a variable
163 definition context) and "unexport" are also now expanded.
165 * A new function is defined: $(value ...). The argument to this
166 function is the _name_ of a variable. The result of the function is
167 the value of the variable, without having been expanded.
169 * A new function is defined: $(eval ...). The arguments to this
170 function should expand to makefile commands, which will then be
171 evaluated as if they had appeared in the makefile. In combination
172 with define/endef multiline variable definitions this is an extremely
173 powerful capability. The $(value ...) function is also sometimes
176 * A new built-in variable is defined, $(MAKEFILE_LIST). It contains a
177 list of each makefile GNU make has read, or started to read, in the
178 order in which they were encountered. So, the last filename in the
179 list when a makefile is just being read (before any includes) is the
180 name of the current makefile.
182 * A new built-in variable is defined: $(.VARIABLES). When it is
183 expanded it returns a complete list of variable names defined by all
184 makefiles at that moment.
186 * A new command-line option is defined, -B or --always-make. If
187 specified GNU make will consider all targets out-of-date even if they
188 would otherwise not be.
190 * The arguments to $(call ...) functions were being stored in $1, $2,
191 etc. as recursive variables, even though they are fully expanded
192 before assignment. This means that escaped dollar signs ($$ etc.)
193 were not behaving properly. Now the arguments are stored as simple
194 variables. This may mean that if you added extra escaping to your
195 $(call ...) function arguments you will need to undo it now.
197 * The variable invoked by $(call ...) can now be recursive: unlike other
198 variables it can reference itself and this will not produce an error
199 when it is used as the first argument to $(call ...) (but only then).
201 * New pseudo-target .LOW_RESOLUTION_TIME, superseding the configure
202 option --disable-nsec-timestamps. You might need this if your build
203 process depends on tools like "cp -p" preserving time stamps, since
204 "cp -p" (right now) doesn't preserve the subsecond portion of a time
207 * Updated translations for French, Galician, German, Japanese, Korean,
208 and Russian. New translations for Croatian, Danish, Hebrew, and
211 * Updated internationalization support to Gettext 0.11.5.
212 GNU make now uses Gettext's "external" feature, and does not include
213 any internationalization code itself. Configure will search your
214 system for an existing implementation of GNU Gettext (only GNU Gettext
215 is acceptable) and use it if it exists. If not, NLS will be disabled.
216 See ABOUT-NLS for more information.
218 * Updated to autoconf 2.54 and automake 1.7. Users should not be impacted.
220 A complete list of bugs fixed in this version is available here:
222 http://savannah.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=102
227 * .SECONDARY with no prerequisites now prevents any target from being
228 removed because make thinks it's an intermediate file, not just those
229 listed in the makefile.
231 * New configure option --disable-nsec-timestamps, but this was
232 superseded in later versions by the .LOW_RESOLUTION_TIME pseudo-target.
236 * GNU make optionally supports internationalization and locales via the
237 GNU gettext (or local gettext if suitable) package. See the ABOUT-NLS
238 file for more information on configuring GNU make for NLS.
240 * Previously, GNU make quoted variables such as MAKEFLAGS and
241 MAKEOVERRIDES for proper parsing by the shell. This allowed them to
242 be used within make build scripts. However, using them there is not
243 proper behavior: they are meant to be passed to subshells via the
244 environment. Unfortunately the values were not quoted properly to be
245 passed through the environment. This meant that make didn't properly
246 pass some types of command line values to submakes.
248 With this version we change that behavior: now these variables are
249 quoted properly for passing through the environment, which is the
250 correct way to do it. If you previously used these variables
251 explicitly within a make rule you may need to re-examine your use for
252 correctness given this change.
254 * A new pseudo-target .NOTPARALLEL is available. If defined, the
255 current makefile is run serially regardless of the value of -j.
256 However, submakes are still eligible for parallel execution.
258 * The --debug option has changed: it now allows optional flags
259 controlling the amount and type of debugging output. By default only
260 a minimal amount information is generated, displaying the names of
261 "normal" targets (not makefiles) that were deemed out of date and in
262 need of being rebuilt.
264 Note that the -d option behaves as before: it takes no arguments and
265 all debugging information is generated.
267 * The `-p' (print database) output now includes filename and linenumber
268 information for variable definitions, to aid debugging.
270 * The wordlist function no longer reverses its arguments if the "start"
271 value is greater than the "end" value. If that's true, nothing is
274 * Hartmut Becker provided many updates for the VMS port of GNU make.
275 See the readme.vms file for more details.
279 * Two new functions, $(error ...) and $(warning ...) are available. The
280 former will cause make to fail and exit immediately upon expansion of
281 the function, with the text provided as the error message. The latter
282 causes the text provided to be printed as a warning message, but make
285 * A new function $(call ...) is available. This allows users to create
286 their own parameterized macros and invoke them later. Original
287 implementation of this function was provided by Han-Wen Nienhuys
290 * A new function $(if ...) is available. It provides if-then-else
291 capabilities in a builtin function. Original implementation of this
292 function was provided by Han-Wen Nienhuys <hanwen@cs.uu.nl>.
294 * Make defines a new variable, .LIBPATTERNS. This variable controls how
295 library dependency expansion (dependencies like ``-lfoo'') is performed.
297 * Make accepts CRLF sequences as well as traditional LF, for
298 compatibility with makefiles created on other operating systems.
300 * Make accepts a new option: -R, or --no-builtin-variables. This option
301 disables the definition of the rule-specific builtin variables (CC,
302 LD, AR, etc.). Specifying this option forces -r (--no-builtin-rules)
305 * A "job server" feature, suggested by Howard Chu <hyc@highlandsun.com>.
307 On systems that support POSIX pipe(2) semantics, GNU make can now pass
308 -jN options to submakes rather than forcing them all to use -j1. The
309 top make and all its sub-make processes use a pipe to communicate with
310 each other to ensure that no more than N jobs are started across all
311 makes. To get the old behavior of -j back, you can configure make
312 with the --disable-job-server option.
314 * The confusing term "dependency" has been replaced by the more accurate
315 and standard term "prerequisite", both in the manual and in all GNU make
318 * GNU make supports the "big archive" library format introduced in AIX 4.3.
320 * GNU make supports large files on AIX, HP-UX, and IRIX. These changes
321 were provided by Paul Eggert <eggert@twinsun.com>. (Large file
322 support for Solaris and Linux was introduced in 3.77, but the
323 configuration had issues: these have also been resolved).
325 * The Windows 95/98/NT (W32) version of GNU make now has native support
326 for the Cygnus Cygwin release B20.1 shell (bash).
328 * The GNU make regression test suite, long available separately "under
329 the table", has been integrated into the release. You can invoke it
330 by running "make check" in the distribution. Note that it requires
331 Perl (either Perl 4 or Perl 5) to run.
335 * Implement BSD make's "?=" variable assignment operator. The variable
336 is assigned the specified value only if that variable is not already
339 * Make defines a new variable, "CURDIR", to contain the current working
340 directory (after the -C option, if any, has been processed).
341 Modifying this variable has no effect on the operation of make.
343 * Make defines a new default RCS rule, for new-style master file
344 storage: ``% :: RCS/%'' (note no ``,v'' suffix).
346 Make defines new default rules for DOS-style C++ file naming
347 conventions, with ``.cpp'' suffixes. All the same rules as for
348 ``.cc'' and ``.C'' suffixes are provided, along with LINK.cpp and
349 COMPILE.cpp macros (which default to the same value as LINK.cc and
350 COMPILE.cc). Note CPPFLAGS is still C preprocessor flags! You should
351 use CXXFLAGS to change C++ compiler flags.
353 * A new feature, "target-specific variable values", has been added.
354 This is a large change so please see the appropriate sections of the
355 manual for full details. Briefly, syntax like this:
357 TARGET: VARIABLE = VALUE
359 defines VARIABLE as VALUE within the context of TARGET. This is
360 similar to SunOS make's "TARGET := VARIABLE = VALUE" feature. Note
361 that the assignment may be of any type, not just recursive, and that
362 the override keyword is available.
364 COMPATIBILITY: This new syntax means that if you have any rules where
365 the first or second dependency has an equal sign (=) in its name,
366 you'll have to escape them with a backslash: "foo : bar\=baz".
367 Further, if you have any dependencies which already contain "\=",
368 you'll have to escape both of them: "foo : bar\\\=baz".
370 * A new appendix listing the most common error and warning messages
371 generated by GNU make, with some explanation, has been added to the
372 GNU make User's Manual.
374 * Updates to the GNU make Customs library support (see README.customs).
376 * Updates to the Windows 95/NT port from Rob Tulloh (see README.W32),
377 and to the DOS port from Eli Zaretski (see README.DOS).
381 * Small (but serious) bug fix. Quick rollout to get into the GNU source CD.
385 * GNU make now uses automake to control Makefile.in generation. This
386 should make it more consistent with the GNU standards.
388 * VPATH functionality has been changed to incorporate the VPATH+ patch,
389 previously maintained by Paul Smith <psmith@baynetworks.com>. See the
392 * Make defines a new variable, `MAKECMDGOALS', to contain the goals that
393 were specified on the command line, if any. Modifying this variable
394 has no effect on the operation of make.
396 * A new function, `$(wordlist S,E,TEXT)', is available: it returns a
397 list of words from number S to number E (inclusive) of TEXT.
399 * Instead of an error, detection of future modification times gives a
400 warning and continues. The warning is repeated just before GNU make
401 exits, so it is less likely to be lost.
403 * Fix the $(basename) and $(suffix) functions so they only operate on
404 the last filename, not the entire string:
406 Command Old Result New Result
407 ------- ---------- ----------
409 $(basename a.b/c) a a.b/c
411 $(suffix a.b/c) b/c <empty>
413 * The $(strip) function now removes newlines as well as TABs and spaces.
415 * The $(shell) function now changes CRLF (\r\n) pairs to a space as well
418 * Updates to the Windows 95/NT port from Rob Tulloh (see README.W32).
420 * Eli Zaretskii has updated the port to 32-bit protected mode on MSDOS
421 and MS-Windows, building with the DJGPP v2 port of GNU C/C++ compiler
422 and utilities. See README.DOS for details, and direct all questions
423 concerning this port to Eli Zaretskii <eliz@is.elta.co.il> or DJ
424 Delorie <dj@delorie.com>.
426 * John W. Eaton has updated the VMS port to support libraries and VPATH.
430 * The directory messages printed by `-w' and implicitly in sub-makes,
431 are now omitted if Make runs no commands and has no other messages to print.
433 * Make now detects files that for whatever reason have modification times
434 in the future and gives an error. Files with such impossible timestamps
435 can result from unsynchronized clocks, or archived distributions
436 containing bogus timestamps; they confuse Make's dependency engine
439 * The new directive `sinclude' is now recognized as another name for
440 `-include', for compatibility with some other Makes.
442 * Aaron Digulla has contributed a port to AmigaDOS. See README.Amiga for
443 details, and direct all Amiga-related questions to <digulla@fh-konstanz.de>.
445 * Rob Tulloh of Tivoli Systems has contributed a port to Windows NT or 95.
446 See README.W32 for details, and direct all Windows-related questions to
447 <rob_tulloh@tivoli.com>.
451 * Converted to use Autoconf version 2, so `configure' has some new options.
452 See INSTALL for details.
454 * You can now send a SIGUSR1 signal to Make to toggle printing of debugging
455 output enabled by -d, at any time during the run.
459 * DJ Delorie has ported Make to MS-DOS using the GO32 extender.
460 He is maintaining the DOS port, not the GNU Make maintainer;
461 please direct bugs and questions for DOS to <djgpp@sun.soe.clarkson.edu>.
462 MS-DOS binaries are available for FTP from ftp.simtel.net in
463 /pub/simtelnet/gnu/djgpp/.
465 * The `MAKEFLAGS' variable (in the environment or in a makefile) can now
466 contain variable definitions itself; these are treated just like
467 command-line variable definitions. Make will automatically insert any
468 variable definitions from the environment value of `MAKEFLAGS' or from
469 the command line, into the `MAKEFLAGS' value exported to children. The
470 `MAKEOVERRIDES' variable previously included in the value of `$(MAKE)'
471 for sub-makes is now included in `MAKEFLAGS' instead. As before, you can
472 reset `MAKEOVERRIDES' in your makefile to avoid putting all the variables
473 in the environment when its size is limited.
475 * If `.DELETE_ON_ERROR' appears as a target, Make will delete the target of
476 a rule if it has changed when its commands exit with a nonzero status,
477 just as when the commands get a signal.
479 * The automatic variable `$+' is new. It lists all the dependencies like
480 `$^', but preserves duplicates listed in the makefile. This is useful
481 for linking rules, where library files sometimes need to be listed twice
484 * You can now specify the `.IGNORE' and `.SILENT' special targets with
485 dependencies to limit their effects to those files. If a file appears as
486 a dependency of `.IGNORE', then errors will be ignored while running the
487 commands to update that file. Likewise if a file appears as a dependency
488 of `.SILENT', then the commands to update that file will not be printed
489 before they are run. (This change was made to conform to POSIX.2.)
493 * The automatic variables `$(@D)', `$(%D)', `$(*D)', `$(<D)', `$(?D)', and
494 `$(^D)' now omit the trailing slash from the directory name. (This change
495 was made to comply with POSIX.2.)
497 * The source distribution now includes the Info files for the Make manual.
498 There is no longer a separate distribution containing Info and DVI files.
500 * You can now set the variables `binprefix' and/or `manprefix' in
501 Makefile.in (or on the command line when installing) to install GNU make
502 under a name other than `make' (i.e., ``make binprefix=g install''
503 installs GNU make as `gmake').
505 * The built-in Texinfo rules use the new variables `TEXI2DVI_FLAGS' for
506 flags to the `texi2dvi' script, and `MAKEINFO_FLAGS' for flags to the
509 * The exit status of Make when it runs into errors is now 2 instead of 1.
510 The exit status is 1 only when using -q and some target is not up to date.
511 (This change was made to comply with POSIX.2.)
515 * It is no longer a fatal error to have a NUL character in a makefile.
516 You should never put a NUL in a makefile because it can have strange
517 results, but otherwise empty lines full of NULs (such as produced by
518 the `xmkmf' program) will always work fine.
520 * The error messages for nonexistent included makefiles now refer to the
521 makefile name and line number where the `include' appeared, so Emacs's
522 C-x ` command takes you there (in case it's a typo you need to fix).
526 * Implicit rule search for archive member references is now done in the
527 opposite order from previous versions: the whole target name `LIB(MEM)'
528 first, and just the member name and parentheses `(MEM)' second.
530 * Make now gives an error for an unterminated variable or function reference.
531 For example, `$(foo' with no matching `)' or `${bar' with no matching `}'.
533 * The new default variable `MAKE_VERSION' gives the version number of
534 Make, and a string describing the remote job support compiled in (if any).
535 Thus the value (in this release) is something like `3.69' or `3.69-Customs'.
537 * Commands in an invocation of the `shell' function are no longer run with
538 a modified environment like target commands are. As in versions before
539 3.68, they now run with the environment that `make' started with. We
540 have reversed the change made in version 3.68 because it turned out to
541 cause a paradoxical situation in cases like:
543 export variable = $(shell echo value)
545 When Make attempted to put this variable in the environment for a target
546 command, it would try expand the value by running the shell command
547 `echo value'. In version 3.68, because it constructed an environment
548 for that shell command in the same way, Make would begin to go into an
549 infinite loop and then get a fatal error when it detected the loop.
551 * The commands given for `.DEFAULT' are now used for phony targets with no
556 * You can list several archive member names inside parenthesis:
557 `lib(mem1 mem2 mem3)' is equivalent to `lib(mem1) lib(mem2) lib(mem3)'.
559 * You can use wildcards inside archive member references. For example,
560 `lib(*.o)' expands to all existing members of `lib' whose names end in
561 `.o' (e.g. `lib(a.o) lib(b.o)'); `*.a(*.o)' expands to all such members
562 of all existing files whose names end in `.a' (e.g. `foo.a(a.o)
563 foo.a(b.o) bar.a(c.o) bar.a(d.o)'.
565 * A suffix rule `.X.a' now produces two pattern rules:
566 (%.o): %.X # Previous versions produced only this.
567 %.a: %.X # Now produces this as well, just like other suffixes.
569 * The new flag `--warn-undefined-variables' says to issue a warning message
570 whenever Make expands a reference to an undefined variable.
572 * The new `-include' directive is just like `include' except that there is
573 no error (not even a warning) for a nonexistent makefile.
575 * Commands in an invocation of the `shell' function are now run with a
576 modified environment like target commands are, so you can use `export' et
577 al to set up variables for them. They used to run with the environment
578 that `make' started with.
582 * `make --version' (or `make -v') now exits immediately after printing
587 * Make now supports long-named members in `ar' archive files.
591 * Make now supports the `+=' syntax for a variable definition which appends
592 to the variable's previous value. See the section `Appending More Text
593 to Variables' in the manual for full details.
595 * The new option `--no-print-directory' inhibits the `-w' or
596 `--print-directory' feature. Make turns on `--print-directory'
597 automatically if you use `-C' or `--directory', and in sub-makes; some
598 users have found this behavior undesirable.
600 * The built-in implicit rules now support the alternative extension
601 `.txinfo' for Texinfo files, just like `.texinfo' and `.texi'.
605 * Make now uses a standard GNU `configure' script. See the new file
606 INSTALL for the new (and much simpler) installation procedure.
608 * There is now a shell script to build Make the first time, if you have no
609 other `make' program. `build.sh' is created by `configure'; see README.
611 * GNU Make now completely conforms to the POSIX.2 specification for `make'.
613 * Elements of the `$^' and `$?' automatic variables that are archive
614 member references now list only the member name, as in Unix and POSIX.2.
616 * You should no longer ever need to specify the `-w' switch, which prints
617 the current directory before and after Make runs. The `-C' switch to
618 change directory, and recursive use of Make, now set `-w' automatically.
620 * Multiple double-colon rules for the same target will no longer have their
621 commands run simultaneously under -j, as this could result in the two
622 commands trying to change the file at the same time and interfering with
625 * The `SHELL' variable is now never taken from the environment.
626 Each makefile that wants a shell other than the default (/bin/sh) must
627 set SHELL itself. SHELL is always exported to child processes.
628 This change was made for compatibility with POSIX.2.
630 * Make now accepts long options. There is now an informative usage message
631 that tells you what all the options are and what they do. Try `make --help'.
633 * There are two new directives: `export' and `unexport'. All variables are
634 no longer automatically put into the environments of the commands that
635 Make runs. Instead, only variables specified on the command line or in
636 the environment are exported by default. To export others, use:
638 or you can define variables with:
639 export VARIABLE = VALUE
641 export VARIABLE := VALUE
645 .EXPORT_ALL_VARIABLES:
646 to get the old behavior. See the node `Variables/Recursion' in the manual
647 for a full description.
649 * The commands from the `.DEFAULT' special target are only applied to
650 targets which have no rules at all, not all targets with no commands.
651 This change was made for compatibility with Unix make.
653 * All fatal error messages now contain `***', so they are easy to find in
656 * Dependency file names like `-lNAME' are now replaced with the actual file
657 name found, as with files found by normal directory search (VPATH).
658 The library file `libNAME.a' may now be found in the current directory,
659 which is checked before VPATH; the standard set of directories (/lib,
660 /usr/lib, /usr/local/lib) is now checked last.
661 See the node `Libraries/Search' in the manual for full details.
663 * A single `include' directive can now specify more than one makefile to
666 You can also use shell file name patterns in an `include' directive:
669 * The default directories to search for included makefiles, and for
670 libraries specified with `-lNAME', are now set by configuration.
672 * You can now use blanks as well as colons to separate the directories in a
673 search path for the `vpath' directive or the `VPATH' variable.
675 * You can now use variables and functions in the left hand side of a
676 variable assignment, as in "$(foo)bar = value".
678 * The `MAKE' variable is always defined as `$(MAKE_COMMAND) $(MAKEOVERRIDES)'.
679 The `MAKE_COMMAND' variable is now defined to the name with which make
682 * The built-in rules for C++ compilation now use the variables `$(CXX)' and
683 `$(CXXFLAGS)' instead of `$(C++)' and `$(C++FLAGS)'. The old names had
684 problems with shells that cannot have `+' in environment variable names.
686 * The value of a recursively expanded variable is now expanded when putting
687 it into the environment for child processes. This change was made for
688 compatibility with Unix make.
690 * A rule with no targets before the `:' is now accepted and ignored.
691 This change was made for compatibility with SunOS 4 make.
692 We do not recommend that you write your makefiles to take advantage of this.
694 * The `-I' switch can now be used in MAKEFLAGS, and are put there
695 automatically just like other switches.
699 * Built-in rules for C++ source files with the `.C' suffix.
700 We still recommend that you use `.cc' instead.
702 * If commands are given too many times for a single target,
703 the last set given is used, and a warning message is printed.
705 * Error messages about makefiles are in standard GNU error format,
706 so C-x ` in Emacs works on them.
708 * Dependencies of pattern rules which contain no % need not actually exist
709 if they can be created (just like dependencies which do have a %).
713 * A message is always printed when Make decides there is nothing to be done.
714 It used to be that no message was printed for top-level phony targets
715 (because "`phony' is up to date" isn't quite right). Now a different
716 message "Nothing to be done for `phony'" is printed in that case.
718 * Archives on AIX now supposedly work.
720 * When the commands specified for .DEFAULT are used to update a target,
721 the $< automatic variable is given the same value as $@ for that target.
722 This is how Unix make behaves, and this behavior is mandated by POSIX.2.
726 * The -n, -q, and -t options are not put in the `MAKEFLAGS' and `MFLAG'
727 variables while remaking makefiles, so recursive makes done while remaking
728 makefiles will behave properly.
730 * If the special target `.NOEXPORT' is specified in a makefile,
731 only variables that came from the environment and variables
732 defined on the command line are exported.
736 * Suffix rules may have dependencies (which are ignored).
740 * Dependencies of the form `-lLIB' are searched for as /usr/local/lib/libLIB.a
741 as well as libLIB.a in /usr/lib, /lib, the current directory, and VPATH.
745 * There is now a Unix man page for GNU Make. It is certainly not a replacement
746 for the Texinfo manual, but it documents the basic functionality and the
747 switches. For full documentation, you should still read the Texinfo manual.
748 Thanks to Dennis Morse of Stanford University for contributing the initial
751 * Variables which are defined by default (e.g., `CC') will no longer be put
752 into the environment for child processes. (If these variables are reset by the
753 environment, makefiles, or the command line, they will still go into the
756 * Makefiles which have commands but no dependencies (and thus are always
757 considered out of date and in need of remaking), will not be remade (if they
758 were being remade only because they were makefiles). This means that GNU
759 Make will no longer go into an infinite loop when fed the makefiles that
760 `imake' (necessary to build X Windows) produces.
762 * There is no longer a warning for using the `vpath' directive with an explicit
763 pathname (instead of a `%' pattern).
767 * When removing intermediate files, only one `rm' command line is printed,
768 listing all file names.
770 * There are now automatic variables `$(^D)', `$(^F)', `$(?D)', and `$(?F)'.
771 These are the directory-only and file-only versions of `$^' and `$?'.
773 * Library dependencies given as `-lNAME' will use "libNAME.a" in the current
774 directory if it exists.
776 * The automatic variable `$($/)' is no longer defined.
778 * Leading `+' characters on a command line make that line be executed even
779 under -n, -t, or -q (as if the line contained `$(MAKE)').
781 * For command lines containing `$(MAKE)', `${MAKE}', or leading `+' characters,
782 only those lines are executed, not their entire rules.
783 (This is how Unix make behaves for lines containing `$(MAKE)' or `${MAKE}'.)
787 * Filenames in rules will now have ~ and ~USER expanded.
789 * The `-p' output has been changed so it can be used as a makefile.
790 (All information that isn't specified by makefiles is prefaced with comment
795 * The % character can be quoted with backslash in implicit pattern rules,
796 static pattern rules, `vpath' directives, and `patsubst', `filter', and
797 `filter-out' functions. A warning is issued if a `vpath' directive's
798 pattern contains no %.
800 * The `wildcard' variable expansion function now expands ~ and ~USER.
802 * Messages indicating failed commands now contain the target name:
803 make: *** [target] Error 1
805 * The `-p' output format has been changed somewhat to look more like
806 makefile rules and to give all information that Make has about files.
812 * The `-l' switch with no argument removes any previous load-average limit.
814 * When the `-w' switch is in effect, and Make has updated makefiles,
815 it will write a `Leaving directory' messagfe before re-executing itself.
816 This makes the `directory change tracking' changes to Emacs's compilation
817 commands work properly.
821 * The automatic variable `$*' is now defined for explicit rules,
822 as it is in Unix make.
826 * The `-j' switch is now put in the MAKEFLAGS and MFLAGS variables when
827 specified without an argument (indicating infinite jobs).
828 The `-l' switch is not always put in the MAKEFLAGS and MFLAGS variables.
830 * Make no longer checks hashed directories after running commands.
831 The behavior implemented in 3.41 caused too much slowdown.
835 * A dependency is NOT considered newer than its dependent if
836 they have the same modification time. The behavior implemented
837 in 3.43 conflicts with RCS.
841 * Dependency loops are no longer fatal errors.
843 * A dependency is considered newer than its dependent if
844 they have the same modification time.
848 * The variables F77 and F77FLAGS are now set by default to $(FC) and
849 $(FFLAGS). Makefiles designed for System V make may use these variables in
850 explicit rules and expect them to be set. Unfortunately, there is no way to
851 make setting these affect the Fortran implicit rules unless FC and FFLAGS
852 are not used (and these are used by BSD make).
856 * Make now checks to see if its hashed directories are changed by commands.
857 Other makes that hash directories (Sun, 4.3 BSD) don't do this.
861 * The `shell' function no longer captures standard error output.
865 * A file beginning with a dot can be the default target if it also contains
866 a slash (e.g., `../bin/foo'). (Unix make allows this as well.)
870 * Archive member names are truncated to 15 characters.
872 * Yet more USG stuff.
874 * Minimal support for Microport System V (a 16-bit machine and a
875 brain-damaged compiler). This has even lower priority than other USG
876 support, so if it gets beyond trivial, I will take it out completely.
878 * Revamped default implicit rules (not much visible change).
880 * The -d and -p options can come from the environment.
884 * Improved support for USG and HPUX (hopefully).
886 * A variable reference like `$(foo:a=b)', if `a' contains a `%', is
887 equivalent to `$(patsubst a,b,$(foo))'.
889 * Defining .DEFAULT with no deps or commands clears its commands.
891 * New default implicit rules for .S (cpp, then as), and .sh (copy and make
892 executable). All default implicit rules that use cpp (even indirectly), use
897 * Giving the -j option with no arguments gives you infinite jobs.
901 * New option: "-l LOAD" says not to start any new jobs while others are
902 running if the load average is not below LOAD (a floating-point number).
904 * There is support in place for implementations of remote command execution
905 in Make. See the file remote.c.
909 * No more than 10 directories will be kept open at once.
910 (This number can be changed by redefining MAX_OPEN_DIRECTORIES in dir.c.)
914 * Archive files will have their modification times recorded before doing
915 anything that might change their modification times by updating an archive
920 * The `MAKELEVEL' variable is defined for use by makefiles.
924 * The recursion level indications in error messages are much shorter than
925 they were in version 3.14.
929 * Leading spaces before directives are ignored (as documented).
931 * Included makefiles can determine the default goal target.
932 (System V Make does it this way, so we are being compatible).
936 * Variables that are defaults built into Make will not be put in the
937 environment for children. This just saves some environment space and,
938 except under -e, will be transparent to sub-makes.
940 * Error messages from sub-makes will indicate the level of recursion.
942 * Hopefully some speed-up for large directories due to a change in the
943 directory hashing scheme.
945 * One child will always get a standard input that is usable.
947 * Default makefiles that don't exist will be remade and read in.
951 * Count parentheses inside expansion function calls so you can
952 have nested calls: `$(sort $(foreach x,a b,$(x)))'.
956 * Several bug fixes, including USG and Sun386i support.
958 * `shell' function to expand shell commands a la `
960 * If the `-d' flag is given, version information will be printed.
962 * The `-c' option has been renamed to `-C' for compatibility with tar.
964 * The `-p' option no longer inhibits other normal operation.
966 * Makefiles will be updated and re-read if necessary.
968 * Can now run several commands at once (parallelism), -j option.
970 * Error messages will contain the level of Make recursion, if any.
972 * The `MAKEFLAGS' and `MFLAGS' variables will be scanned for options after
975 * A double-colon rule with no dependencies will always have its commands run.
976 (This is how both the BSD and System V versions of Make do it.)
980 (Changes from versions 1 through 3.05 were never recorded. Sorry.)
982 -------------------------------------------------------------------------------
983 GNU Make is free software; you can redistribute it and/or modify it under the
984 terms of the GNU General Public License as published by the Free Software
985 Foundation; either version 2, or (at your option) any later version.
987 GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
988 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
989 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
991 You should have received a copy of the GNU General Public License along with
992 GNU Make; see the file COPYING. If not, write to the Free Software
993 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.