Change how we know whether or not we are validating
authorIan Lynagh <igloo@earth.li>
Sun, 17 Aug 2008 12:33:11 +0000 (12:33 +0000)
committerIan Lynagh <igloo@earth.li>
Sun, 17 Aug 2008 12:33:11 +0000 (12:33 +0000)
We now set Validating=YES in mk/are-validating.mk rather than on the
commandline. This means that if you build a tree with validate then
just running make in it will use the validate flags.
"make distclean" removes mk/are-validating.mk, putting us back in
standard build mode.

Makefile
mk/custom-settings.mk
validate

index d2cd6b8..7adec86 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -595,7 +595,7 @@ DIST_CLEAN_FILES += config.cache config.status mk/config.h mk/stamp-h \
        docs/users_guide/ug-book.xml extra-gcc-opts
 
 # don't clean config.mk: it's needed when cleaning stuff later on
-LATE_DIST_CLEAN_FILES += mk/config.mk 
+LATE_DIST_CLEAN_FILES += mk/config.mk mk/are-validating.mk
 
 # VERSION is shipped in a source dist
 MAINTAINER_CLEAN_FILES += VERSION
index db8ebb4..1a01873 100644 (file)
@@ -1,4 +1,6 @@
 
+-include $(TOP)/mk/are-validating.mk
+
 ifeq "$(Validating)" "YES"
 include $(TOP)/mk/validate-settings.mk
 -include $(TOP)/mk/validate.mk
index 31900a1..d6f1c15 100644 (file)
--- a/validate
+++ b/validate
@@ -73,7 +73,9 @@ fi
 
 thisdir=`utils/pwd/pwd forwardslash`
 
-make Validating=YES -j$threads ValidateHpc=$hpc ValidateSlow=$slow
+echo "Validating=YES" > mk/are-validating.mk
+
+make -j$threads ValidateHpc=$hpc ValidateSlow=$slow
 fi # testsuite-only
 
 if [ "$hpc" = YES ]
@@ -86,7 +88,7 @@ then
     rm -f $HPCTIXFILE
 fi
 
-make Validating=YES -C testsuite/tests/ghc-regress fast stage=2 CLEANUP=1 THREADS=$threads 2>&1 | tee testlog
+make -C testsuite/tests/ghc-regress fast stage=2 CLEANUP=1 THREADS=$threads 2>&1 | tee testlog
 
 if [ "$hpc" = YES ]
 then