summaryrefslogtreecommitdiff
path: root/src/rule.h
Commit message (Collapse)AuthorAgeFilesLines
* Update the copyright year on all filesPaul Smith2023-01-011-1/+1
|
* Update URLs to use https rather than httpPaul Smith2022-10-181-1/+1
| | | | | * (all): Change http:// to https:// * README.W32: Remove invalid link to mingw.org.
* * <all>: Update copyright notices.Paul Smith2022-02-101-1/+1
|
* [SV 61042] Enhance logging of implicit rule searchDmitry Goncharov2021-10-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Logging of implicit rule search gives limited information as to why a given implicit rule was rejected, and if no implicit rule is found we get the confusing "No rule to make target" result when the real issue is that some prerequisite of some implicit rule could not be built. Enhance logging around implicit rule search as follows: 1. The messages which refer to a rule print a description (the targets and prerequisites) of the rule. 2. A new message tells when a rule is rejected, along with the reason. 3. The 'Looking for an implicit rule...' message is printed for every prerequisite, not just the top-level target. 4. "Trying harder" message is printed, when intermediate prerequisites are going to be searched. 5. The 'No rule found...' and 'Found implicit rule...' messages are printed for every prerequisite, not just the top-level target. 6. "Ought to exist...", "Found..." or "Not found..." message is printed for each prerequisite. * src/rule.h (struct rule): Remember the definition of the rule. * src/rule.c (get_rule_defn): Compute the definition of a rule. (install_pattern_rule): Initialize the definition to empty. (create_pattern_rule): Ditto. (freerule): Free the definition. (print_rule): Use the definition when printing rules. * src/remake.c (update_file_1): Push debug output down into try_implicit_rule(). * src/implicit.c (try_implicit_rule): Add debugging (pattern_search): Show the rule definition in various debug output. Add new debug messages for implicit rule search. Additional changes by Paul Smith <psmith@gnu.org>: Since we usually don't need the rule definition, defer computing it until we do. * bootstrap.conf: Include the mempcpy Gnulib module. * src/makeint.h (mempcpy): Declare mempcpy if not available. * src/misc.c (mempcpy): Define mempcpy if not available. * src/config.h-vms.template: Don't set HAVE_MEMPCPY. * src/config.h.W32.template: Ditto. * src/rule.h (get_rule_defn): Return the definition of a rule. * src/rule.c (get_rule_defn): If we don't have a definition compute it; either way return it. * src/implicit.c (pattern_search): Rework the handling of explicit prerequisites to pattern rules to be more clear. There is no change in behavior.
* Update copyright statements for 2020Paul Smith2020-01-031-1/+1
|
* Support the .EXTRA_PREREQS special variablePaul Smith2020-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initial implementation by Christof Warlich <cwarlich@gmx.de> * NEWS: Announce the new feature. * doc/make.texi (Other Special Variables): Document .EXTRA_PREREQS. * src/dep.h (struct dep): New flag to note extra prereq deps. * src/filedef.h (expand_extra_prereqs): Declare a function to expand the value of .EXTRA_PREREQS. * src/file.c (expand_extra_prereqs): Given a struct variable lookup of .EXTRA_PREREQS, convert it into a list of deps and for each one make sure it has a struct file and has the new flag set. (snap_file): A new function invoked by hash_map that will perform per-file operations: set up second expansion, intermediate, and also .EXTRA_PREREQS. Manage circular dependencies by ignoring them. (snap_deps): Defer per-file operations until the end. Look up the global .EXTRA_PREREQS and pass it along to snap_file for each file. * src/implicit.c (struct patdeps): Remember the extra prereqs flag. (pattern_search): Transfer extra prereqs flag settings into the matched pattern rule. * src/rule.h (snap_implicit_rules): Rename count_implicit_rules to snap_implicit_rules since we now do more than count. * src/rule.c (snap_implicit_rules): As we walk through all the pattern rules, add in any global .EXTRA_PREREQS to the dep list. Ensure we take them into account for the max number of prereqs and name length. * src/main.c (main): Add extra-prereqs to .FEATURES. Call the renamed snap_implicit_rules. * tests/scripts/variables/EXTRA_PREREQS: Add tests.
* Update copyright statements for 2019Paul Smith2019-05-191-1/+1
|
* Resolve most of the Windows Visual Studio warnings.Paul Smith2018-07-021-3/+2
| | | | | * Convert integer types to size_t where necessary. * Align other integral types to avoid casts and type warnings.
* * all: Update Copyright statements for 2018Paul Smith2018-07-011-1/+1
|
* Rework directory structure to use GNU-recommended "src" directory.Paul Smith2017-11-191-0/+58
Move the source code (other than glob) into the "src" subdirectory. Update all scripting and recommendations to support this change. * *.c, *.h, w32/*: Move to src/ * configure.ac, Makefile.am, maintMakefile: Locate new source files. * Basic.mk.template, mk/*: Update for new source file locations. * NEWS, README.DOS.template: Update for new locations. * build.template, build_w32.bat, builddos.bat: Ditto. * po/POTFILES.in: Ditto * tests/run_make_tests.pl, tests/scripts/features/load*: Ditto. * make.1: Move to doc. * mk/VMS.mk: Add support for building on VMS (hopefully). * makefile.vms, prepare_w32.bat: Remove. * SCOPTIONS: Update to define HAVE_CONFIG_H