chiark / gitweb /
subdirmk: stub Makefiles: filter out `all'
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 3 Dec 2019 23:07:00 +0000 (23:07 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 4 Dec 2019 01:26:12 +0000 (01:26 +0000)
Otherwise `make all' generates this:
  Makefile:3: target 'all' given more than once in the same rule
which is harmless but mildly irritating.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
generate

index dd22146..87e2214 100755 (executable)
--- a/generate
+++ b/generate
@@ -99,7 +99,7 @@ sub write_makefile ($$) {
     my $cd = $depth ? join('/', ('..',) x $depth) : '.';
     o <<END;
 default: all
-\$(MAKECMDGOALS) all: run-main.mk
+\$(filter-out all,\$(MAKECMDGOALS)) all: run-main.mk
        \@:
 Makefile run-main.mk:
        \$(MAKE) -C $cd -f main.mk \$(addprefix ${dir_prefix},\$(or \$(MAKECMDGOALS),all))