From: Ian Jackson Date: Sat, 7 Dec 2019 15:28:29 +0000 (+0000) Subject: subdirmk: Suppress MAKEFILE_TEMPLATES when running `make clean' X-Git-Tag: subdirmk/0.3~123^2 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?p=subdirmk.git;a=commitdiff_plain;h=411c2cad33613d6790cb819e8bd91a7f58a3998f subdirmk: Suppress MAKEFILE_TEMPLATES when running `make clean' See the README hunk for the reasoning. Signed-off-by: Ian Jackson --- diff --git a/README b/README index 518dd08..27dd855 100644 --- a/README +++ b/README @@ -371,6 +371,13 @@ makefiles, you may find that just `make' is broken now and cannot get far enough to regenerate a working set of makefiles. If this happens just rerun ./config.status by hand. +If you go back and forth between different versions of your code you +can sometimes find that `make' complains that one of your Subdir.sd.mk +files is missing: typically, if iot was used and therefore a +dependency in some other version of your code. If you run `make +clean' (or `make realclean') these dependencies are suppressed, which +will clear up the problem. + Legal information ----------------- diff --git a/generate b/generate index 22e8aff..32c6fbf 100755 --- a/generate +++ b/generate @@ -97,13 +97,16 @@ sub write_makefile ($$) { #print STDERR "write_makefile @_\n"; start_output_file("${dir_prefix}Makefile"); my $cd = $depth ? join('/', ('..',) x $depth) : '.'; + my $suppress_templates= + '$(if $(filter-out clean real-clean, $(subdirmk_targets)),,'. + ' MAKEFILE_TEMPLATES=)'; o <