summaryrefslogtreecommitdiff
path: root/file.c
AgeCommit message (Collapse)AuthorFilesLines
2007-03-20This is a major update, which switches virtually every allocated-but-not-freedPaul Smith1-194/+216
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.
2006-11-18Fix from Eli for incorrect value of $(MAKE) on Cygwin.Paul Smith1-1/+1
A few changes from char* to void* where appropriate, and removing of unnecessary casts. Much more work on const-ifying the codebase. This round involves some code changes to make it correct. NOTE!! There will almost certainly be problems on the non-POSIX ports that will need to be addressed after the const changes are finished: they will need to be const-ified properly and there may need to be some changes to allocate memory, etc. as well. The next (last?) big push for this, still to come, is const-ifying the filenames in struct file, struct dep, etc. This will allow us to store file names in the string cache and finally resolve Savannah bug #15182 (make uses too much memory), among other advantages.
2006-04-09Another round of cleanups:Paul Smith1-9/+9
- 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-03-17Fixed Savannah bug #16053.Boris Kolpackov1-6/+18
2006-02-20- Memory cleanups, found with valgrind.Paul Smith1-25/+29
- 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-11Last of the copyright updates.Paul Smith1-1/+2
2006-02-11Update copyright and license notices on all files.Paul Smith1-14/+11
Added new file strcache.c to various non-UNIX makefiles and build scripts.
2006-02-06Fix Savannah bugs # 15341, 15534, and 15533.Paul Smith1-8/+14
Rewrite large chunks of the "Commands" section of the manual to better describe then backslash-newline handling, the SHELL variable, etc.
2005-10-24Make second expansion optional (partial implementation).Paul Smith1-76/+152
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-04-13Fix performance degradation introduced by the second expansion feature.Paul Smith1-20/+35
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-03-15Fixed Savannah bug #12320.Boris Kolpackov1-93/+107
2005-02-28* New feature: -L optionPaul Smith1-0/+12
* 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-27Implementation of the .DEFAULT_TARGET special variable.Boris Kolpackov1-1/+1
2005-02-27Implementation of the second expansion in explicitBoris Kolpackov1-12/+97
rules, static pattern rules and implicit rules.
2004-09-21Fixed bug in implicit rule prerequisite evaluation code. Added test.Boris Kolpackov1-1/+2
2004-05-16Various enhancementsPaul Smith1-1/+5
- OS/2 Patches - OpenVMS updates - Sanitize the handling of -include/sinclude with and without -k - Fix the setting of $< for order-only rules.
2004-02-24Many compiler warning cleanups.Paul Smith1-1/+1
Small fixes for W32 (from Jonathan Grant <jg-make@jguk.org>) Maintainer enhancements to clean up the tree.
2004-01-21Many bug fixes etc.Paul Smith1-0/+3
- Apply a fix for the "thundering herd" problem when using "-j -l". This also fixes bug #4693. - Fix bug #7257: allow functions as ifdef arguments - Fix bug #4518: make sure we print all double-colon rules with -p. - Upgrade to autconf 2.58/automake 1.8/gettext 0.13.1 - Various doc cleanups, etc.
2003-03-28Fix bug #2515: the .SECONDARY target with no prerequisites wasn'tPaul Smith1-1/+13
behaving properly (if you listed prerequisites it worked properly).
2003-03-25Fix bug #2892.Paul Smith1-1/+1
More OS/2 updates from Andreas Buening. Upgrade build system to autoconf 2.57 and automake 1.7.3.
2002-10-14Convert the source code to use ANSI C style function definitions andPaul Smith1-38/+20
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-04Fix K&R-isms found on SunOS 4.1.4 builds.Paul Smith1-3/+7
2002-08-01New variables, .VARIABLES and .TARGETS.Paul Smith1-0/+49
2002-07-11Install Greg McGary's patches to port the id-utils hashing functions toPaul Smith1-277/+221
GNU make. Also he provides some other performance fixups after doing some profiling of make on large makefiles. Modify the test suite to allow the use of Valgrind to find memory problems.
2002-07-09Documentation and tests for order-only prerequisites.Paul Smith1-2/+17
Add a new test suite for automatic variables.
2002-05-10Fix Debian bug #144306: pass target-specific variables into the environmentPaul Smith1-1/+2
properly. Fix configure: allow cross-compilation; fix getloadavg (still needs _lots_ of work!) Let $(call ...) functions to be self-referencing. Lets us do transitive closures, for example.
2000-10-05* Various bug fixes.Paul Smith1-12/+18
* New Galician translation.
2000-07-30* Various fixes; see the ChangeLog.Paul Smith1-22/+26
2000-07-07* Minor code cleanupsPaul Smith1-4/+11
* Fix for PR/1811, from Paul Eggert.
2000-06-20* More updates and fixes.Paul Smith1-20/+10
2000-06-19* Various fixes for problems in the 3.79.0.1 pretest.Paul Smith1-1/+2
2000-06-14* More fixes for configuring gettext correctly.Paul Smith1-1/+1
2000-06-13* Some timestamp fixes from Paul Eggert.Paul Smith1-10/+50
* Fix compilation on Linux; use libintl.h and not gettext.h when using the system gettext.
2000-06-07* Lots of bug fixes and cleanup; new i18n files, etc.Paul Smith1-3/+21
2000-03-27* Handle case of empty static pattern rule prerequisites.Paul Smith1-2/+1
* Fix linenumbers in error messages for rule definitions.
2000-03-26* Ignore attempt to change a file into itself.Paul Smith1-5/+5
* Define COFLAGS to avoid unknown variable warning. * Fix some usec problems on UnixWare. * Don't remove .INTERMEDIATE targets specified on the command line.
2000-01-22* Implement GNU gettext internationalization support in GNU make.Paul Smith1-2/+3
2000-01-22* Merge VMS patches by Hartmut Becker.Paul Smith1-6/+10
1999-12-18* Fix problems with double-colon rules.Paul Smith1-2/+2
* Fix problems with INTERMEDIATE rules.
1999-11-17* Many cleanups and bugfixes.Paul Smith1-0/+4
* New handling of += in target-specific variables.
1999-10-15* Fix PR/1394.Paul Smith1-3/+3
* Apply changes from Paul Eggert. * Many other cleanups (index/rindex --> strchr/strrchr, etc.)
1999-08-24* Terminology change in docs and code.Paul Smith1-3/+3
1999-07-28* Add gettext macros to start i18n support.Paul Smith1-37/+37
1999-07-22* Installed new versions of GLIBC glob library.Paul Smith1-0/+3
* Installed Tim Magill's "graph pruning" performance enhancement. * Update version to 3.77.90 for the release. * Require automake 1.4.
1999-07-15* Fix up and document $(apply ...) function.Paul Smith1-0/+3
1999-03-05* Update FSF address info in copyright notices.Paul Smith1-1/+2
* Update maintainers build process; remove GNUmakefile. Require builders to run automake && autoreconf by hand. * Use AC_SUBST_FILE to get the maintMakefile included, rather than GNU make's include directive, which conflicts with automake 1.4's include directive.
1998-10-03Checkpoint changes. Bug fixes, mostly.Paul Smith1-18/+67
1998-07-30GNU make release 3.77.Paul Smith1-5/+20
1997-08-27Updates for GNU make 3.75.92.Paul Smith1-9/+2
1997-08-18Bug fixes and automake changes.Paul Smith1-0/+17