summaryrefslogtreecommitdiff
path: root/read.c
AgeCommit message (Collapse)AuthorFilesLines
2007-07-04* Update to GPLv3Paul Smith1-4/+4
* Update copyright to 2007 * Fix download URL for translation files (thanks to Thiemo Seufer)
2007-06-19Fix a core dump when reading_file is 0 (20033).Paul Smith1-3/+3
Fix some manual typos (20018).
2007-03-20This is a major update, which switches virtually every allocated-but-not-freedPaul Smith1-203/+254
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-4/+4
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-110/+102
- 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-07Code cleanup: Remove all references to PARAMS() & ansi2knr.Paul Smith1-22/+21
2006-03-17Fixed Savannah bug #16053.Boris Kolpackov1-18/+7
2006-02-14Some memory leak cleanups (found with valgrind).Paul Smith1-11/+8
2006-02-11Last of the copyright updates.Paul Smith1-1/+2
2006-02-11Update copyright and license notices on all files.Paul Smith1-13/+10
Added new file strcache.c to various non-UNIX makefiles and build scripts.
2006-02-10- New code capability: a read-only string cache. Start of solution forPaul Smith1-10/+17
Savannah bug #15182, but not much uses it yet. Coming shortly. - Added short-circuiting $(and ..) and $(or ...) functions.
2006-01-04Various changes getting ready for the release of 3.81.Paul Smith1-2/+4
- Updates to make.texi and make.1 and other documentation - Some VMS patches - Fix minor bugs reported on the mailing list and from Debian.
2005-12-14Fixed record_target_var to initialize variable's export field with v_defaultBoris Kolpackov1-2/+1
instead of leaving it "initialized" by whatever garbage happened to be on the heap.
2005-12-11Extend .SECONDEXPANSION to implicit rules. Final fix for bug #13781.Paul Smith1-5/+1
2005-11-14Implemented the .INCLUDE_DIRS special variable. It expands to a listBoris Kolpackov1-1/+6
of directories that make searches for included makefiles.
2005-10-26Fix a crash I introduced last-minute.Paul Smith1-4/+8
Try to avoid extraneous rebuilds of template files.
2005-10-24Make second expansion optional (partial implementation).Paul Smith1-80/+50
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-08-10Fixed Savannah bug #13881.Boris Kolpackov1-12/+12
2005-08-08- Fixed a bug reported by Michael Matz regarding handling of parallelPaul Smith1-13/+10
jobs after a failed job. - Enhancements to WINDOWS32 code from Eli Zaretskii. - Add Microsoft Project files from J. Grant.
2005-06-27Fix strerror() handling for systems which set ANSI_STRING.Paul Smith1-5/+3
Don't print errors if "include" is specified with no arguments. New test suite for the $(shell ...) function.
2005-06-25Fix Savannah bug # 13478. If -L is given, take the latest mtime for aPaul Smith1-3/+0
symlink even if it is "dangling" (it doesn't resolve to a real file).
2005-06-25Fix Savannah bug #1454: skip over semicolons (and comments) inside variablePaul Smith1-18/+77
references in target definition lines.
2005-05-13Implement new "if... else if... endif" semantics.Paul Smith1-76/+119
2005-05-03Fix problems with losing tokens in the jobserver, reported by GrantPaul Smith1-13/+10
Taylor. There are two forms of this: first, it was possible to lose tokens when using -j and -l at the same time, because waiting jobs were not checked when determining whether any jobs were outstanding. Second, if you had an exported recursive variable that contained a $(shell ...) function there is a possibility to lose tokens, since a token was taken but the child list was not updated until after the shell function was complete. To resolve this I introduced a new variable that counted the number of tokens we have obtained, rather than checking whether there were any children on the list. I also added some sanity checks to make sure we weren't writing back too many or not enough tokens. And, the master make will drain the token pipe before exiting and compare the count of tokens at the end to what was written there at the beginning. Also: * Ensure a bug in the environment (missing "=") doesn't cause make to core. * Rename the .DEFAULT_TARGET variable to .DEFAULT_GOAL, to match the terminology in the documentation and other variables like MAKECMDGOALS. * Add documentation of the .DEFAULT_GOAL special variable. Still need to document the secondary expansion stuff...
2005-04-13Fix performance degradation introduced by the second expansion feature.Paul Smith1-27/+38
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-08Fix some Savannah bugs.Paul Smith1-0/+2
Updates to docs (still need more work here) and NEWS file. New language.
2005-03-09Fixed Savannah bug #12266.Boris Kolpackov1-2/+2
2005-03-03Fixed stem termination and stem triple-expansion bugs.Boris Kolpackov1-19/+4
2005-03-01Fixed Savannah bug #12180.Boris Kolpackov1-1/+1
2005-02-28* New feature: -L optionPaul Smith1-1/+8
* 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-41/+86
2005-02-27Implementation of the second expansion in explicitBoris Kolpackov1-171/+87
rules, static pattern rules and implicit rules.
2004-10-05Moved expansion of simple pattern-specific variables from the rebuild stageBoris Kolpackov1-1/+6
to the read stage.
2004-09-21Some code cleanups and efficiency enhancements. As far as I can tellPaul Smith1-32/+28
none of these have impacts that are visible to the user (although in some cases that appears to be nothing more than dumb luck :-/).
2004-09-21Fix some bugs in variable pattern substitution (e.g. $(VAR:A=B)),Paul Smith1-2/+2
reported by Markus Mauhart <qwe123@chello.at>. One was a simple typo; to fix the other we call patsubst_expand() for all instances of variable substitution, even when there is no '%'. We used to call subst_expand() with a special flag set in the latter case, but it didn't work properly in all situations. Easier to just use patsubst_expand() since that's what it is.
2004-05-16Various enhancementsPaul Smith1-5/+3
- OS/2 Patches - OpenVMS updates - Sanitize the handling of -include/sinclude with and without -k - Fix the setting of $< for order-only rules.
2004-03-22Numerous updates and bug fixes.Paul Smith1-1/+1
A number of W32 cleanups from J.Grant. A number of OS/2 cleanups from Andreas Buening. Various random bug fixes.
2004-01-21Many bug fixes etc.Paul Smith1-21/+24
- 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-05-02- Fix bug #1405: allow multiple pattern-specific variables to match a target.Paul Smith1-16/+20
- Fix some uncleanliness about the implementation of patterns-specific vars. - Some enhancements to the OS/2 port.
2003-03-24Add support for OS/2, contributed by Andreas Buening <andreas.buening@nexgo.de>Paul Smith1-4/+8
Also a small patch from Hartmut Becker <Hartmut.Becker@compaq.com> for VMS.
2003-01-30Fix bug #2238: the read.c:eval() function was not entirely reentrant.Paul Smith1-7/+11
Apply patch #1022: fix a memory corruption on very long target-specific variable definition lines.
2003-01-30Portability fix for glob.h building in FreeBSD ports system.Paul Smith1-4/+10
Implement a fix for bug # 2169: too many OSs, even major OSs like Solaris, don't properly implement SA_RESTART: important system calls like stat() can still fail when SA_RESTART is set. So, forget the BROKEN_RESTART config check and get rid of atomic_stat() and atomic_readdir(), and implement permanent wrappers for EINTR checking on various system calls (stat(), fstat(), opendir(), and readdir() so far).
2002-10-25Fix eval bugs 1516 and 1517.Paul Smith1-17/+38
2002-10-14Convert the source code to use ANSI C style function definitions andPaul Smith1-75/+27
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-13Fix bug#1379: don't use alloca() where it could overrun the stack size.Paul Smith1-9/+22
Implemented enhancement #1391: allow "export" in target-specific variable definitions. Change the Info name of the "Automatic" node to "Automatic Variables". Add text clarifying the scope of automatic variables to that section.
2002-10-05Fix core dump on malformed variable line (Debian bug #81656)Paul Smith1-10/+13
Allow SysV-style variable references to use {} in addition to (). Add variable.h to the POTFILES.in since it has a translatable string.
2002-10-04Fix K&R-isms found on SunOS 4.1.4 builds.Paul Smith1-4/+8
2002-09-23Fix a bug handling target/prerequisite names containing commentPaul Smith1-7/+1
characters.
2002-09-18Fix a bug exporting/unexporting multiple variables in one command.Paul Smith1-25/+20
Update the text about reporting bugs.
2002-09-17Fix bug #940 (from the Savannah bug tracker): make sure that target-Paul Smith1-2/+10
specific variables work correctly in conjunction with double-colon targets.