Commit fa587316 authored by thomie's avatar thomie
Browse files

Revert "Build system: don't create mk/"

This reverts commit aecf4a5f.

It turns out the Simons are relying on 'mk/', see

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/', 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/ 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/, and include

      * any other settings you have in will also get used.
      * the distinction between 'mk/' and 'mk/' becomes less
      * it is easy to forget to include '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:
parent 2a74a64e
......@@ -135,6 +135,7 @@ _darcs/
......@@ -1327,6 +1327,9 @@ clean_bindistprep:
$(call removeTrees,bindistprep/)
distclean : clean
# Clean the files that ./validate creates.
$(call removeFiles,mk/
# Clean the files that we ask ./configure to create.
$(call removeFiles,mk/
$(call removeFiles,mk/
-include mk/
ifeq "$(Validating)" "YES"
include mk/flavours/
-include mk/
......@@ -174,7 +174,9 @@ fi
make_settings="Validating=YES ValidateSpeed=$speed ValidateHpc=$hpc"
echo "Validating=YES" > mk/
echo "ValidateSpeed=$speed" >> mk/
echo "ValidateHpc=$hpc" >> 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/ # Less gunk
if [ $use_dph -eq 1 ]; then
make_settings="$make_settings BUILD_DPH=YES"
echo "BUILD_DPH=YES" >> mk/
echo "BUILD_DPH=NO" >> mk/
$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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment