summaryrefslogtreecommitdiff
path: root/rule.c
AgeCommit message (Collapse)AuthorFilesLines
2005-10-24Make second expansion optional (partial implementation).Paul Smith1-2/+3
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-0/+1
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.
2004-03-22Numerous updates and bug fixes.Paul Smith1-15/+0
A number of W32 cleanups from J.Grant. A number of OS/2 cleanups from Andreas Buening. Various random bug fixes.
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.
2003-05-02- Fix bug #1405: allow multiple pattern-specific variables to match a target.Paul Smith1-100/+0
- Fix some uncleanliness about the implementation of patterns-specific vars. - Some enhancements to the OS/2 port.
2002-10-14Convert the source code to use ANSI C style function definitions andPaul Smith1-27/+13
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-07-08Various cleanups reported by people using the alpha release.Paul Smith1-0/+1
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.
2001-08-19Installed the da.po (Danish) translation file.Paul Smith1-1/+1
Fixed some translation string issues.
2000-02-05* Fix PR/1407.Paul Smith1-2/+2
* Keep filename/lineno information for variables, for debugging.
2000-01-22* Merge VMS patches by Hartmut Becker.Paul Smith1-2/+6
1999-10-15* Fix PR/1394.Paul Smith1-3/+3
* Apply changes from Paul Eggert. * Many other cleanups (index/rindex --> strchr/strrchr, etc.)
1999-07-28* Add gettext macros to start i18n support.Paul Smith1-7/+7
1999-07-21* Add configure option to enable dmalloc library.Paul Smith1-2/+2
* Various code cleanups.
1999-07-20* Fix memory leaks, fd leaks, and some long-standing bugs recognizing whenPaul Smith1-0/+13
targets need to have their modtimes rechecked (-n, etc.)
1999-06-14* Various bug fixes.Paul Smith1-21/+23
1999-03-05* Define and use xstrdup() instead of strdup().Paul Smith1-1/+1
1998-10-13Ignore non-empty lines which become empty after variable expansion.Paul Smith1-4/+10
Don't choke on invalid pattern rules if we fail during makefile parsing. Don't dump core if a non-empty command becomes empty after expansion.
1998-10-03Checkpoint changes. Bug fixes, mostly.Paul Smith1-3/+3
1998-07-30GNU make release 3.77.Paul Smith1-3/+105
1996-05-09Thu May 9 13:54:49 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>Roland McGrath1-0/+5
* GNUmakefile (globfiles): Add AmigaDOS support files. (distfiles): Add $(amigafiles). (amigafiles): New variable. Thu Nov 7 10:18:16 1995 Aaron Digulla <digulla@fh-konstanz.de> * Added Amiga support in commands.c, dir.c, function.c, job.c, main.c, make.h, read.c, remake.c * commands.c: Amiga has neither SIGHUP nor SIGQUIT * dir.c: Amiga has filenames with Upper- and Lowercase, but "FileName" is the same as "filename". Added strieq() which is use to compare filenames. This is like streq() on all other systems. Also there is no such thing as "." under AmigaDOS. * function.c: On Amiga, the environment is not passed as envp, there are no pipes and Amiga can't fork. Use my own function to create a new child. * job.c: default_shell is "" (The system automatically chooses a shell for me). Have to use the same workaround as MSDOS for running batch commands. Added HAVE_SYS_PARAM_H. NOFILE isn't known on Amiga. Cloned code to run children from MSDOS. Own version of sh_chars[] and sh_cmds[]. No dup2() or dup() on Amiga. * main.c: Force stack to 20000 bytes. Read environment from ENV: device. On Amiga, exec_command() does return, so I exit() afterwards. * make.h: Added strieq() to compare filenames. * read.c: Amiga needs special extension to have passwd. Only one include-dir. "Makefile" and "makefile" are the same. Added "SMakefile". Added special code to handle device names (xxx:) and "./" in rules. * remake.c: Only one lib-dir. Amiga link-libs are named "%s.lib" instead of "lib%s.a". * main.c, rule.c, variable.c: Avoid floats at all costs. * vpath.c: Get rid of as many alloca()s as possible.
1996-03-20Tue Mar 19 20:21:34 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>Roland McGrath1-4/+17
Merged VMS port from Klaus Kaempf <kkaempf@didymus.rmi.de>. * make.h (PARAMS): New macro. * config.h-vms: New file. * makefile.com: New file. * makefile.vms: New file. * readme.vms: New file. * vmsdir.h: New file. * vmsfunctions.c: New file. * vmsify.c: New file. * file.h: Renamed to filedef.h to avoid conflict with VMS system hdr. * ar.c: Added prototypes and changes for VMS. * commands.c: Likewise. * commands.h: Likewise. * default.c: Likewise. * dep.h: Likewise. * dir.c: Likewise. * expand.c: Likewise. * file.c: Likewise. * function.c: Likewise. * implicit.c: Likewise. * job.c: Likewise. * job.h: Likewise. * main.c: Likewise. * make.h: Likewise. * misc.c: Likewise. * read.c: Likewise. * remake.c: Likewise. * remote-stub.c: Likewise. * rule.c: Likewise. * rule.h: Likewise. * variable.c: Likewise. * variable.h: Likewise. * vpath.c: Likewise. * compatMakefile (srcs): Rename file.h to filedef.h.
1993-10-21entered into RCSRoland McGrath1-3/+8
1993-10-18Formerly rule.c.~16~Roland McGrath1-21/+29
1993-07-09Formerly rule.c.~15~Roland McGrath1-1/+1
1993-06-30Formerly rule.c.~14~Roland McGrath1-3/+16
1993-06-09Formerly rule.c.~13~Roland McGrath1-3/+2
1993-05-24Formerly rule.c.~12~Roland McGrath1-47/+65
1993-04-15Formerly rule.c.~11~Roland McGrath1-1/+2
1993-02-21Formerly rule.c.~10~Roland McGrath1-28/+19
1992-11-13Formerly rule.c.~9~Roland McGrath1-1/+1
1992-11-10Formerly rule.c.~8~Roland McGrath1-1/+1
1992-08-02Formerly rule.c.~7~Roland McGrath1-2/+1
1992-07-14Formerly rule.c.~6~Roland McGrath1-0/+10
1992-05-26Formerly rule.c.~5~Roland McGrath1-1/+1
1992-04-29Formerly rule.c.~4~Roland McGrath1-1/+1
1992-04-26Formerly rule.c.~3~Roland McGrath1-9/+7
1992-03-24Formerly rule.c.~2~Roland McGrath1-4/+9
1992-01-11Initial revisionRoland McGrath1-0/+524