X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=Makefile;h=870e0c4dc6f134d9a1a8b282141aa917ea6f50a3;hp=b89257fe3804d37dc0fbb8b21259a616cc5406fa;hb=9dbd1897ed02a3bdbeee41c0164b88569a053ff8;hpb=c72f2cb1f7eb299f9289b7a33233174d470cfa0f diff --git a/Makefile b/Makefile index b89257f..870e0c4 100644 --- a/Makefile +++ b/Makefile @@ -67,12 +67,12 @@ include $(TOP)/mk/boilerplate.mk # We can't 'make boot' in libraries until stage1 is built ifeq "$(BootingFromHc)" "YES" -SUBDIRS_BUILD = gmp includes rts compat compiler docs utils driver +SUBDIRS_BUILD = gmp libffi includes rts compat compiler docs utils driver else -SUBDIRS_BUILD = gmp includes compat utils driver docs compiler rts libraries/Cabal/doc +SUBDIRS_BUILD = gmp libffi includes compat utils driver docs compiler rts libraries/Cabal/doc endif -SUBDIRS = gmp includes compat utils driver docs rts libraries compiler libraries/Cabal/doc +SUBDIRS = gmp libffi includes compat utils driver docs rts libraries compiler libraries/Cabal/doc # Sanity check that all the boot libraries are in the tree, to catch # failure to run darcs-all. @@ -98,6 +98,7 @@ endif endif stage1 : $(GCC_LIB_DEP) check-packages + $(MAKE) -C utils mostlyclean $(MAKE) -C utils/mkdependC boot @case '${MFLAGS}' in *-[ik]*) x_on_err=0;; *-r*[ik]*) x_on_err=0;; *) x_on_err=1;; esac; \ for i in $(SUBDIRS_BUILD); do \ @@ -119,9 +120,23 @@ stage1 : $(GCC_LIB_DEP) check-packages $(MAKE) -C libraries boot $(MAKE) -C libraries all +# When making distributions (i.e., whether with binary-dist or using the +# vanilla install target to create an installer package), we can have problems +# if some things (e.g. ghc-pkg) are compiled with the bootstrapping compiler +# and some (e.g. the stage 2 compiler) with the stage1 compiler. See #1860 for +# an example. Thus, we explicitly build a second version with the stage 1 +# compiler of all utils that get installed and of all extra support binaries +# includes in binary dists. stage2 : check-packages + $(MAKE) -C utils mostlyclean + $(MAKE) -C utils stage=2 $(MAKE) -C compiler boot stage=2 $(MAKE) -C compiler stage=2 + $(RM) -f libraries/ifBuildable/ifBuildable + $(MAKE) -C libraries stage=2 ifBuildable/ifBuildable + $(RM) -f libraries/installPackage/installPackage + $(MAKE) -C libraries stage=2 installPackage/installPackage + stage3 : check-packages $(MAKE) -C compiler boot stage=3 @@ -259,21 +274,6 @@ binary-dist:: -rm -rf $(BIN_DIST_DIR) -$(RM) $(BIN_DIST_TARBALL) -# When making bindists, we can have problems if some things (e.g. ghc-pkg) -# are compiled with the bootstrapping compiler and some (e.g. the stage 2 -# compiler) with the stage1 compiler. See #1860 for an example. -# Thus we rebuild the utils with stage 1 here. This is a bit unpleasant, -# as binary-dist really shouldn't actually build anything, but it works. -# We need to do the same for utilities used during library package installation. -binary-dist:: - $(MAKE) -C utils clean - $(MAKE) -C utils UseStage1=YES boot - $(MAKE) -C utils UseStage1=YES - $(RM) -f libraries/ifBuildable/ifBuildable - $(MAKE) -C libraries UseStage1=YES ifBuildable/ifBuildable - $(RM) -f libraries/installPackage/installPackage - $(MAKE) -C libraries UseStage1=YES installPackage/installPackage - ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32" binary-dist:: @@ -353,7 +353,7 @@ binary-dist:: echo "HaveLibGmp = $(HaveLibGmp)" >> $(VARFILE) echo "GhcLibsWithUnix = $(GhcLibsWithUnix)" >> $(VARFILE) echo "GhcWithInterpreter = $(GhcWithInterpreter)" >> $(VARFILE) - echo "GhcHasReadline = $(GhcHasReadline)" >> $(VARFILE) + echo "GhcHasEditline = $(GhcHasEditline)" >> $(VARFILE) echo "BootingFromHc = $(BootingFromHc)" >> $(VARFILE) echo "XMLDocWays = $(XMLDocWays)" >> $(VARFILE) # We won't actually use xsltproc, but we need to know if it's "" or not