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>
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))