chiark
/
gitweb
/
~ian
/
subdirmk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
README: Fix a mistake in the file reference table
[subdirmk.git]
/
generate
diff --git
a/generate
b/generate
index 7bdbd881c9fab3b3d2f552e6465b73a93dad8c18..9275b25770b818e8346a6c11b0ba532c9e2e4de7 100755
(executable)
--- a/
generate
+++ b/
generate
@@
-97,12
+97,16
@@
sub write_makefile ($$) {
#print STDERR "write_makefile @_\n";
start_output_file("${dir_prefix}Makefile");
my $cd = $depth ? join('/', ('..',) x $depth) : '.';
#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 <<END;
default: all
o <<END;
default: all
-\$(
MAKECMDGOALS
) all: run-main.mk
+\$(
filter-out all,\$(MAKECMDGOALS)
) all: run-main.mk
\@:
\@:
+subdirmk_targets:=\$(or \$(MAKECMDGOALS),all)
Makefile run-main.mk:
Makefile run-main.mk:
- \$(MAKE) -C $cd -f main.mk \$(addprefix ${dir_prefix},\$(
or \$(MAKECMDGOALS),all))
+ \$(MAKE) -C $cd -f main.mk \$(addprefix ${dir_prefix},\$(
subdirmk_targets))$suppress_templates
.SUFFIXES:
.PHONY: run-main.mk
END
.SUFFIXES:
.PHONY: run-main.mk
END