chiark / gitweb /
WIP attempt to run config.status with selective tags
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 13 Nov 2019 12:54:19 +0000 (12:54 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 13 Nov 2019 12:56:06 +0000 (12:56 +0000)
Does not work right now...

subdirmk/regen.mk.in

index f9d7240..2661ee1 100644 (file)
@@ -14,14 +14,20 @@ $(CONFIG_STATUS): $(top_srcdir)/$(CONFIGURE)
 
 MAKEFILES += subdirmk/regen.mk
 
-main.mk $(MAKEFILES): makefiles.phantom ;
-.INTERMEDIATE: makefiles.phantom
-makefiles.phantom:                                             \
+main.mk $(MAKEFILES): .config.status.needed
+       ./$<
+.INTERMEDIATE: .config.status.needed
+.config.status.needed:                                                 \
                $(top_srcdir)/subdirmk/generate                 \
                $(CONFIG_STATUS)                                \
                $(top_srcdir)/Perdir.mk.in                      \
                $(foreach m,$(MAKEFILES),$(top_srcdir)/$(m).in)
-       ./$(CONFIG_STATUS)
+       : $?
+       set -e; printf >$@.tmp "#!/bin/sh\nset -e\n%s %s"       \
+               "./$(CONFIG_STATUS)"                            \
+               "$(if   $(filter-out %.mk.in, $?),,             \
+                       $(patsubst %.mk.in,%.mk,$?))"   ;       \
+               chmod +x $@.tmp; mv -f $@.tmp $@
 
 realclean:: clean
        $(RM) config.status config.log