Commit graph

102 commits

Author SHA1 Message Date
Boris Kolpackov
4254e88cfa Implement the new undefine directive. 2009-10-06 06:56:57 +00:00
Boris Kolpackov
f5891a26d8 Implement the shortest stem first search order for pattern-specific variables and pattern rules. 2009-09-28 12:31:55 +00:00
Paul Smith
8f30b68871 - Add xcalloc() and call it
- 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-09-16 17:07:01 +00:00
Paul Smith
7deb42aafd - Fix Savannah bug #27093
- Fix Savannah bug #27143
- Fix Savannah bug #23960
- Fix Savannah bug #27148
2009-08-02 16:05:42 +00:00
Paul Smith
5b4d419476 Add 'private' variable modifier, feature submitted by Ramon Garcia.
Rework the parser for variables to allow multiple modifiers and also
allow for variables and targets with modifier names, like "export" and
"private".
2009-05-26 01:31:40 +00:00
Paul Smith
14f3f501bc Found this change in an old CVS workspace: rewrite savestring() to the
more standard xstrndup().
2009-05-24 18:31:18 +00:00
Eli Zaretskii
8d5b3d4298 (target_environment): Don't use shell_var if its `value' field is NULL. 2008-01-26 13:51:14 +00:00
Eli Zaretskii
91b016c414 configh.dos.template [__DJGPP__]: Replace HAVE_SYS_SIGLIST with
HAVE_DECL_SYS_SIGLIST.

job.c (child_execute_job): Remove __MSDOS__ because MSDOS/DJGPP build does
not use child_execute_job.

variable.c (define_automatic_variables) [__MSDOS__]: Always export the SHELL
environment variable to the child.
2007-12-22 11:27:02 +00:00
Paul Smith
43d81ff866 New special variable: .RECIPEPREFIX
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-11-04 21:54:00 +00:00
Paul Smith
0b17d143ba Windows: allow SHELL to be set to a more complex value by checking its
expansion to see if it's a valid shell, not just the unexpanded value.
2007-10-13 14:46:04 +00:00
Paul Smith
891ebd4d97 * Update to GPLv3
* Update copyright to 2007
* Fix download URL for translation files (thanks to Thiemo Seufer)
2007-07-04 19:35:15 +00:00
Paul Smith
6ccf33cdbd This is a major update, which switches virtually every allocated-but-not-freed
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.
2007-03-20 03:02:26 +00:00
Paul Smith
e4da308580 Fix from Eli for incorrect value of $(MAKE) on Cygwin.
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-11-18 20:53:44 +00:00
Paul Smith
7595f38f62 Fixed a number of documentation bugs, plus some build/install issues:
16304, 16468, 16577, 17701, 17880, 16051, 16652, 16698
Plus some from the mailing list.

Imported a patch from Eli to allow Cygwin builds to support DOS-style
pathnames.
2006-10-01 05:38:38 +00:00
Paul Smith
c25294ad3b Another round of cleanups:
- 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-09 22:09:24 +00:00
Paul Smith
afc4906aca Some test updates for Windows.
Handle SHELL set on the command line properly for windows.
2006-03-08 20:15:08 +00:00
Paul Smith
8af9389f87 Fix a potential core dump when merging aliases. Might fix bug #15818.
Revert intermediate file free code.
Suppress some warnings in VMS builds.
2006-02-21 05:21:19 +00:00
Paul Smith
bde826b18a Make sure we don't introduce a circularity into the variable set linked
list.  Fixes Savannah bug #15757.
2006-02-17 13:29:52 +00:00
Paul Smith
86af3872a9 Some memory leak cleanups (found with valgrind). 2006-02-14 15:42:17 +00:00
Paul Smith
a6bdc58385 Last of the copyright updates. 2006-02-11 22:16:04 +00:00
Paul Smith
586daef9bc Update copyright and license notices on all files.
Added new file strcache.c to various non-UNIX makefiles and build scripts.
2006-02-11 19:02:21 +00:00
Paul Smith
66459baee2 Make sure to assign a boolean value to a 1-bit bitfield. Reported on
the bug-make mailing list.

Fix Savannah bug # 14527: remember to free temporary line constructor
memory if the line is empty.
2005-09-26 05:16:31 +00:00
Paul Smith
dd30b0552f Fix Savannah bug #11913: ensure that scopes such as foreach, etc. take
precedence over the global scope when they're used in a global context
(such as an eval).
2005-06-09 19:19:20 +00:00
Paul Smith
3daf8df6ee Fix some Savannah bugs.
Updates to docs (still need more work here) and NEWS file.
New language.
2005-04-08 12:51:20 +00:00
Paul Smith
d2516343bc * New feature: -L option
* 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-28 07:48:22 +00:00
Paul Smith
6c21790595 Fix bug with SHELL handling: make sure the variable struct is initialized. 2004-12-05 18:09:31 +00:00
Paul Smith
539f513773 Fix for bug #1276: Handle SHELL according to POSIX requirements.
POSIX requires that the value of SHELL in the makefile NOT be exported
to sub-commands.  Instead, the value in the environment when make was
invoked should be passed to the environment of sub-commands.  Note that
make still uses SHELL to _run_ sub-commands; it just doesn't change the
value of the SHELL variable in the environment of sub-commands.

As an extension to POSIX, if the makefile explicitly exports SHELL then
GNU make _will_ use it in the environment of sub-commands.
2004-11-28 23:11:23 +00:00
Boris Kolpackov
b0d67e0e15 Moved expansion of simple pattern-specific variables from the rebuild stage
to the read stage.
2004-10-05 16:56:14 +00:00
Boris Kolpackov
341312cc57 bugfix for exported pattern-specific variables 2004-09-27 18:09:52 +00:00
Paul Smith
e334942e57 Numerous updates and bug fixes.
A number of W32 cleanups from J.Grant.
A number of OS/2 cleanups from Andreas Buening.
Various random bug fixes.
2004-03-22 15:11:48 +00:00
Paul Smith
1a5beef51f - Fix bug #1405: allow multiple pattern-specific variables to match a target.
- Fix some uncleanliness about the implementation of patterns-specific vars.
- Some enhancements to the OS/2 port.
2003-05-02 01:44:59 +00:00
Paul Smith
4068c5e4a3 Add support for OS/2, contributed by Andreas Buening <andreas.buening@nexgo.de>
Also a small patch from Hartmut Becker <Hartmut.Becker@compaq.com> for VMS.
2003-03-24 23:14:15 +00:00
Paul Smith
6374309c6d Convert the source code to use ANSI C style function definitions and
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-14 21:54:04 +00:00
Paul Smith
9dc79463a9 Fix K&R-isms found on SunOS 4.1.4 builds. 2002-10-04 02:12:52 +00:00
Paul Smith
dac7b49de4 Fix bug #940 (from the Savannah bug tracker): make sure that target-
specific variables work correctly in conjunction with double-colon
targets.
2002-09-17 21:52:45 +00:00
Paul Smith
ee3a4f9dd6 Change the version.
Update to require new gettext.
Change hash.c to by K&R.
Redo some strings to make i18n simpler.
2002-08-08 05:39:17 +00:00
Paul Smith
f2ceb0d68a Incorporate some VMS fixes.
Add -B option docs.
Add .VARIABLES variable.
Add a few new tests.
Add a new translation: Swedish
2002-08-08 00:11:19 +00:00
Paul Smith
bccb277dda New variables, .VARIABLES and .TARGETS. 2002-08-01 13:16:57 +00:00
Paul Smith
21cf8c6444 Install Greg McGary's patches to port the id-utils hashing functions to
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-11 06:38:57 +00:00
Paul Smith
8572d6adf0 Major updates in preparation for 3.80.
New version of the manual, put into the doc subdir.
Enhancements: $(eval ...) and $(value ...) functions, various bug
fixes, etc.  See the ChangeLog.
More to come.
2002-07-08 02:26:47 +00:00
Paul Smith
9052b52dfc Fix Debian bug #144306: pass target-specific variables into the environment
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.
2002-05-10 03:15:07 +00:00
Paul Smith
9302338304 Installed the da.po (Danish) translation file.
Fixed some translation string issues.
2001-08-19 04:55:51 +00:00
Paul Smith
ce2c6eadf1 Fix for EINTR problems when using jobserver.
New translation files.
Fix for @+ inside define macros being applied too widely.
Various other bug fixes.
2001-06-01 03:56:50 +00:00
Paul Smith
8f2b1e2c7c Some bug fixes and document updates. 2001-01-21 06:49:11 +00:00
Paul Smith
8ddf04c627 Fix PR/1831. See the ChangeLog. 2000-08-21 06:18:35 +00:00
Paul Smith
3c132f10f3 * Minor code cleanups
* Fix for PR/1811, from Paul Eggert.
2000-07-07 17:34:56 +00:00
Paul Smith
4a5550c822 * Lots of bug fixes and cleanup; new i18n files, etc. 2000-06-07 05:43:37 +00:00
Paul Smith
c637af71d9 * A large number of fixes/enhancements. See the ChangeLog.
* Added a new version of the German translation file.
2000-03-27 06:54:37 +00:00
Paul Smith
17f2dda0ac * Fix for dir.c from Andreas Schwab.
* Fix += target-specific variables: if your direct parent doesn't have a
  setting for the variable but his parent does, you'll get recursive
  expansion errors.
2000-02-07 19:54:04 +00:00
Paul Smith
9b0a3d91ea * Fix PR/1407.
* Keep filename/lineno information for variables, for debugging.
2000-02-05 07:37:40 +00:00