mirror of
https://https.git.savannah.gnu.org/git/m4.git
synced 2026-01-27 09:54:42 +00:00
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>