X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc.mk;h=cd4682f2c3f2ca09ea28171777208aba1c5935f6;hb=b64ab38c23af457a190ae3c8fed752f20fd21ae7;hp=fa286089f1f4cbdf74b66c4347befd558e1286c0;hpb=24adfcd0544942dff994b75f7dd5f72ab3e3d0f4;p=ghc-hetmet.git diff --git a/ghc.mk b/ghc.mk index fa28608..cd4682f 100644 --- a/ghc.mk +++ b/ghc.mk @@ -134,18 +134,23 @@ show: # ----------------------------------------------------------------------------- # Include subsidiary build-system bits +ifneq "$(findstring clean,$(MAKECMDGOALS))" "" +-include mk/config.mk +else include mk/config.mk - ifeq "$(ProjectVersion)" "" $(error Please run ./configure first) endif +endif # (Optional) build-specific configuration include mk/custom-settings.mk +ifeq "$(findstring clean,$(MAKECMDGOALS))" "" ifeq "$(GhcLibWays)" "" $(error $$(GhcLibWays) is empty, it must contain at least one way) endif +endif # ----------------------------------------------------------------------------- # Macros for standard targets @@ -559,9 +564,11 @@ libraries/base3-compat_dist-install_HC_OPTS += -XPackageImports ifneq "$(BINDIST)" "YES" +ifneq "$(BOOTSTRAPPING_CONF)" "" ifeq "$(wildcard $(BOOTSTRAPPING_CONF))" "" $(shell echo "[]" >$(BOOTSTRAPPING_CONF)) endif +endif $(eval $(call clean-target,$(BOOTSTRAPPING_CONF),,$(BOOTSTRAPPING_CONF))) @@ -792,10 +799,7 @@ SRC_DIST_FILES += \ aclocal.m4 README ANNOUNCE HACKING LICENSE Makefile install-sh \ ghc.spec.in ghc.spec extra-gcc-opts.in VERSION boot ghc.mk -EXTRA_LIBS=$(patsubst %, $(SRC_DIST_NAME)/%, $(shell grep -E "extralibs|dph" packages | grep -v "^\#" | sed "s/ .*//")) - SRC_DIST_TARBALL = ghc-$(ProjectVersion)-src.tar.bz2 -SRC_DIST_EXTRALIBS_TARBALL = ghc-$(ProjectVersion)-src-extralibs.tar.bz2 VERSION : echo $(ProjectVersion) >VERSION @@ -842,8 +846,6 @@ sdist-prep : .PHONY: sdist sdist : sdist-prep - $(TAR) chf - $(EXTRA_LIBS) | bzip2 >$(TOP)/$(SRC_DIST_EXTRALIBS_TARBALL) - $(RM) -rf $(EXTRA_LIBS) $(TAR) chf - $(SRC_DIST_NAME) 2>$src_log | bzip2 >$(TOP)/$(SRC_DIST_TARBALL) sdist-manifest : $(SRC_DIST_TARBALL) @@ -854,7 +856,6 @@ sdist-manifest : $(SRC_DIST_TARBALL) # over SSH. ifneq "$(PublishLocation)" "" publish-sdist : - $(call nTimes,10,$(PublishCp) $(SRC_DIST_EXTRALIBS_TARBALL) $(PublishLocation)/dist) $(call nTimes,10,$(PublishCp) $(SRC_DIST_TARBALL) $(PublishLocation)/dist) endif @@ -892,7 +893,11 @@ maintainer-clean : distclean $(RM) configure mk/config.h.in $(RM) -r autom4te.cache libraries/*/autom4te.cache $(RM) ghc.spec - $(RM) libraries/*/GNUmakefile libraries/*/ghc.mk libraries/*/configure + $(RM) $(patsubst %, libraries/%/GNUmakefile, \ + $(PACKAGES) $(PACKAGES_STAGE2)) + $(RM) $(patsubst %, libraries/%/ghc.mk, $(PACKAGES) $(PACKAGES_STAGE2)) + $(RM) $(patsubst %, libraries/%/configure, \ + $(PACKAGES) $(PACKAGES_STAGE2)) $(RM) libraries/base/include/HsBaseConfig.h.in $(RM) libraries/directory/include/HsDirectoryConfig.h.in $(RM) libraries/process/include/HsProcessConfig.h.in