chiark / gitweb /
run config.status with selective tags
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 13 Nov 2019 13:04:43 +0000 (13:04 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 13 Nov 2019 13:04:43 +0000 (13:04 +0000)
.gitignore
subdirmk/regen.mk.in

index 60b28ff..7951b38 100644 (file)
@@ -14,6 +14,7 @@
 /configure
 
 ## subdirmk-generated
+.makefiles.stamp
 /main.mk
 /subdirmk/regen.mk
 Makefile
index 2661ee1..e2944f0 100644 (file)
@@ -14,20 +14,17 @@ $(CONFIG_STATUS): $(top_srcdir)/$(CONFIGURE)
 
 MAKEFILES += subdirmk/regen.mk
 
-main.mk $(MAKEFILES): .config.status.needed
-       ./$<
-.INTERMEDIATE: .config.status.needed
-.config.status.needed:                                                 \
+main.mk $(MAKEFILES): .makefiles.stamp ;
+.makefiles.stamp:                                              \
                $(top_srcdir)/subdirmk/generate                 \
                $(CONFIG_STATUS)                                \
                $(top_srcdir)/Perdir.mk.in                      \
                $(foreach m,$(MAKEFILES),$(top_srcdir)/$(m).in)
-       : $?
-       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 $@
+       : $? X $(filter-out Subdir.mk.in regen.mk.in, $(notdir $?))
+       ./$(CONFIG_STATUS) $(if                                 \
+               $(filter-out Subdir.mk.in regen.mk.in, $(notdir $?)),,  \
+               $(patsubst %.mk.in,%.mk,$(filter %.mk.in,$?)))
+       touch $@
 
 realclean:: clean
        $(RM) config.status config.log