X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=ghc.mk;h=59b5ee8e59f279c18bce2db5379526fd41c7dd0a;hp=119e1be68fec61ce3737ca90bd5992b64914212d;hb=431e40e1a2f795d5069d97661b7cd55f3e3b05bf;hpb=f3aea765441184e9a1235dccd8ebc02d2eb4dc5a diff --git a/ghc.mk b/ghc.mk index 119e1be..59b5ee8 100644 --- a/ghc.mk +++ b/ghc.mk @@ -26,23 +26,22 @@ # # Once the new build system is in HEAD, and before 6.12: # +# * separate the logic of whether to do something from the test for +# existence of the tool to do it. For example, rather than checking +# if $DIR_DOCBOOK_XSL or $XSLTPROC is "", we should have a variable +# for controlling the building of the docs. # * remove old Makefiles, add new stubs for building in subdirs # * utils/hsc2hs/Makefile # * utils/haddock/Makefile -# * mk/oldconfig.mk.in # * docs/Makefile # * docs/docbook-cheat-sheet/Makefile # * docs/ext-core/Makefile # * docs/man/Makefile # * docs/storage-mgmt/Makefile -# * docs/users_guide/Makefile # * docs/vh/Makefile # * driver/Makefile -# * driver/ghc/Makefile -# * libraries/Makefile # * rts/dotnet/Makefile # * utils/Makefile -# * docbook PDFs, e.g. "dblatex -T db2latex users_guide.xml" # * GhcProfiled # * optionally install stage3? # * shared libraries, way dyn @@ -165,8 +164,6 @@ $(eval $(call clean-target,inplace,,inplace)) # When we're just doing 'make clean' or 'make show', then we don't need # to build dependencies. -NO_INCLUDE_DEPS = NO -NO_INCLUDE_PKGDATA = NO ifneq "$(findstring clean,$(MAKECMDGOALS))" "" NO_INCLUDE_DEPS = YES NO_INCLUDE_PKGDATA = YES @@ -318,6 +315,16 @@ endif PACKAGES += haskeline +ifneq "$(wildcard libraries/dph)" "" +PACKAGES += \ + dph/dph-base \ + dph/dph-prim-interface \ + dph/dph-prim-seq \ + dph/dph-prim-par \ + dph/dph-seq \ + dph/dph-par +endif + BOOT_PKGS = Cabal hpc extensible-exceptions # The actual .a and .so/.dll files: needed for dependencies. @@ -471,6 +478,7 @@ endif BUILD_DIRS += \ utils/haddock \ + utils/haddock/doc \ $(patsubst %, libraries/%, $(PACKAGES)) \ compiler \ $(GHC_HSC2HS_DIR) \ @@ -517,6 +525,9 @@ $(foreach lib,$(PACKAGES),$(eval \ libraries/$(lib)_dist-install_DISABLE = YES)) endif +ifneq "$(wildcard libraries/dph)" "" +include libraries/dph/ghc.mk +endif include $(patsubst %, %/ghc.mk, $(BUILD_DIRS)) # We need -fno-warn-deprecated-flags to avoid failure with -Werror @@ -701,13 +712,13 @@ install_packages: libffi/package.conf.install rts/package.conf.install $(eval $(call bindist,.,\ LICENSE \ - configure config.sub config.guess \ + configure config.sub config.guess install-sh \ extra-gcc-opts.in \ Makefile \ mk/config.mk.in \ $(INPLACE_BIN)/mkdirhier \ $(INPLACE_BIN)/ghc-cabal \ - utils/pwd/pwd \ + utils/ghc-pwd/ghc-pwd \ $(BINDIST_WRAPPERS) \ $(BINDIST_LIBS) \ $(BINDIST_HI) \ @@ -727,14 +738,19 @@ $(eval $(call bindist,.,\ binary-dist: $(RM) -rf $(BIN_DIST_NAME) mkdir $(BIN_DIST_NAME) - set -e; for i in LICENSE compiler ghc rts libraries utils gmp docs libffi includes driver mk rules Makefile aclocal.m4 config.sub config.guess extra-gcc-opts.in ghc.mk inplace; do ln -s ../$$i $(BIN_DIST_NAME)/; done + set -e; for i in LICENSE compiler ghc rts libraries utils gmp docs libffi includes driver mk rules Makefile aclocal.m4 config.sub config.guess install-sh extra-gcc-opts.in ghc.mk inplace; do ln -s ../$$i $(BIN_DIST_NAME)/; done ln -s ../distrib/configure-bin.ac $(BIN_DIST_NAME)/configure.ac cd $(BIN_DIST_NAME) && autoreconf $(RM) -f $(BIN_DIST_TAR) # h means "follow symlinks", e.g. if aclocal.m4 is a symlink to a source # tree then we want to include the real file, not a symlink to it - $(TAR) hcf $(BIN_DIST_TAR) -T $(BIN_DIST_LIST) - bzip2 < $(BIN_DIST_TAR) > $(BIN_DIST_TAR_BZ2) + $(TAR) hcf - -T $(BIN_DIST_LIST) | bzip2 -c >$(BIN_DIST_TAR_BZ2) + +nTimes = set -e; for i in `seq 1 $(1)`; do echo Try "$$i: $(2)"; if $(2); then break; fi; done + +.PHONY: publish-binary-dist +publish-binary-dist: + $(call nTimes,10,$(PublishCp) $(BIN_DIST_TAR_BZ2) $(PublishLocation)/dist) # ----------------------------------------------------------------------------- # Source distributions @@ -832,14 +848,12 @@ sdist-manifest : $(SRC_DIST_TARBALL) # over SSH. ifneq "$(PublishLocation)" "" publish-sdist : - @for i in 0 1 2 3 4 5 6 7 8 9; do \ - echo "Try $$i: $(PublishCp) $(SRC_DIST_EXTRALIBS_TARBALL) $(PublishLocation)/dist"; \ - if $(PublishCp) $(SRC_DIST_EXTRALIBS_TARBALL) $(PublishLocation)/dist; then break; fi; \ - done - @for i in 0 1 2 3 4 5 6 7 8 9; do \ - echo "Try $$i: $(PublishCp) $(SRC_DIST_TARBALL) $(PublishLocation)/dist"; \ - if $(PublishCp) $(SRC_DIST_TARBALL) $(PublishLocation)/dist; then break; fi; \ - done + $(call nTimes,10,$(PublishCp) $(SRC_DIST_EXTRALIBS_TARBALL) $(PublishLocation)/dist) + $(call nTimes,10,$(PublishCp) $(SRC_DIST_TARBALL) $(PublishLocation)/dist) +endif + +ifeq "$(GhcUnregisterised)" "YES" +SRC_CC_OPTS += -DNO_REGS -DUSE_MINIINTERPRETER endif # ----------------------------------------------------------------------------- @@ -847,6 +861,11 @@ endif .PHONY: clean +CLEAN_FILES += utils/ghc-pwd/ghc-pwd +CLEAN_FILES += utils/ghc-pwd/ghc-pwd.exe +CLEAN_FILES += utils/ghc-pwd/ghc-pwd.hi +CLEAN_FILES += utils/ghc-pwd/ghc-pwd.o + clean : clean_files .PHONY: clean_files clean_files : @@ -873,3 +892,6 @@ maintainer-clean : distclean $(RM) libraries/process/include/HsProcessConfig.h.in $(RM) libraries/unix/include/HsUnixConfig.h.in $(RM) libraries/old-time/include/HsTimeConfig.h.in + +.PHONY: all_libraries +