summaryrefslogtreecommitdiff
path: root/commands.c
AgeCommit message (Collapse)AuthorFilesLines
2010-11-06Improve backslash/newline handling to adhere to POSIX requirements.Paul Smith1-4/+13
2010-07-13Update copyrights for 2010.Paul Smith1-2/+2
2010-07-12Add the beginning of the .ONESHELL special feature.Paul Smith1-37/+54
Original patch by David Boyce. Modified by Paul Smith.
2009-10-25Update copyright years.Paul Smith1-2/+2
2009-10-25Various simple code cleanups.Paul Smith1-4/+6
2009-10-07Minor fix and code rework.Boris Kolpackov1-12/+13
2009-10-06Fix savannah bug 25780. Optimize things a bit.Boris Kolpackov1-20/+72
2009-09-24- Rework secondary expansion so we only defer it if there's a possibilityPaul Smith1-5/+10
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-1/+1
- 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-1/+1
- Fix Savannah bug 21231
2009-05-24Found this change in an old CVS workspace: rewrite savestring() to thePaul Smith1-1/+1
more standard xstrndup().
2007-11-04New special variable: .RECIPEPREFIXPaul Smith1-6/+3
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-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-2/+2
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-25/+28
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-16/+13
- 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-2/+2
2006-02-20- Memory cleanups, found with valgrind.Paul Smith1-3/+3
- 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-13/+11
Added new file strcache.c to various non-UNIX makefiles and build scripts.
2005-08-08- Fixed a bug reported by Michael Matz regarding handling of parallelPaul Smith1-2/+30
jobs after a failed job. - Enhancements to WINDOWS32 code from Eli Zaretskii. - Add Microsoft Project files from J. Grant.
2005-03-04- Missing docs for $|Paul Smith1-0/+5
- Update NEWS and AUTHORS files. - Fix support request #103195. - Apply patch #3679 - Fix handling of sys_siglist in autoconf/etc.
2005-02-27Implementation of the second expansion in explicitBoris Kolpackov1-1/+1
rules, static pattern rules and implicit rules.
2004-09-21Remove sindex() and replace with strstr().Paul Smith1-7/+5
Windows: allow users to set SHELL to cmd.exe and have it behave as if no UNIX shell were found.
2004-05-16Various enhancementsPaul Smith1-3/+9
- 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.
2003-01-30Portability fix for glob.h building in FreeBSD ports system.Paul Smith1-1/+3
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-14Convert the source code to use ANSI C style function definitions andPaul Smith1-15/+7
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-6/+15
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-09-12Fixups for the release. One bug fix, some automake complaint fixes,Paul Smith1-1/+1
and a function return type fix for older systems.
2002-07-09Documentation and tests for order-only prerequisites.Paul Smith1-1/+1
Add a new test suite for automatic variables.
2002-07-08Various cleanups reported by people using the alpha release.Paul Smith1-46/+65
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-05-21Some VMS fixes sent by John Fowler.Paul Smith1-1/+1
Fix: make flags on some lines of define/endef don't affect other lines
2000-06-13* Some timestamp fixes from Paul Eggert.Paul Smith1-2/+5
* 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-1/+1
2000-02-05* Fix PR/1407.Paul Smith1-2/+2
* Keep filename/lineno information for variables, for debugging.
1999-10-15* Fix PR/1394.Paul Smith1-8/+8
* Apply changes from Paul Eggert. * Many other cleanups (index/rindex --> strchr/strrchr, etc.)
1999-10-13* Fix PR/1379: -n/-q behaves correctly when all commands are recursive.Paul Smith1-84/+86
1999-07-28* Add gettext macros to start i18n support.Paul Smith1-8/+8
1999-07-21* Add configure option to enable dmalloc library.Paul Smith1-1/+1
* Various code cleanups.
1999-07-20* Fix memory leaks, fd leaks, and some long-standing bugs recognizing whenPaul Smith1-0/+1
targets need to have their modtimes rechecked (-n, etc.)
1999-06-14* Various bug fixes.Paul Smith1-1/+1
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-8/+9
1997-08-27Updates for GNU make 3.75.92.Paul Smith1-1/+1
1997-04-07Changes for make 3.75.1Paul Smith1-6/+15
1996-05-09Thu May 9 13:54:49 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>Roland McGrath1-1/+3
* commands.c (fatal_error_signal) [SIGQUIT]: Make SIGQUIT check conditional.
1996-05-09Thu May 9 13:54:49 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>Roland McGrath1-2/+16
* 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-6/+16
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.
1995-12-12Use plain stat instead of safe_stat.Roland McGrath1-2/+2