X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc.mk;h=0bfca27f98e36ad7ac22712319c3770e0b6a8598;hb=eb5ecfbe174cda6b40a22f44b2b0cdfd2ef2f149;hp=9944d7b00d9b562817979ab138e86fe8bc3fa664;hpb=762babe6ccf1c5f63e0b077e9abfdb0d86d4cc78;p=ghc-hetmet.git diff --git a/ghc.mk b/ghc.mk index 9944d7b..0bfca27 100644 --- a/ghc.mk +++ b/ghc.mk @@ -1,3 +1,15 @@ +# ----------------------------------------------------------------------------- +# +# (c) 2009 The University of Glasgow +# +# This file is part of the GHC build system. +# +# To understand how the build system works and how to modify it, see +# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture +# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying +# +# ----------------------------------------------------------------------------- + # ToDo List. # # Before we can merge the new build system into HEAD: @@ -153,8 +165,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 @@ -296,15 +306,29 @@ PACKAGES += \ syb \ template-haskell \ base3-compat \ - Cabal + Cabal \ + mtl \ + utf8-string + +ifneq "$(Windows)" "YES" +PACKAGES += terminfo +endif + +PACKAGES += haskeline BOOT_PKGS = Cabal hpc extensible-exceptions -# The actual .a files: needed for dependencies. +# The actual .a and .so/.dll files: needed for dependencies. ALL_LIBS = $(foreach lib,$(PACKAGES),$(libraries/$(lib)_dist-install_v_LIB)) +ifeq "$(BuildSharedLibs)" "YES" +ALL_LIBS += $(foreach lib,$(PACKAGES),$(libraries/$(lib)_dist-install_dyn_LIB)) +endif BOOT_LIBS = $(foreach lib,$(BOOT_PKGS),$(libraries/$(lib)_dist-boot_v_LIB)) -OTHER_LIBS = libffi/libHSffi.a libffi/HSffi.o +OTHER_LIBS = libffi/libHSffi$(v_libsuf) libffi/HSffi.o +ifeq "$(BuildSharedLibs)" "YES" +OTHER_LIBS += libffi/libHSffi$(dyn_libsuf) +endif ifeq "$(HaveLibGmp)" "NO" OTHER_LIBS += gmp/libgmp.a endif @@ -707,8 +731,13 @@ binary-dist: $(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 @@ -806,14 +835,8 @@ 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 # -----------------------------------------------------------------------------