From: Mark Wooding Date: Wed, 13 Nov 2019 18:42:18 +0000 (+0000) Subject: subdirmk/generate: Supply default target if none given in command line X-Git-Tag: subdirmk/0.1~48^2~4 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?p=subdirmk.git;a=commitdiff_plain;h=32f2d681625cb2d4bde2d155e5b95ec12d0e753d;hp=53819b44e7c74b0a991d41fd96d706861051799d subdirmk/generate: Supply default target if none given in command line If you just run `make' then `$(MAKECMDGOALS)' is empty, so we get the default target of `main.mk'. Nothing is set up by `usual.mk', so we end up with `$(srcdir)/configure' established by `regen.mk'. Instead, propagate `all' to the `main.mk' makefile. Maybe this should be configurable, though I don't think that'll be very useful in real life. Signed-off-by: Mark Wooding --- diff --git a/subdirmk/generate b/subdirmk/generate index 8669864..fbf07d4 100755 --- a/subdirmk/generate +++ b/subdirmk/generate @@ -102,7 +102,7 @@ default: all %: FORCE-ALWAYS-RUN \@: Makefile FORCE-ALWAYS-RUN: - \$(MAKE) -C $cd -f main.mk \$(addprefix ${dir_prefix},\$(MAKECMDGOALS)) + \$(MAKE) -C $cd -f main.mk \$(addprefix ${dir_prefix},\$(or \$(MAKECMDGOALS),all)) .SUFFIXES: END }