[commit: ghc] master: Revert "Build system: don't create mk/are-validating.mk" (fa58731)

git at git.haskell.org git at git.haskell.org
Thu Oct 29 12:26:48 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/fa58731684af45dddc27b8eb11c4c042b1dec9c4/ghc

>---------------------------------------------------------------

commit fa58731684af45dddc27b8eb11c4c042b1dec9c4
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Tue Oct 27 16:46:01 2015 +0100

    Revert "Build system: don't create mk/are-validating.mk"
    
    Summary:
    This reverts commit aecf4a5f96d0d3ffcf4cb2c67a20a610d7c64486.
    
    It turns out the Simons are relying on 'mk/are-validating.mk', see
    D1307.
    
    The workflow they are using is:
      * run ./validate
      * find a bug in the compiler
      * try to fix the bug, running 'make 1' (or 'make 2') repeatedly. Because
        of 'mk/are-validating.mk', this uses the same build settings as validate.
      * continue ./validate (--no-clean)
    
    I suggested two alternatives:
    
      A. run 'make 1 Validating=YES' instead of 'make 1'
    
         Problem: when running `./validate --fast` or `./validate --hpc`
         instead of a normal `./validate`, validate sets ValidateSpeed and
         ValdateHpc in mk/are-validating.mk. You would for example have to run
         'make 1 Validating=YES ValidateSpeed=FAST' instead of 'make 1' to get the
         same build settings as `./validate --fast`, which is entirely too long and
         error prone.
    
      B. uncomment `#BuildFlavour=validate` in mk/build.mk, and include
         'mk/validate.mk'.
    
         Problems:
          * any other settings you have in build.mk will also get used.
          * the distinction between 'mk/validate.mk' and 'mk/build.mk' becomes less
            clear.
          * it is easy to forget to include 'mk/validate.mk'.
          * the build system again doesn't have access to the ValidateSpeed and
            ValdateHpc settings set by validate.
    
    Neither of these two options is entirely satisfactory.
    
    Reviewers: austin, bgamari
    
    Differential Revision: https://phabricator.haskell.org/D1383


>---------------------------------------------------------------

fa58731684af45dddc27b8eb11c4c042b1dec9c4
 .gitignore            |  1 +
 ghc.mk                |  3 +++
 mk/custom-settings.mk |  3 +++
 validate              | 18 +++++++++++-------
 4 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/.gitignore b/.gitignore
index 33664d7..322ae6a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -135,6 +135,7 @@ _darcs/
 /libraries/plus.gif
 /libraries/synopsis.png
 /libraries/stamp/
+/mk/are-validating.mk
 /mk/build.mk
 /mk/config.h
 /mk/config.h.in
diff --git a/ghc.mk b/ghc.mk
index b2be252..595356a 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -1327,6 +1327,9 @@ clean_bindistprep:
 	$(call removeTrees,bindistprep/)
 
 distclean : clean
+# Clean the files that ./validate creates.
+	$(call removeFiles,mk/are-validating.mk)
+
 # Clean the files that we ask ./configure to create.
 	$(call removeFiles,mk/config.mk)
 	$(call removeFiles,mk/install.mk)
diff --git a/mk/custom-settings.mk b/mk/custom-settings.mk
index 5f9814b..2b4b127 100644
--- a/mk/custom-settings.mk
+++ b/mk/custom-settings.mk
@@ -1,3 +1,6 @@
+
+-include mk/are-validating.mk
+
 ifeq "$(Validating)" "YES"
 include mk/flavours/validate.mk
 -include mk/validate.mk
diff --git a/validate b/validate
index 827815f..4c123fe 100755
--- a/validate
+++ b/validate
@@ -174,7 +174,9 @@ fi
 
 thisdir=`utils/ghc-pwd/dist-boot/ghc-pwd`
 
-make_settings="Validating=YES ValidateSpeed=$speed ValidateHpc=$hpc"
+echo "Validating=YES"       >  mk/are-validating.mk
+echo "ValidateSpeed=$speed" >> mk/are-validating.mk
+echo "ValidateHpc=$hpc"     >> mk/are-validating.mk
 
 # Note [Default build system verbosity].
 #
@@ -188,14 +190,16 @@ make_settings="Validating=YES ValidateSpeed=$speed ValidateHpc=$hpc"
 # `make -s`, when user explicitly asks for it with `./validate --quiet`.
 if [ $be_quiet -eq 1 ]; then
     # See Note [Default build system verbosity].
-    make_settings="$make_settings V=0"
+    echo "V=0"                  >> mk/are-validating.mk # Less gunk
 fi
 
 if [ $use_dph -eq 1 ]; then
-    make_settings="$make_settings BUILD_DPH=YES"
+    echo "BUILD_DPH=YES"    >> mk/are-validating.mk
+else
+    echo "BUILD_DPH=NO"     >> mk/are-validating.mk
 fi
 
-$make -j$threads $make_settings
+$make -j$threads
 # For a "debug make", add "--debug=b --debug=m"
 
 check_packages post-build
@@ -205,8 +209,8 @@ check_packages post-build
 
 if [ $speed != "FAST" ]; then
 
-    $make binary-dist-prep $make_settings
-    $make test_bindist TEST_PREP=YES $make_settings
+    $make binary-dist-prep
+    $make test_bindist TEST_PREP=YES
 
     #
     # Install the xhtml package into the bindist.
@@ -217,7 +221,7 @@ if [ $speed != "FAST" ]; then
 
     check_packages post-install
 
-    $make validate_build_xhtml BINDIST_PREFIX="$thisdir/$bindistdir" $make_settings
+    $make validate_build_xhtml BINDIST_PREFIX="$thisdir/$bindistdir"
 
     check_packages post-xhtml
 fi



More information about the ghc-commits mailing list