summaryrefslogtreecommitdiff
path: root/doc
Commit message (Collapse)AuthorAgeFilesLines
...
* [SV 60795] Don't remake phony included makefiles and show errorsPaul Smith2021-09-061-25/+39
| | | | | | | | | | | | | | | | | | | | | | | Change the handling of included makefiles which are phony targets to be similar to double-colon rules with no prerequisites: simply don't build them at all during the remake a makefile phase. Ensure that any included makefile which is needed but not built results in an error. Update the documentation to make this clear. Add tests to verify this behavior. * doc/make.texi (Remaking Makefiles): Clarify double-colon exception. Document that phony targets are handled the same way. (Phony Targets): Ditto. * src/main.c (main): Check for phony targets when skipping goals. Rather than throwing out skipped but failed goals keep them separately then report them as errors. * src/read.c (eval): Set the file location on included makefiles even when there's no error. * tests/scripts/features/include: Add tests for handling included makefiles with both phony and double-colon rules to rebuild them.
* * doc/make.texi (Environment): [SV 60841] Clarify variable exporting.Paul Smith2021-09-061-8/+7
|
* * doc/make.texi (Chained Rules): [SV 60904] Clarify intermediate files.Paul Smith2021-09-061-5/+7
|
* * doc/make.texi (Prerequisite Types): [SV 61069] Mention PHONY prereqsPaul Smith2021-09-051-0/+4
|
* * doc/make.1: Clean up man page text.Paul Smith2021-09-051-3/+3
|
* [SV 60412] Allow -I- to throw out the current directory pathPaul Smith2021-09-031-1/+17
| | | | | | | | | | | | | Accept a "-" directory value to the -I option to clear the set of directories to be searched up to that point, including the default directories. * NEWS: Announce the change. * doc/make.texi (Summary of Options): Add documentation. * src/read.c (construct_include_path): Check for '-' and if found, clear the list of directories to be searched. * tests/scripts/options/dash-I: Add tests for -I-. * tests/scripts/variables/INCLUDE_DIRS: Add tests for -I-.
* [SV 60297] Add .NOTINTERMEDIATE special targetDmitry Goncharov2021-07-251-13/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support a new special target, .NOTINTERMEDIATE. Any file or pattern prerequisite of this target will never be considered intermediate. This differs from .SECONDARY in that .SECONDARY files won't be deleted but they will still not be built if they are missing. .NOTINTERMEDIATE files are treated the same way as a target which is explicitly mentioned in the makefile. This is mostly useful with patterns; obviously mentioning a target explicitly here is enough in and of itself to make something not intermediate. Some adjustments made by psmith@gnu.org * NEWS: Announce the new feature. * doc/make.texi (Special Targets): Document .NOTINTERMEDIATE. (Chained Rules): Describe how to use .NOTINTERMEDIATE. * src/main.c (main): Add "notintermediate" to the .FEATURES variable. * src/filedef.h (struct file): Add "notintermediate" flag. * src/file.c (no_intermediates): Mark global .NOTINTERMEDIATE. (snap_file): Support .NOTINTERMEDIATE special target. Throw an error if the same target is marked both .NOTINTERMEDIATE and .SECONDARY or .INTERMEDIATE. (rehash_file): Merge intermediate, notintermediate, secondary flags. (remove_intermediates): Check notintermediate flag before removing. (print_file): * src/implicit.c (pattern_search): Set notintermediate based on the pattern. * tests/scripts/targets/NOTINTERMEDIATE: Add a new test suite.
* * make.texi (Reading Makefiles): != creates recursive variables.Paul Smith2021-05-301-2/+3
| | | | Reported by Ronald Hoogenboom <RHoogenboom@irdeto.com>.
* * doc/make.texi (Call Function): Apply consistent formattingCao jin2021-03-251-4/+4
| | | | Copyright-paperwork-exempt: yes
* * doc/make.texi (Automatic Variables): Relocate the $? exampleMike Frysinger2021-03-251-12/+12
| | | | Copyright-paperwork-exempt: yes
* More correctly describe the scope of variablesJouke Witteveen2021-03-071-6/+15
| | | | | * NEWS: Use "local" instead of the incorrect "lexically-scoped". * doc/make.texi: Refer to let/foreach variables as local variables.
* * doc/make.text: Clarify that patsubst doesn't touch unmatched wordsPaul Smith2021-03-071-3/+4
|
* * doc/make.texi (How Patterns Match): [SV 58639] Fix chaining info.Paul Smith2020-12-071-3/+5
|
* Create $(let ...) providing lexically scoped variablesJouke Witteveen2020-12-061-12/+90
| | | | | | | | | Add a new function $(let ...) which allows lexically scoped variables. * NEWS: Add information on this feature. * doc/make.texi (Let Function): Document the 'let' function. * src/function.c (func_let): Create the 'let' built-in function. * tests/scripts/functions/let: Test the 'let' built-in function.
* * doc/make.texi (Phony Targets): [SV 58961] Clarify pattern handlingPaul Smith2020-12-061-0/+6
|
* * doc/make.texi (Synchronized Terminal Output): [SV 58960] Fix linkPaul Smith2020-12-061-1/+1
|
* [SV 59169] Add --debug=why and --debug=print optionsPaul Smith2020-12-052-16/+29
| | | | | | | | | | | | | | | | | | | | Add debug options to print recipes even if they would otherwise be silent, and to print the reason that a target was considered out of date. Modify --trace to simply be a shorthand for --debug=print,why. * NEWS: Announce changes. * doc/make.texi (Summary of Options): Document the new options. * doc/make.1: Ditto. * src/debug.h: Add new flags DB_PRINT and DB_WHY. * src/makeint.h: Remove the trace_flag variable. * src/job.c (start_job_command): Check debug flags not trace_flag. (new_job): Ditto. * src/main.c (trace_flag): Make a static variable for switches. (decode_debug_flags): Set DB_PRINT and DB_WHY if trace_flag is set. * tests/scripts/variables/GNUMAKEFLAGS: Update known-good messages. * tests/scripts/variables/MAKEFLAGS: Ditto.
* Support "unexport" in target-specific variables.Paul Smith2020-11-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite the environment variable algorithm to correctly inherit export settings from parent variable sets. The new algorithm for computing the table of environment variables is: - Start with the most local variable set and proceed to global. - If the variable already exists in the table and we don't know its export status, update it with the current variable's status. - If the variable is not in the table and it's not global, add it regardless of its status so if it's unexported we remember that. - If the variable is not in the table and is global, check its export status and don't add it if we won't export it. Then when generating the environment variables, check the export status of each variable in case it was a target-specific variable and we have determined it should not be exported. Rework SHELL handling to check at the end whether we added it or not and if we didn't, add the value from the environment. * NEWS: Announce support for target-specific "unexport"." * doc/make.texi (Target-specific): Document the support. * src/variable.h (enum variable_export): Make into a global type. * src/read.c (struct vmodifiers): Use enum variable_export rather than individual booleans. (parse_var_assignment): Parse the "unexport" keyword. (eval): Remember the vmodifier value in the variable. (record_target_var): Ditto. * src/variable.c (should_export): Check if the variable should be exported. (target_environment): Implement the above algorithm. * tests/scripts/features/export: Test export/unexport with variable assignments on the same line. * tests/scripts/features/targetvars: Add a comprehensive suite of tests for different types of target-specific export / unexport. * tests/scripts/variables/SHELL: Update the comment.
* * doc/make.texi (Include): Update behavior for missing included filesPaul Smith2020-10-281-6/+5
|
* [SV 58735] Define the order that makefiles are rebuilt.Paul Smith2020-07-191-16/+20
| | | | | | | | | | | | Ensure that makefiles are rebuilt in the order in which make first considered them, and document this behavior in the manual. * NEWS: Add a note about the new behavior * doc/make.text (How make Processes a Makefile): Document it. * main.c (main): Inverse the list of makefile goals. * read.c (read_all_makefiles): Add default makefiles to the list at the front in reverse order, the same way other makefiles are added. * tests/scripts/features/include: Add tests to verify rebuild order.
* GNU Make release 4.34.3Paul Smith2020-01-191-1/+1
| | | | | | * NEWS: Update for the release * configure.ac: New release number * doc/make.texi: New edition number
* Resolve some documentation issuesPaul Smith2020-01-191-5/+24
| | | | | | * doc/make.texi (Interrupts): [SV 46193] Recommend defensive recipes * doc/make.texi: [SV 49262] Clarify interaction of prerequisites and non-terminal match-anything rules.
* [SV 40657] Reinstate old behavior for suffix rules with prereqsPaul Smith2020-01-191-0/+12
| | | | | | | | | | | | | | | | | POSIX says that suffix rules cannot have prerequisites, but after making this change we observed a number of makefiles "in the wild" that were relying on this behavior and failed. For .POSIX: makefiles, obey POSIX. Otherwise preserve the old behavior. However, generate a warning so users know this is a problem. In a future version we will change all behavior to be POSIX-conforming. * NEWS: describe the change * src/rule.c (convert_to_pattern): If posix_pedantic don't make a pattern rule if prereqs exist. Otherwise show a warning. * tests/scripts/features/suffixrules: Add tests for the new behavior including .POSIX vs. non-.POSIX.
* * doc/make.texi: Change the GFDL to an AppendixPaul Smith2020-01-041-3/+3
|
* Update copyright statements for 2020Paul Smith2020-01-033-4/+4
|
* Support the .EXTRA_PREREQS special variablePaul Smith2020-01-031-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * doc/make.text (Reading Makefiles): Rewrite to be more clear.Paul Smith2019-10-061-25/+27
|
* * doc/make.texi (Recipe Execution): Correct example to use $(<[DF])Paul Smith2019-09-071-1/+1
|
* * doc/make.texi: Clarify that the jobserver pipe is "blocking"Paul Smith2019-09-071-1/+2
|
* * doc/make.tex (Substitution Refs): Clarify patsubst relationship.Paul Smith2019-09-071-8/+10
|
* * doc/make.texi: [SV 51974] Clarify makefile parsing operations.Paul Smith2019-05-192-22/+99
|
* * doc/make.texi: [SV 54116] Document whitespace removal trick.Paul Smith2019-05-191-0/+30
| | | | | Discovered and explained by Michael Henry <gnu@drmikehenry.com> * tests/scripts/variables/flavors: Add a test to preserve the behavior.
* Update copyright statements for 2019Paul Smith2019-05-193-4/+4
|
* [SV 8297] Implement "grouped targets" for explicit rules.Kaz Kylheku2019-05-121-23/+81
| | | | | | | | | | | | | | | | | | | | | | | | This patch allows "grouped targets" using the &: syntax: tgt1 tgt2 ... tgtn &: pre1 pre2 ... recipe When the &: separator is used (in single or double colon forms), all the targets are understood to be built by a single invocation of the recipe. This is accomplished by piggy-backing on the already-existing pattern rule feature, using the file's "also_make" list. * NEWS: Add information about grouped targets. * doc/make.texi (Multiple Targets): Add information on grouped targets. (Pattern Intro): Refer to the new section to discuss multiple patterns. * src/main.c (main): Add "grouped-targets" to .FEATURES * src/read.c (make_word_type): Add new types for &: and &::. (eval): Recognize the &: and &:: separator and remember when used. (record_files): Accept an indicator of whether the rule is grouped. If so, update also_make for each file to depend on the other files. (get_next_mword): Recognize the &: and &:: word types. * tests/scripts/features/grouped_targets: New test script. * AUTHORS: Add Kaz Kylheku
* * doc/make.texi (Remaking Makefiles): [SV 52273] Note MAKE_RESTARTSPaul Smith2018-09-151-2/+3
|
* * doc/make.texi: [SV 48970] Clarify the value of $?Paul Smith2018-09-151-2/+3
|
* * doc/make.text: [SV 54360] Weaken "obsolete" language in the manual.Paul Smith2018-09-151-20/+24
| | | | | | There's no need to frighten users away from capabilities which are perfectly reasonable and definitely not going away, by calling them obsolete or discouraged in the manual.
* * doc/make.texi: Updated languageOla Olsson2018-07-011-1/+1
|
* * all: Update Copyright statements for 2018Paul Smith2018-07-013-4/+4
|
* Rework directory structure to use GNU-recommended "src" directory.Paul Smith2017-11-191-0/+379
| | | | | | | | | | | | | | | | | 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
* Update copyright statements for 2017.Paul Smith2017-07-092-2/+2
|
* * NEWS: Do not insert a space during '+=' if the value is empty.Paul Smith2017-06-041-1/+2
| | | | | | | * doc/make.texi (Appending): Document this behavior. * variable.c (do_variable_definition): Only add a space if the variable value is not empty. * tests/scripts/variables/flavors: Test this behavior.
* * doc/make.texi: [SV 50304] Add missing close parenthesis.Paul Smith2017-06-041-1/+1
|
* * main.c (switches): Add -E as an alias for --eval.Paul Smith2016-12-281-0/+2
| | | | | | | * make.1: Document the -E and --eval options. * doc/make.texi: Document the -E option. * tests/scripts/options/eval: Test the -E option and MAKEFILES. * NEWS: Add information about the new option.
* * main.c (switches): Add --no-silent to undo -s options.Paul Smith2016-12-281-6/+4
| | | | | | | | * make.1: Document the new flag. * doc/make.texi: Document the new flag. Remove suggestions that the .SILENT special target is deprecated or should not be used. * tests/scripts/options/dash-s: Test the -s and --no-silent options. * NEWS: Add information about the new option.
* * doc/make.texi: [SV 48951] Fix documentation typo.Paul Smith2016-12-251-12/+14
|
* GNU Make release 4.2.4.2Paul Smith2016-05-221-1/+1
|
* Preserve the real value of -jN in MAKEFLAGS using jobserver.Paul Smith2016-04-041-3/+3
| | | | | | | | | | | | | | | | | | Previously if the jobserver was active, MAKEFLAGS would contain only the -j option but not the number (not -j5 or whatever) so users could not discover that value. Allow that value to be provided in MAKEFLAGS without error but still give warnings if -jN is provided on the command line if the jobserver is already activated. * NEWS: Discuss the new behavior. * os.h, posixos.c, w32/w32os.c: Return success/failure from jobserver_setup() and jobserver_parse_auth(). * main.c (main): Separate the command line storage of job slots (now in arg_job_slots) from the control storage (in job_slots). Make a distinction between -jN flags read from MAKEFLAGS and those seen on the command line: for the latter if the jobserver is enabled then warn and disable it, as before. * tests/scripts/features/jobserver: Add new testing.
* * make.texi: Confirm that CURDIR contains an absolute path.Paul Smith2016-04-041-3/+3
|
* * docs/make.texi: [SV 47392] Add "Integrating make" chapter.Paul Smith2016-04-041-2/+231
|