chiark / gitweb /
subdirmk: Change stub force target to `run-main.mk'
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 17 Nov 2019 01:26:26 +0000 (01:26 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 24 Nov 2019 18:38:38 +0000 (18:38 +0000)
This produces significantly better error messages:
  [some error from actual makefiles]
  make[1]: Leaving directory '/home/ian/wherever'
  Makefile:6: recipe for target 'run-main.mk' failed

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

index 1787546..dd22146 100755 (executable)
@@ -99,12 +99,12 @@ sub write_makefile ($$) {
     my $cd = $depth ? join('/', ('..',) x $depth) : '.';
     o <<END;
 default: all
-\$(MAKECMDGOALS) all: FORCE-ALWAYS-RUN
+\$(MAKECMDGOALS) all: run-main.mk
        \@:
-Makefile FORCE-ALWAYS-RUN:
+Makefile run-main.mk:
        \$(MAKE) -C $cd -f main.mk \$(addprefix ${dir_prefix},\$(or \$(MAKECMDGOALS),all))
 .SUFFIXES:
-.PHONY:        FORCE-ALWAYS-RUN
+.PHONY:        run-main.mk
 END
 }