gnu /
m4 /
refs/heads/makedep feature: Add Makefile dependency command-line options
Similar to what gcc can do, make it possible for m4 to output Makefile
fragments that track the files that were included during processing,
in order to automatically rebuild files in the correct dependency
chains later on.
* NEWS: Document the feature.
* THANKS: Update.
* checks/get-them: Add support for declaring a test's auxfile.
* checks/check-them: Add code for handling auxilliary files, to make
testing the feature possible.
* doc/m4.texi (auxresult): New macro.
(Make dependency generation): New chapter.
* src/m4.h (makedep_gen_missing, REF_CMD_LINE, REF_INCLUDE)
(REF_SINCLUDE, REF_ALL, REF_NONE): Prepare for new options.
(record_dependency, generate_make_dependencies): New prototypes.
* src/m4.c (makedep_path, makedep_target, makedep_gen_missing)
(makedep_phony): Track new options.
(usage): Document new options.
(process_file): Track dependencies.
(main): Parse new options.
* src/builtin.c (include, m4_include, m4_sinclude): Track include
source.
* src/path.c (struct dependency): New struct.
(dependency_list, dependency_list_end): New variables.
(record_dependency, generate_make_dependencies): Output dependencies.
Co-developed-by: Lorenzo Di Gregorio <lorenzo.digregorio@gmail.com>
10 files changed