chiark / gitweb /
regen.mk.in: Debugging, controlled by SUBDIRMK_REGEN_NDEBUG
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 28 Dec 2019 23:17:07 +0000 (23:17 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 29 Dec 2019 16:04:44 +0000 (16:04 +0000)
And enable this in test/example/check.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
regen.mk.in
tests/example/check

index 5f24b08..b9625d7 100644 (file)
@@ -24,6 +24,9 @@ CONFIG_STATUS ?= config.status
 CONFIGURE_ACS  += $(CONFIGURE_AC)
 CONFIGURE_ACS  += subdirmk/subdirmk.ac
 
+# To turn on debugging here, export SUBDIRMK_REGEN_NDEBUG=''
+SUBDIRMK_REGEN_NDEBUG ?= @
+
 $(top_srcdir)/$(CONFIGURE): $(addprefix $(top_srcdir)/,$(CONFIGURE_ACS))
        cd $(top_srcdir) && autoconf
 
@@ -36,7 +39,8 @@ MAKEFILE_TEMPLATES += $(addprefix $(top_srcdir)/, $(addsuffix .in, \
        ))
 
 main.mk $(SUBDIRMK_MAKEFILES) $(CONFIG_STATUS_OUTPUTS): .makefiles.stamp
-               @:
+       $(SUBDIRMK_REGEN_NDEBUG): REGEN STAMP CAUSES TARGET=$@
+
 .makefiles.stamp:                                              \
                $(top_srcdir)/subdirmk/generate                 \
                $(CONFIG_STATUS)                                \
@@ -49,6 +53,7 @@ main.mk $(SUBDIRMK_MAKEFILES) $(CONFIG_STATUS_OUTPUTS): .makefiles.stamp
 # pass nothing and config.status does them all.  We need to mention
 # Subdir.sd.mk twice because if $(top_srcdir) is `.', make elides the
 # directory part from $?.
+       $(SUBDIRMK_REGEN_NDEBUG): REGEN STAMP WANTS DEPS=$?
        ./$(CONFIG_STATUS) $(if                                 \
                $(filter-out Subdir.sd.mk %/Subdir.sd.mk        \
                             %.mk.in                            \
index d5d282f..a5b27ba 100755 (executable)
@@ -3,6 +3,9 @@ set -ex
 
 cd example
 
+SUBDIRMK_REGEN_NDEBUG=''
+export SUBDIRMK_REGEN_NDEBUG
+
 #----- in-tree build -----
 
 git clean -xdff