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: v0.6.0~265 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=6bdac29dbe716ebc6fd6bb4f98e4f6c84e1c5df7;p=secnet.git subdirmk: Suppress MAKEFILE_TEMPLATES when running `make clean' See the README hunk for the reasoning. Signed-off-by: Ian Jackson --- diff --git a/subdirmk/README b/subdirmk/README index 518dd08..27dd855 100644 --- a/subdirmk/README +++ b/subdirmk/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/subdirmk/generate b/subdirmk/generate index 22e8aff..32c6fbf 100755 --- a/subdirmk/generate +++ b/subdirmk/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 <