mirror of
https://git.savannah.gnu.org/git/make.git
synced 2025-01-27 09:43:41 +00:00
31036e648f
Add an option to print a list of targets defined in the makefiles. Don't print targets of implicit rules, or special targets. To support this remember which files are deemed suffix rule targets. Add a missing warning for single-suffix targets with prerequisites. Suggested by many. Sample implementation by Tim <tdhutt@gmail.com>. * NEWS: Announce the new option and single-suffix warning. * doc/make.1: Add --print-targets to the man page. * doc/make.texi: Add --print-targets to the documentation. Clean up the text around the definition of suffix rules. * src/main.c (print_targets_flag): New variable for --print-targets. (switches): Add a new long option --print-targets. (main): If the option was provided call print_targets() and exit. * src/filedef.h (struct file): Add a "suffix" boolean value. Remove print_prereqs() since it's static. Add new print_targets(). * src/file.c (rehash_file): Merge the new suffix value. (print_prereqs): Used only locally: change to static. (print_target): Print targets which are not suffix rule targets and are not special targets. (print_targets): Call print_target() on each file. * src/rule.c (convert_to_pattern): Make maxsuffix local; it doesn't need to be static. Emit ignoring prerequisites for single-suffix rules as well as double-suffix rules. Remember which files are actually suffix rules. * tests/scripts/features/suffixrules: Test single-suffix behavior. * tests/scripts/options/print-targets: Add tests for --print-targets. |
||
---|---|---|
.. | ||
features | ||
functions | ||
misc | ||
options | ||
targets | ||
variables | ||
vms | ||
test_template |