summaryrefslogtreecommitdiff
path: root/implicit.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix VMS implicit rules and UNIX paths.John Malmberg2014-10-201-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes VMS implicit rules and UNIX style pathname handling. It also fixes some of the VMS style pathname handling, more work there will be needed later. TODO: There are other case insensitive platforms besides VMS. We need to find out why there is extra VMS code for this. This indicates either the extra VMS code is not needed, or the case insensitive support may not be complete on the other case insensitive platforms. * default.c: Add missing definitions to default_suffix_rules[] and default_variables[]. TODO: As it is important that VMS DCL mode definitions must always be a superset of UNIX definitions, a better way of maintaining the VMS DCL mode definitions should be devised. * dir.c (downcase_inplace): Add a reentrant downcase() routine. Add future support for VMS 8.2+ _USE_STD_STAT macro which will disable a lot of VMS specific code from compiling. (dir_file_exists_p): vmsify filename only if directory name has VMS directory delimiters. (file_exists_p): Handle both VMS and UNIX directories. (file_impossible): Handle both VMS and Unix directories. Track whether a VMS format path is needed for the return value. * file.c (lookup_file): Check if vmsify is needed; handle UNIX paths. * implicit.c (pattern_search): Enable UNIX paths. * read.c (parse_file_seq): Enable UNIX paths. * remake.c (f_mtime): Fix gpath_search call for VMS paths. * rule.c (count_implicit_rule): Enable UNIX paths, Fix VMS paths. * vpath.c (selective_vpath_search): Enable UNIX paths.
* Update Copyright statements for 2014.Paul Smith2014-09-301-1/+1
|
* [SV 31155] Parse order-only tokens in second expansion results.Paul Smith2013-09-221-11/+28
|
* [Bug #39310] Parse simple pattern prereqs for globbing.Paul Smith2013-07-221-11/+12
| | | | | | | We tried to get some efficiency by avoiding a parse_file_seq() for simple pattern prerequisites, but this also means no wildcard expansion was happening, so add it back. Add regression tests for wildcards in target and prerequisite lists.
* Keep a local count of the max dependency list size.Paul Smith2013-07-091-6/+8
| | | | | This global variable could be modified during recursion so keep our own local copy to compare against.
* 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.
* Update source file format: remove TABs, use GNU coding styles.Paul Smith2013-05-171-2/+2
|
* Update copyright for changes in 2013.Paul Smith2013-05-171-1/+1
|
* Fix a few compiler warnings found by Eli.Paul Smith2013-04-281-7/+1
|
* 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-15/+15
| | | | Fixes Savannah bug #34530.
* Check for possible buffer overflow on very long filenames.Paul Smith2012-02-261-0/+7
| | | | Fixes Savannah bug #35525
* Update copyright notices.Paul Smith2012-01-161-3/+3
|
* Update copyrights for 2010.Paul Smith2010-07-131-2/+2
|
* Fixups for warnings on Windows (esp 64bit).Paul Smith2010-07-051-1/+1
|
* Implement linker-compatible library search.Boris Kolpackov2009-11-121-1/+1
|
* Update copyright years.Paul Smith2009-10-251-1/+1
|
* Fix fat-finger bug that left implicit rules with identical stem lengthsPaul Smith2009-10-251-3/+3
| | | | being sorted indeterminately.
* Fix savannah bug 25780. Optimize things a bit.Boris Kolpackov2009-10-061-7/+6
|
* Performance improvementsBoris Kolpackov2009-10-051-4/+11
|
* Implement the shortest stem first search order for pattern-specific ↵Boris Kolpackov2009-09-281-0/+22
| | | | variables and pattern rules.
* Performance improvement.Boris Kolpackov2009-09-251-0/+4
|
* Merge three parallel arrays into one. Make sure sufficient space is allocated.Boris Kolpackov2009-09-251-28/+36
|
* - Fix broken handling of order-only prereqs in secondary expansionPaul Smith2009-09-241-225/+238
| | | | | | of implicit rules. - Fix leaked memory when dealing with implicit rule chains that have file variables or pattern variables.
* - Rework secondary expansion so we only defer it if there's a possibilityPaul Smith2009-09-241-356/+334
| | | | | | it might be needed: for most situations we parse prereqs immediately as we used to. Reduces memory usage. - Fixes Savannah bug #18622.
* - Add xcalloc() and call itPaul Smith2009-09-161-20/+14
| | | | | | | | | - 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 17825Paul Smith2009-06-131-1/+1
| | | | - Fix Savannah bug 21231
* - Fix Savannah bug #19108Paul Smith2009-06-101-2/+1
| | | | | | | - Fix Savannah bug #17752 - Test suite: * When tests fail keep a "run" file containing the command invoked. * Support for the Valgrind "memcheck" and "massif" tools.
* - Modify access of config and gnulib Savannah modules to use GITPaul Smith2009-06-041-2/+3
| | | | | | | | | | | | | - Fix Savannah bug #24655. - Fix Savannah bug #24588. - Fix Savannah bug #24277. - Fix Savannah bug #25697. - Fix Savannah bug #25694. - Fix Savannah bug #25460. - Fix Savannah bug #26207. - Fix Savannah bug #25712. - Fix Savannah bug #26593. - Fix various doc issues.
* * 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-72/+47
| | | | | | | | | | | | | | | 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.
* Another round of cleanups:Paul Smith2006-04-091-64/+62
| | | | | | | | - 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.
* Code cleanup: Remove all references to PARAMS() & ansi2knr.Paul Smith2006-04-071-3/+2
|
* Release GNU make 3.81.Paul Smith2006-04-011-3/+2
| | | | | | | | | Update NEWS docs. Enhance the manual to use automake version.texi, and use the canonical FSF copyright features and statement. Some $(realpath ...) tests won't work on Windows; leave them out The jobserver filedescriptor test might fail if some FDs are reserved, so for now comment out that check.
* Fixed Savannah bug #16140.Boris Kolpackov2006-03-221-2/+12
|
* Fixed Savannah bug #16053.Boris Kolpackov2006-03-171-12/+5
|
* Numerous updates to tests for issues found on Cygwin and Windows.Paul Smith2006-03-101-1/+1
| | | | | | Revert a fix for $? including non-existent files as it shows a bug in the Linux kernel build. Give them a release to fix this. Add some changes from Eli Z. for Windows changes.
* Fix a potential core dump when merging aliases. Might fix bug #15818.Paul Smith2006-02-211-7/+9
| | | | | Revert intermediate file free code. Suppress some warnings in VMS builds.
* - Memory cleanups, found with valgrind.Paul Smith2006-02-201-9/+4
| | | | | | - 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.
* Some memory leak cleanups (found with valgrind).Paul Smith2006-02-141-10/+13
|
* Fix bug #11183.Paul Smith2006-02-131-6/+17
|
* Last of the copyright updates.Paul Smith2006-02-111-1/+2
|
* Update copyright and license notices on all files.Paul Smith2006-02-111-23/+17
| | | | Added new file strcache.c to various non-UNIX makefiles and build scripts.
* Extend .SECONDEXPANSION to implicit rules. Final fix for bug #13781.Paul Smith2005-12-111-24/+54
|
* Fixed bug #13022 by setting is_target flag on files that this implicitBoris Kolpackov2005-12-091-0/+5
| | | | pattern rule also makes.
* Fix a crash I introduced last-minute.Paul Smith2005-10-261-20/+18
| | | | Try to avoid extraneous rebuilds of template files.
* Make second expansion optional (partial implementation).Paul Smith2005-10-241-9/+5
| | | | | | | | | | | | | | | | 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.
* Fixed Savannah bugs #13216 and #13218.Boris Kolpackov2005-05-311-0/+14
|
* Fix performance degradation introduced by the second expansion feature.Paul Smith2005-04-131-11/+13
| | | | | | | | | | | | | | | | | | 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.