summaryrefslogtreecommitdiff
path: root/file.c
AgeCommit message (Collapse)AuthorFilesLines
2010-07-01- Rename strieq() to patheq() for clarity.Paul Smith1-2/+1
- Convert xmalloc/memset pairs to xcalloc.
2009-12-11(lookup_file) [HAVE_DOS_PATHS]: Treat '\\' like we do with '/'.Eli Zaretskii1-2/+12
2009-10-25Update copyright years.Paul Smith1-2/+2
2009-10-25Various simple code cleanups.Paul Smith1-1/+1
2009-09-24- Rework secondary expansion so we only defer it if there's a possibilityPaul Smith1-176/+205
it might be needed: for most situations we parse prereqs immediately as we used to. Reduces memory usage. - Fixes Savannah bug #18622.
2009-09-16- Add xcalloc() and call itPaul Smith1-4/+2
- 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-06-13- Fix Savannah bug 17825Paul Smith1-2/+2
- Fix Savannah bug 21231
2009-06-07- Fix Savannah bug #24622Paul Smith1-4/+4
2009-06-04- Modify access of config and gnulib Savannah modules to use GITPaul Smith1-1/+2
- 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.
2007-11-04New special variable: .RECIPEPREFIXPaul Smith1-7/+7
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-07-14Fix Savannah bug #20452.Paul Smith1-1/+3
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-04* Update to GPLv3Paul Smith1-4/+4
* Update copyright to 2007 * Fix download URL for translation files (thanks to Thiemo Seufer)
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