Commit graph

76 commits

Author SHA1 Message Date
Boris Kolpackov
174e910a1d Performance improvements 2009-10-05 14:40:18 +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
Boris Kolpackov
48045f99e5 Performance improvement. 2009-09-25 15:51:11 +00:00
Boris Kolpackov
5973926ce6 Merge three parallel arrays into one. Make sure sufficient space is allocated. 2009-09-25 15:44:27 +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
8f30b68871 - Add xcalloc() and call it
- Fix memory errors found by valgrind
- Remove multi_glob() and empower parse_file_seq() to do its job:
  the goal here is to remove the confusing reverse/re-reverse we do on
  the file lists: needed for future fixes.
- Add a prefix arg to parse_file_seq()
- Make concat() variadic so it can take arbitrary #'s of strings
2009-09-16 17:07:01 +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
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
891ebd4d97 * Update to GPLv3
* Update copyright to 2007
* Fix download URL for translation files (thanks to Thiemo Seufer)
2007-07-04 19:35:15 +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
c25294ad3b Another round of cleanups:
- Add more warnings.
- Rename variables that mask out-scope vars with the same name.
- Remove all casts of return values from xmalloc, xrealloc, and alloca.
- Remove casts of the first argument to xrealloc.
- Convert all bcopy/bzero/bcmp invocations to use memcp/memmove/memset/memcmp.
2006-04-09 22:09:24 +00:00
Paul Smith
f222b19158 Code cleanup: Remove all references to PARAMS() & ansi2knr. 2006-04-07 01:43:44 +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
Boris Kolpackov
367a49591e Fixed Savannah bug #16140. 2006-03-22 13:16:03 +00:00
Boris Kolpackov
22886f8a74 Fixed Savannah bug #16053. 2006-03-17 14:24:20 +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
8af9389f87 Fix a potential core dump when merging aliases. Might fix bug #15818.
Revert intermediate file free code.
Suppress some warnings in VMS builds.
2006-02-21 05:21:19 +00:00
Paul Smith
6e0527913c - Memory cleanups, found with valgrind.
- Fix handling of special targets like .SUFFIX for VMS insensitive targets.
- Don't make temporary batch files for -n.  Make sure batch files are created
  in text mode.
2006-02-20 02:14:00 +00:00
Paul Smith
86af3872a9 Some memory leak cleanups (found with valgrind). 2006-02-14 15:42:17 +00:00
Paul Smith
df267b31c5 Fix bug #11183. 2006-02-13 23:38:36 +00:00
Paul Smith
a6bdc58385 Last of the copyright updates. 2006-02-11 22:16:04 +00:00
Paul Smith
586daef9bc Update copyright and license notices on all files.
Added new file strcache.c to various non-UNIX makefiles and build scripts.
2006-02-11 19:02:21 +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
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
Boris Kolpackov
af88a3550a Fixed Savannah bugs #13216 and #13218. 2005-05-31 20:54:30 +00:00
Paul Smith
49ee105c68 Fix performance degradation introduced by the second expansion feature.
I did this by adding intelligence into the algorithm such that the
second expansion was only actually performed when the prerequisite list
contained at least one "$", so we knew it is actually needed.

Without this we were using up a LOT more memory, since every single
target (even ones never used by make) had their file variables
initialized.  This also used a lot more CPU, since we needed to create
and populate a new variable hash table for every target.

There is one issue remaining with this feature: it leaks memory.  In
pattern_search() we now initialize the file variables for every pattern
target, which allocates a hash table, etc.  However, sometimes we
recursively invoke pattern_search() (for intermediate files) with an
automatic variable (alloca() I believe) as the file.  When that function
returns, obviously, the file variable hash memory is lost.
2005-04-13 03:16:33 +00:00
Boris Kolpackov
d584d0c1c6 Fixed Savannah bug #12267. 2005-03-10 09:14:09 +00:00
Boris Kolpackov
2860d3b247 Fixed Savannah bug #12202. 2005-03-04 14:31:09 +00:00
Boris Kolpackov
cb2f200269 Fixed stem termination and stem triple-expansion bugs. 2005-03-03 17:39:48 +00:00
Paul Smith
d2516343bc * New feature: -L option
* New function: $(info ...)
* Disallow $(eval ...) to create prereq relationships inside command scripts
  (caused core dumps)
* Try to allow more tests to succeed in Windows/DOS by sanitizing CRLF and \
* Various bug fixes and code cleanups (see the ChangeLog entry)
2005-02-28 07:48:22 +00:00
Boris Kolpackov
659fc6b55e Implementation of the second expansion in explicit
rules, static pattern rules and implicit rules.
2005-02-27 21:40:23 +00:00
Boris Kolpackov
73e7767ffc Fixed bug in implicit rule prerequisite evaluation code. Added test. 2004-09-21 20:23:12 +00:00
Paul Smith
2b3ee46f4e Enhancements to the documentation (fixes bugs #1772 and 4898).
Add "!" to the list of shell escape characters: POSIX sh allows it to be
used to negate the return value of the command.
2004-01-08 03:17:08 +00:00
Paul Smith
a35db90275 Fix order-only prerequisites for pattern rules. (Savannah patch #2349).
Add a regression test for this.

Older libraries don't allow *alloc(0), so make sure we don't ever do that.
2004-01-07 19:36:39 +00:00
Paul Smith
1a5beef51f - Fix bug #1405: allow multiple pattern-specific variables to match a target.
- Fix some uncleanliness about the implementation of patterns-specific vars.
- Some enhancements to the OS/2 port.
2003-05-02 01:44:59 +00:00
Paul Smith
6374309c6d Convert the source code to use ANSI C style function definitions and
enable the automake ansi2knr capability.

Right now this doesn't quite build using a K&R compiler because of a
problem with the loadavg test program, but the rest of the code works.  I'm
asking the automake list about this problem.
2002-10-14 21:54:04 +00:00
Paul Smith
988deb489b Fix for complex situations where directories are declared as prerequisites.
Info on this fix from barkalow@reputation.com: thanks!

Some updates/cleanups of some of the tests; added a forgotten -t test, etc.
2002-09-04 07:26:19 +00:00
Paul Smith
299c72e6ed Update to a new version of automake and gettext.
Invent a new macro HAVE_DOS_PATHS and change various instances of:
  #if defined(WINDOWS) || defined(__MSDOS__)
to use the new macro instead.  This should help make the OS/2 port
cleaner, as well.
Invent a cvs-clean maintainer target that tries to get the workspace
back to the state it was in after a CVS checkout.
New language.
2002-08-10 01:27:16 +00:00
Paul Smith
724925be2b Various cleanups reported by people using the alpha release.
Incorporate "order-only" prerequisites patch.  Wrote a test for it.
The test shows what might be a bug in the code; I need to look at it
more closely (anyway it doesn't behave as I expected).  Also I haven't
done the docs yet.
2002-07-08 13:05:02 +00:00
Paul Smith
8572d6adf0 Major updates in preparation for 3.80.
New version of the manual, put into the doc subdir.
Enhancements: $(eval ...) and $(value ...) functions, various bug
fixes, etc.  See the ChangeLog.
More to come.
2002-07-08 02:26:47 +00:00
Paul Smith
3e6f48b444 * More updates and fixes. 2000-06-20 05:48:40 +00:00
Paul Smith
0d70d05458 * Various fixes for problems in the 3.79.0.1 pretest. 2000-06-19 21:22:44 +00:00
Paul Smith
5577cdc261 * Merge VMS patches by Hartmut Becker. 2000-01-22 05:43:03 +00:00
Paul Smith
af44f16799 * Fix problems with double-colon rules.
* Fix problems with INTERMEDIATE rules.
1999-12-18 17:43:47 +00:00
Paul Smith
217ca5d910 * Add new debugging output level selection feature. 1999-11-22 06:15:35 +00:00
Paul Smith
3e26bde6db * Fix PR/1394.
* Apply changes from Paul Eggert.
* Many other cleanups (index/rindex --> strchr/strrchr, etc.)
1999-10-15 07:00:58 +00:00