chiark / gitweb /
subdirmk/generate: Supply default target if none given in command line
[subdirmk.git] / subdirmk / generate
index 0ad0eb8c930da8832fedaa6b9459cf4a19189b83..fbf07d4664fc6c46a7382679a2fc6affae8b90a5 100755 (executable)
@@ -8,7 +8,7 @@
 #
 # generates in each subdirectory       from in each subdirectory
 #     Subdir.mk.tmp                        Subdir.sd.mk
-#     Makefile
+#     Makefile                          and included files
 # and in toplevel                      and in toplevel
 #     main.mk.tmp                          Perdir.sd.mk
 
@@ -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
 }