summaryrefslogtreecommitdiff
path: root/variable.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix bs-nl handling, exit and Environment for VMS.John Malmberg2015-01-271-12/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix required a complete rewrite of the command parser vmsjobs.c child_execute_job. The old parser had too many incorrect assumptions about DCL commands and could not be repaired to extended. The parser now more closely parses VMS commands and handles quoted commands and redirection. Command File mode has been improved, but can not fully support bs-nl syntax. VMS Unix shell simulation has been improved. * commands.c: vms_comma_separator is now a run-time setting. * function.c: vms_comma_separator is now a run-time setting. * function.c(func_basename_dir) now reports "[]" or "./" based on VMS crtl runtime setting. * job.c(start_job_command): VMS Handle empty commands propery. * main.c: Add VMS environment variables for run-time settings. * vms_legacy_behavior - Force older behavior. * vms_comma_separator - Commas or spaces for separators. * vms_unix_simulation - Enhanced Posix shell simulation features. * Detect if VMS CRTL is set to report Unix paths instead of VMS. * ':' and '>' are also MAP_DIRSEP on VMS. * makeint.h: Add VMS run-time option variables. * readme.vms: Update to current behavior. * variable.c(define_variable_in_set): Fix VMS Environment variable lookup. * variable.c(define_automatic_variables): Remove some VMS specific automatic variables and use the Unix ones instead. * vms_export_symbol.c: Set max symbol size correctly. * vmsjobs.c: child_execute_job() complete rewrite of VMS comand parsing. * vmsjobs.c(build_vms_cmd): VMS commmand building with shell simulation. Signed-off-by: Paul Smith <psmith@gnu.org>
* Update Copyright statements for 2014.Paul Smith2014-09-301-1/+1
|
* * various: Assume ISO C89-compliant free() implementation.Paul Smith2014-07-071-17/+7
|
* * maintMakefile, various: Improve constification of the codebase.Paul Smith2014-07-071-14/+10
|
* [SV 40361] Don't use vsnprintf(), which is an ISO C99 function.Paul Smith2013-11-231-1/+1
| | | | | | | | | | * output.c (error, fatal, message): Take an extra argument specifying how many bytes are used by the formatted arguments. (get_buffer): New function that allocates the requested buffer size. Remove msc_vsnprintf(), vfmtconcat(), and fmtconcat() as unneeded. * makeint.h: Declare various helper macros for generating output. * *.c: Change all error(), fatal(), message() calls to use the macros, or pass the extra length argument directly.
* Add VMS port updates from Hartmut Becker.Paul Smith2013-09-221-1/+1
|
* Create a character map to use for locating stop-points in strings.Paul Smith2013-06-221-1/+1
| | | | | | | | | In various places we were passing flags and characters to compare, then using complex conditionals to see where to stop in string searches. Performance numbers reveal that we were spending as much as 23% of our processing time in these functions, most of it in the comparison lines. Instead create a character map and use a single bitwise comparison to determine if this is any one of the stop characters.
* Create a new variable MAKE_HOST providing the host architecture.Paul Smith2013-05-271-0/+1
|
* Update source file format: remove TABs, use GNU coding styles.Paul Smith2013-05-171-230/+230
|
* Update copyright for changes in 2013.Paul Smith2013-05-171-1/+1
|
* [Savannah #20501] Handle adding -r/-R to MAKEFLAGS in the makefile.Paul Smith2013-05-131-23/+20
| | | | | | | If -R is set in the makefile and not the command line, then go through all the default variables and undefine them. If -r is set in the makefile and not in the command line, then remove all .SUFFIX prefixes (unless the user set it) and SUFFIX variable setting. In -p mode don't print builtins.
* Rename struct floc to typedef gmk_floc as an externally scoped symbol.Paul Smith2013-01-201-3/+3
|
* Rename the make.h file to makeint.h for internal use only.Paul Smith2013-01-201-1/+1
|
* Simplify copyrights using ranges of years.Paul Smith2012-03-051-3/+1
| | | | | The new GNU Maintainer's Manual allows the use of year ranges in certain situations; take advantage of this simplification.
* Convert all "`'" quotes to "''" per new GNU Coding Standard guidelines.Paul Smith2012-03-041-9/+9
| | | | Fixes Savannah bug #34530.
* Add support for "::=" simple assignment operator.Paul Smith2012-01-301-29/+47
| | | | | The next POSIX standard will define "::=" to have the same behavior as GNU make's ":=", so add support for this new operator.
* Update copyright notices.Paul Smith2012-01-161-3/+3
|
* Add new feature: != shell assignment for portability with BSD make.Paul Smith2011-04-181-1/+37
| | | | Feature submitted by David Wheeler.
* Improve backslash/newline handling to adhere to POSIX requirements.Paul Smith2010-11-061-7/+45
|
* variable.c (define_automatic_variables) [__MSDOS__ || WINDOWS32]:Eli Zaretskii2010-08-271-1/+17
| | | | | Remove trailing backslashes in $(@D), $(<D), etc., for consistency with forward slashes. Fixes Savannah bug #30795.
* Update copyrights for 2010.Paul Smith2010-07-131-2/+2
|
* Update copyright years.Paul Smith2009-10-251-2/+2
|
* Various simple code cleanups.Paul Smith2009-10-251-27/+27
|
* Implement the new undefine directive.Boris Kolpackov2009-10-061-0/+45
|
* Implement the shortest stem first search order for pattern-specific ↵Boris Kolpackov2009-09-281-9/+43
| | | | variables and pattern rules.
* - Add xcalloc() and call itPaul Smith2009-09-161-5/+9
| | | | | | | | | - 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
* - Fix Savannah bug #27093Paul Smith2009-08-021-9/+14
| | | | | | - Fix Savannah bug #27143 - Fix Savannah bug #23960 - Fix Savannah bug #27148
* Add 'private' variable modifier, feature submitted by Ramon Garcia.Paul Smith2009-05-261-60/+109
| | | | | | Rework the parser for variables to allow multiple modifiers and also allow for variables and targets with modifier names, like "export" and "private".
* Found this change in an old CVS workspace: rewrite savestring() to thePaul Smith2009-05-241-1/+1
| | | | more standard xstrndup().
* (target_environment): Don't use shell_var if its `value' field is NULL.Eli Zaretskii2008-01-261-9/+12
|
* configh.dos.template [__DJGPP__]: Replace HAVE_SYS_SIGLIST withEli Zaretskii2007-12-221-0/+3
| | | | | | | | | | 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.
* New special variable: .RECIPEPREFIXPaul Smith2007-11-041-4/+18
| | | | | | | | | 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.
* Windows: allow SHELL to be set to a more complex value by checking itsPaul Smith2007-10-131-1/+18
| | | | expansion to see if it's a valid shell, not just the unexpanded value.
* * Update to GPLv3Paul Smith2007-07-041-4/+4
| | | | | * Update copyright to 2007 * Fix download URL for translation files (thanks to Thiemo Seufer)
* This is a major update, which switches virtually every allocated-but-not-freedPaul Smith2007-03-201-27/+28
| | | | | | | | | | | | | | | 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.
* Fix from Eli for incorrect value of $(MAKE) on Cygwin.Paul Smith2006-11-181-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.
* Fixed a number of documentation bugs, plus some build/install issues:Paul Smith2006-10-011-1/+1
| | | | | | | | 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.
* Another round of cleanups:Paul Smith2006-04-091-23/+22
| | | | | | | | - 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.
* Some test updates for Windows.Paul Smith2006-03-081-1/+2
| | | | Handle SHELL set on the command line properly for windows.
* Fix a potential core dump when merging aliases. Might fix bug #15818.Paul Smith2006-02-211-8/+9
| | | | | Revert intermediate file free code. Suppress some warnings in VMS builds.
* Make sure we don't introduce a circularity into the variable set linkedPaul Smith2006-02-171-7/+13
| | | | list. Fixes Savannah bug #15757.
* Some memory leak cleanups (found with valgrind).Paul Smith2006-02-141-8/+17
|
* Last of the copyright updates.Paul Smith2006-02-111-1/+2
|
* Update copyright and license notices on all files.Paul Smith2006-02-111-14/+11
| | | | Added new file strcache.c to various non-UNIX makefiles and build scripts.
* Make sure to assign a boolean value to a 1-bit bitfield. Reported onPaul Smith2005-09-261-1/+1
| | | | | | | the bug-make mailing list. Fix Savannah bug # 14527: remember to free temporary line constructor memory if the line is empty.
* Fix Savannah bug #11913: ensure that scopes such as foreach, etc. takePaul Smith2005-06-091-17/+56
| | | | | precedence over the global scope when they're used in a global context (such as an eval).
* Fix some Savannah bugs.Paul Smith2005-04-081-2/+2
| | | | | Updates to docs (still need more work here) and NEWS file. New language.
* * New feature: -L optionPaul Smith2005-02-281-1/+1
| | | | | | | | * 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)
* Fix bug with SHELL handling: make sure the variable struct is initialized.Paul Smith2004-12-051-9/+7
|
* Fix for bug #1276: Handle SHELL according to POSIX requirements.Paul Smith2004-11-281-9/+17
| | | | | | | | | | | 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.