Commit graph

236 commits

Author SHA1 Message Date
Paul Smith
30b2e4207d When .POSIX: is specified use POSIX-standard macro values by default. 2012-09-09 19:19:15 +00:00
Paul Smith
cf1c79c9a3 Improve handling for escaped colons in prerequisite lists.
Fixes Savannah bug #12126 and bug #16545
2012-03-04 16:53:50 +00:00
Paul Smith
eb632d7676 Ensure appending private variables in pattern-specific target variables.
Fixes Savannah bug #35468.
2012-03-04 08:09:09 +00:00
Paul Smith
23c2b99e9d Convert all "`'" quotes to "''" per new GNU Coding Standard guidelines.
Fixes Savannah bug #34530.
2012-03-04 00:24:20 +00:00
Paul Smith
405c89ba1e Ensure that .ONESHELL works with .SHELLFLAGS options containing whitespace.
See Savannah bug #35397.
2012-03-03 22:56:20 +00:00
Paul Smith
a77c5c0910 Fix Savannah bug #35410: handle escape chars in filter/filter-out
Also add a valgrind suppression file for Guile-enabled make.
2012-03-03 22:12:46 +00:00
Paul Smith
88f1bc8b55 Modify backslash/newline handling for POSIX.
We fixed Savannah 16670 but that broke previously-working makefiles
that relied on the GNU make behavior.  The POSIX behavior doesn't
seem to me to be better, and can be obtained using GNU make as well,
so put it back as the default behavior and require .POSIX to
get the POSIX behavior.
Add a new section to the manual discussing backslash/newline handling.
Update the test suite.
2012-03-03 18:45:08 +00:00
Paul Smith
ef6461611b Add support for "::=" simple assignment operator.
The next POSIX standard will define "::=" to have the same behavior
as GNU make's ":=", so add support for this new operator.
2012-01-30 00:21:57 +00:00
Paul Smith
fca11f6039 Create a new function $(file ...) 2012-01-29 18:12:22 +00:00
Paul Smith
c992c4d80f Add GNU Guile as an optional embedded scripting language for make.
On configure-enabled systems, configure will detect Guile installed
(using pkg-config, which is how GNU Guile is distributed) and enable
it if so.

On all non-configure-enabled systems, currently, the default is for
Guile support to be disabled.
2012-01-15 22:41:53 +00:00
Paul Smith
3057357c0a Add prerequisites to ensure ordering of results. 2011-12-10 17:13:14 +00:00
Paul Smith
4f47fbf953 Be sure to start parsing prereqs in the right place even if there are
escape characters (backslashes) in the target name.
See Savannah bug #33399
2011-11-14 07:31:06 +00:00
Paul Smith
d472624f33 When we re-exec the master makefile in a jobserver environment, ensure
that MAKEFLAGS is set properly so the re-exec'd make runs in parallel.
See Savannah bug #33873.
2011-09-18 23:39:26 +00:00
Paul Smith
0369a93825 We compute various values for vpath lookup the first time through
and store them in static variables; however one value (std_dirs)
was not being stored statically so the second time through it was
not set.
Fixes Savannah bug #32511
2011-09-18 20:52:13 +00:00
Paul Smith
a5c774a51b Ensure variables defined in $(call ...) have global scope
Add a note about using #!/usr/bin/make -f to the manual.
Clean up the w32 subdirectory in the dist tarball.
2011-09-12 05:29:58 +00:00
Paul Smith
9a9f83e8b5 Ensure that -n takes precedence over -t.
Patch from Michael Witten <mfwitten@gmail.com>
2011-09-02 05:37:54 +00:00
Paul Smith
e4d5d43424 Save strings we're expanding in case an embedded eval causes them
to be freed (if they're the value of a variable that's reset for example).
See Savannah patch #7534
2011-08-29 16:20:19 +00:00
Paul Smith
b06b8c64a2 Fix another error related to whitespace handling in archives.
Newer version of VMS support strncasecmp() so update the config.h.
2011-06-12 16:22:04 +00:00
Paul Smith
f15efca811 Ensure private variables are not used when appending target-specific
variables.  Fixes Savannah bug #32872.
2011-05-07 20:03:49 +00:00
Paul Smith
b664d3a91d Inverted the boolean test from what I wanted it to be. Added a
regression test to make sure this continues to work.
2011-05-07 14:36:11 +00:00
Paul Smith
6979e7e43b Use the same algorithm for counting the number of words to sort as we
use to break up the list of words, so we're sure to get the same number.
Fixes Savannah bug #33125
2011-05-02 12:35:01 +00:00
Paul Smith
b34438bee8 Add new feature: != shell assignment for portability with BSD make.
Feature submitted by David Wheeler.
2011-04-18 01:25:20 +00:00
Paul Smith
ae2ab76fac Check if the target-specific variable is the same as the global
variable, and if so don't try to update it.  Savannah bug #31743.
2010-11-30 14:48:52 +00:00
Paul Smith
391456aad7 Improve backslash/newline handling to adhere to POSIX requirements. 2010-11-06 21:56:23 +00:00
Paul Smith
a86d1693ba Bump the version to 3.82.90.
Fix some doc bugs.
Implement the --trace flag.
Show filename/linenumber on error.
2010-08-29 23:05:26 +00:00
Paul Smith
5acda13ace - Fix the NEWS file to be accurate
- Add oneshell to $(.FEATURES) (forgot that!)
- Fix Savannah bug #30612: handling of archive references with >1 object
2010-08-14 02:50:14 +00:00
Paul Smith
036760a9fd Fix Savannah bug #30723: expand MAKEFLAGS before we re-exec after
rebuilding makefiles.
2010-08-10 07:35:34 +00:00
Paul Smith
95f1a32d27 Release GNU make 3.82
- Update tests for Solaris bizarre-ness
- Update files for release
2010-07-28 05:39:50 +00:00
Paul Smith
fba20a776d - Many fixup patches from Savannah.
- Fix the test suite on Solaris (from Boris)
- Update the manual for .ONESHELL
2010-07-19 07:10:53 +00:00
Paul Smith
bbe7b86718 Forgot to add the ONESHELL regression tests. 2010-07-12 05:29:25 +00:00
Paul Smith
c7b469f0f3 - Enhance .POSIX to set -e when invoking shells, as demanded by a
backward-incompatible change in the 2008 POSIX specification.
- Add the .SHELLFLAGS variable so people can choose their own shell flags.
- Add tests for this.
- Add documentation for this.
2010-07-06 06:37:42 +00:00
Paul Smith
c78b7265bd Fixups for warnings on Windows (esp 64bit). 2010-07-05 18:32:03 +00:00
Paul Smith
97f106fa10 - Add whitespace to command line invocation in features/recursion
- Set up .FEATURES with separate calls for optional features, as some
  compilers don't like conditionals inside macro invocations.
2010-07-01 07:16:00 +00:00
Boris Kolpackov
fe43fa9de3 Implement linker-compatible library search. 2009-11-12 16:42:36 +00:00
Paul Smith
4e51b6d9a4 New command line option: --eval=STRING will cause STRING to be
evaluated as a makefile statement before the first makefile is
read.
2009-10-25 00:46:52 +00:00
Boris Kolpackov
bd2d124f27 Fix savannah bug 25780. Optimize things a bit. 2009-10-06 12:36:29 +00:00
Boris Kolpackov
4254e88cfa Implement the new undefine directive. 2009-10-06 06:56:57 +00:00
Paul Smith
acbdc33e1c Add a test for another (still open) bug. 2009-10-04 19:18:16 +00:00
Paul Smith
f87715a62c - Include <alloca.h> even on non-__GNUC__ systems.
- Add some tests for unresolved bugs.
2009-10-03 20:08:20 +00:00
Boris Kolpackov
56653d8524 Fix Savannah bugs #15110, #25493, #12686, and #17740. 2009-09-30 09:54:26 +00:00
Paul Smith
f907a4d90c - Update manual description for pattern rule search algorithm
- Add new "-all" flag to the test suite to run tests that don't pass yet
- Add some non-passing tests
- Fix from Andreas Buening for OS/2.
2009-09-28 23:08:49 +00:00
Boris Kolpackov
f5891a26d8 Implement the shortest stem first search order for pattern-specific variables and pattern rules. 2009-09-28 12:31:55 +00:00
Paul Smith
d65b267e4a - Fix broken handling of order-only prereqs in secondary expansion
of implicit rules.
- Fix leaked memory when dealing with implicit rule chains that
  have file variables or pattern variables.
2009-09-24 20:59:22 +00:00
Paul Smith
0afbbf8595 - Rework secondary expansion so we only defer it if there's a possibility
it might be needed: for most situations we parse prereqs immediately as
  we used to.  Reduces memory usage.
- Fixes Savannah bug #18622.
2009-09-24 02:41:44 +00:00
Paul Smith
be6b22a283 - Fix Savannah bug #13529 2009-06-14 06:08:11 +00:00
Paul Smith
dceb954f9c - Fix Savannah bug #13401 2009-06-13 23:10:52 +00:00
Paul Smith
bf9822658f - Fix Savannah bug 17825
- Fix Savannah bug 21231
2009-06-13 21:21:48 +00:00
Paul Smith
c8840352ac - Fix Savannah bug #19108
- Fix Savannah bug #17752
- Test suite:
  * When tests fail keep a "run" file containing the command invoked.
  * Support for the Valgrind "memcheck" and "massif" tools.
2009-06-10 02:21:09 +00:00
Paul Smith
d4ee001292 - Fix Savannah bug #18124
- Fix Savannah bug #17521
- Fix Savannah bug #16401
- Fix Savannah bug #16469
- Fix Savannah bug #16473
2009-06-09 15:35:38 +00:00
Paul Smith
a72bff7cb3 - Fix Savannah bug #24622 2009-06-07 18:16:15 +00:00
Paul Smith
0b30c8d9ce - Add a new test suite for LIBPATTERNS
- Fix Savannah bug #21198
- Fix Savannah bug #21823
- Fix Savannah bug #22010
2009-06-07 17:40:06 +00:00
Paul Smith
b9f831b858 - Work around a bug in glibc glob(3), by avoiding GLOB_NOCHECK.
- Fix issue in very parallel builds found building glibc.
2009-06-06 23:16:46 +00:00
Paul Smith
71385e1225 - Add forgotten variable/define test suite
- Skip initial whitespace including formfeeds, vertical tab, etc.
- Add tests for that
- Fix the variable/SHELL test; it was wrong!
2009-06-05 01:17:29 +00:00
Paul Smith
81f3e4babd - Modify access of config and gnulib Savannah modules to use GIT
- Fix Savannah bug #24655.
- Fix Savannah bug #24588.
- Fix Savannah bug #24277.
- Fix Savannah bug #25697.
- Fix Savannah bug #25694.
- Fix Savannah bug #25460.
- Fix Savannah bug #26207.
- Fix Savannah bug #25712.
- Fix Savannah bug #26593.
- Fix various doc issues.
2009-06-04 06:30:27 +00:00
Paul Smith
5b4d419476 Add 'private' variable modifier, feature submitted by Ramon Garcia.
Rework the parser for variables to allow multiple modifiers and also
allow for variables and targets with modifier names, like "export" and
"private".
2009-05-26 01:31:40 +00:00
Paul Smith
43d81ff866 New special variable: .RECIPEPREFIX
Allows the user to reset the prefix character for introducing recipe lines
from the default (tab) to any other single character, and back again.
Also, reworked the manual to consistently use the word "recipe" to describe
the set of commands we use to update a target, instead of the various
phrases used in the past: "commands", "command lines", "command scripts",
etc.
2007-11-04 21:54:00 +00:00
Paul Smith
19b6504f8a Incorporate Icarus Sparry's fix for 3330 and 15919, and test cases.
One of our translations disappeared from the translations site so remove it.

The fdl.texi file was changed to not contain any @node entries, so add some
around it in make.texi.
2007-08-15 13:53:53 +00:00
Paul Smith
bb4d040fad Fix Savannah bug #20452.
Add a new feature to the test suite suggested by Icarus Sparry:
set a timer before invoking a test, so that if it loops infinitely we
will wake up and have a chance to kill the process and continue.
2007-07-14 02:57:46 +00:00
Paul Smith
6ccf33cdbd This is a major update, which switches virtually every allocated-but-not-freed
string into the strcache.  As a side-effect, many more structure members and
function arguments can/should be declared const.

As mentioned in the changelog, unfortunately measurement shows that this
change does not yet reduce memory.  The problem is with secondary expansion:
because of this we store all the prerequisites in the string cache twice.
First we store the prerequisite string after initial expansion but before
secondary expansion, then we store each individual file after secondary
expansion and expand_deps().  I plan to change expand_deps() to be callable
in either context (eval or snap_deps) then have non-second-expansion
targets call expand_deps() during eval, so that we only need to store that
dependency list once.
2007-03-20 03:02:26 +00:00
Paul Smith
7595f38f62 Fixed a number of documentation bugs, plus some build/install issues:
16304, 16468, 16577, 17701, 17880, 16051, 16652, 16698
Plus some from the mailing list.

Imported a patch from Eli to allow Cygwin builds to support DOS-style
pathnames.
2006-10-01 05:38:38 +00:00
Paul Smith
a8f101d0bc Release GNU make 3.81.
Update NEWS docs.
Enhance the manual to use automake version.texi, and use the canonical
FSF copyright features and statement.
Some $(realpath ...) tests won't work on Windows; leave them out
The jobserver filedescriptor test might fail if some FDs are reserved,
so for now comment out that check.
2006-04-01 06:36:40 +00:00
Paul Smith
94aead216e Minor fixes before the rc2 release. 2006-03-20 03:03:04 +00:00
Paul Smith
24aac7f8f6 Add some alloca(0) calls for systems without "normal" alloca support.
Fix a file descriptor leak with make re-exec while using the jobserver.
Update some release information.
2006-03-20 02:36:36 +00:00
Boris Kolpackov
22886f8a74 Fixed Savannah bug #16053. 2006-03-17 14:24:20 +00:00
Paul Smith
50eb3cf5e5 Fix Savannah bug #15913. 2006-03-15 03:31:30 +00:00
Paul Smith
6d8d9b74d9 Numerous updates to tests for issues found on Cygwin and Windows.
Revert a fix for $? including non-existent files as it shows a bug
in the Linux kernel build.  Give them a release to fix this.
Add some changes from Eli Z. for Windows changes.
2006-03-10 02:20:45 +00:00
Paul Smith
afc4906aca Some test updates for Windows.
Handle SHELL set on the command line properly for windows.
2006-03-08 20:15:08 +00:00
Paul Smith
bde826b18a Make sure we don't introduce a circularity into the variable set linked
list.  Fixes Savannah bug #15757.
2006-02-17 13:29:52 +00:00
Paul Smith
0806a403d6 Fix Savannah bug #106: keep separate track of which variable we are
expanding, and use that info when generating error messages instead of
the file info, where appropriate.
2006-02-15 23:54:42 +00:00
Paul Smith
5a7a42cfce - New code capability: a read-only string cache. Start of solution for
Savannah bug #15182, but not much uses it yet.  Coming shortly.
- Added short-circuiting $(and ..) and $(or ...) functions.
2006-02-10 05:29:00 +00:00
Boris Kolpackov
d0c4e92f11 Fixed Savannah bug #15641. 2006-02-08 17:29:07 +00:00
Paul Smith
a4e3523fe4 Fix Savannah bugs # 15341, 15534, and 15533.
Rewrite large chunks of the "Commands" section of the manual to better
describe then backslash-newline handling, the SHELL variable, etc.
2006-02-06 16:21:59 +00:00
Paul Smith
4cd3539024 Various updates, mainly to the Windows port, from Eli Zaretskii and
Markus Maurhart.
2006-02-01 07:54:22 +00:00
Paul Smith
64e16d6c00 Various changes getting ready for the release of 3.81.
- Updates to make.texi and make.1 and other documentation
- Some VMS patches
- Fix minor bugs reported on the mailing list and from Debian.
2006-01-04 14:45:16 +00:00
Paul Smith
4bd6db9df1 Update the make.1 man page.
Use rm -f instead of rm in the test scripts.  Fixes bug #15085.
2005-12-13 14:44:17 +00:00
Paul Smith
3bcb608bda Extend .SECONDEXPANSION to implicit rules. Final fix for bug #13781. 2005-12-11 15:41:17 +00:00
Boris Kolpackov
0e6c4f5b0e Fixed bug #13022 by setting is_target flag on files that this implicit
pattern rule also makes.
2005-12-09 16:46:19 +00:00
Boris Kolpackov
a34b85490d Fixed bug #14334 by propagate the change of modification time to all the
double-colon entries only if it is the last one to be updated.
2005-12-07 11:33:38 +00:00
Boris Kolpackov
1fd3f9d79c Implemented the flavor function which returns the flavor of
a variable ('simple', 'recursive', or 'undefined').
2005-11-17 07:27:28 +00:00
Boris Kolpackov
3dd1faa5c8 Implemented the .INCLUDE_DIRS special variable. It expands to a list
of directories that make searches for included makefiles.
2005-11-14 15:31:13 +00:00
Paul Smith
82103b1a49 Fix a crash I introduced last-minute.
Try to avoid extraneous rebuilds of template files.
2005-10-26 16:06:30 +00:00
Paul Smith
11095a90f1 Make second expansion optional (partial implementation).
I decided this feature was too impacting to make the permanent default
behavior.  This set of changes makes the default behavior of make the
old behavior (no second expansion).  If you want second expansion, you
must define the .SECONDEXPANSION: special target before the first target
that needs it.

This set of changes ONLY fixes explicit and static pattern rules to work
like this.  Implicit rules still have second expansion enabled all the
time: I'll work on that next.

Note that there is still a backward-incompatibility: now to get the old
SysV behavior using $$@ etc. in the prerequisites list you need to set
.SECONDEXPANSION: as well.
2005-10-24 13:01:39 +00:00
Paul Smith
0ffd22cb44 Preserve the backslash that's printed by echo. 2005-08-29 18:45:31 +00:00
Paul Smith
f7598efb67 Fix make.h preprocessor directive to work better with Windows compilers.
Fix some regression tests to (hopefully) work better on Windows.
2005-08-29 14:11:00 +00:00
Paul Smith
6636dc1d5c If we're on a DOS/W32/OS2 system and we're not using a unixy shell, don't
follow POSIX backslash/newline conventions.

Use a different method for testing the SHELL variable, which hopefully
will work better on non-UNIX systems.
2005-08-25 04:40:10 +00:00
Boris Kolpackov
bf58e35105 Wrapped calls to $(wildcard ) with $(sort) so that the resulting order
is no longer filesystem-dependant.
2005-08-13 19:24:49 +00:00
Boris Kolpackov
e437226241 Fixed Savannah bug #13881. 2005-08-10 10:21:13 +00:00
Paul Smith
b237dff775 - Fixed a bug reported by Michael Matz regarding handling of parallel
jobs after a failed job.
- Enhancements to WINDOWS32 code from Eli Zaretskii.
- Add Microsoft Project files from J. Grant.
2005-08-08 05:08:00 +00:00
Paul Smith
1e9dc3ce45 Various minor updates and code cleanups. 2005-07-12 04:35:13 +00:00
Paul Smith
0e30f46a62 Various fixes and updates from testers of the beta3 release (mostly Windows
and OS/2 changes).
2005-07-04 03:50:59 +00:00
Paul Smith
7dfa2461c3 Cleaned up some problems found with the tests running on a powerful
Solaris system with an EMC NFS storage solution.  Still get some odd
errors here unfortunately related to sub-second timestamps that I just
can't figure out.  It all works if we run the tests in /tmp instead
though :-/.
2005-06-27 22:18:47 +00:00
Paul Smith
261d7b44fa Make sure timestamp problems don't cause the -W test to fail. 2005-06-27 18:53:46 +00:00
Paul Smith
da1b137e38 Fix strerror() handling for systems which set ANSI_STRING.
Don't print errors if "include" is specified with no arguments.
New test suite for the $(shell ...) function.
2005-06-27 01:01:07 +00:00
Paul Smith
d6a7894d3a Fix Savannah bug # 1332: handle backslash-newline pairs in command scripts
according to POSIX rules.
2005-06-26 03:31:29 +00:00
Paul Smith
f388233b03 Fix Savannah bug # 13478. If -L is given, take the latest mtime for a
symlink even if it is "dangling" (it doesn't resolve to a real file).
2005-06-25 23:00:17 +00:00
Paul Smith
6cdaff0948 Fix Savannah bug #1454: skip over semicolons (and comments) inside variable
references in target definition lines.
2005-06-25 21:30:13 +00:00
Paul Smith
1dd9ed1c05 Fix -W foo yielding infinite recursion in some cases of re-exec.
Added a -W test suite.
2005-06-25 20:00:24 +00:00
Paul Smith
978819e1d6 Add a new variable: MAKE_RESTARTS, to count how many times make has re-exec'd.
When rebuilding makefiles, unset -B if MAKE_RESTARTS is >0.
2005-06-25 18:57:28 +00:00
Paul Smith
467115baae Fix Savannah bug # 1328: if stdout is redirected to a full filesystem, we
check for this and exit with an error.
The closeout.c version from gnulib pulls in too much other stuff, and
gnulib requires an ANSI C 89 compliant compiler, while GNU make (so far)
still wants to work on K&R.
2005-06-12 22:22:07 +00:00
Paul Smith
dd30b0552f Fix Savannah bug #11913: ensure that scopes such as foreach, etc. take
precedence over the global scope when they're used in a global context
(such as an eval).
2005-06-09 19:19:20 +00:00