X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=ghc.mk;h=f49ca1368617b53342861fb52a88ec6af6b39166;hp=7381a80cf9c41e1b99dacb2d9d331f4a7469cfc9;hb=442f06cc8f9f729d33a8de3aa14cdaf80545808e;hpb=6dd9e1fb676126afebab0a0a340a7d6a0470d52a diff --git a/ghc.mk b/ghc.mk index 7381a80..f49ca13 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: @@ -12,36 +24,37 @@ # * need to fix Cabal for new Windows layout, see # Distribution/Simple/GHC.configureToolchain. # -# As we merge the new build system into HEAD: +# Once the new build system is in HEAD, and before 6.12: # # * remove old Makefiles, add new stubs for building in subdirs # * utils/hsc2hs/Makefile # * utils/haddock/Makefile # * mk/oldconfig.mk.in -# -# Once the new build system is in HEAD, and before 6.12: -# +# * 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? -# * why does so much stuff get rebuilt after re-configuring? # * shared libraries, way dyn -# * add pointers to wiki docs from the build system source # * get HC bootstrapping working # * add Makefiles for the rest of the utils/ programs that aren't built # by default (need to exclude them from 'make all' too) # # Tickets we can now close, or fix and close: # -# * 2744 check for presence of hsc2hs in ./configure # * 2966 make sure --with-gcc does the right thing (#2966) -# * 3115 make ghc.cabal read-only -# * 2107 install the docs by default # * 1693 make distclean # * 2689 make maintainer-clean -# * 2619 bootstrapping using a newer GHC shouldn't fail -# for bogus reasons (picking the wrong version of the ghc package) -# * 2770 check which version of gcc we require # * 3173 make install with DESTDIR # Possible cleanups: @@ -61,12 +74,6 @@ # a state where the package database is out of date, and the build # system doesn't know. -# NOTES on how to debug: -# make --debug=b --debug=m shows dependencies -# make -p prints all generated makefile rules and variables -# make show VALUE=VAR prints the value of VAR -# $(warning stuff) prints stuff when reading the makefile - # Approximate build order. # # The actual build order is defined by dependencies, and the phase @@ -301,12 +308,23 @@ 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 @@ -378,8 +396,8 @@ libraries/ghc-prim/GHC/Prim.hs : $(GENPRIMOP_INPLACE) $(PRIMOPS_TXT) # ----------------------------------------------------------------------------- # Include build instructions from all subdirs -# See commentary in the top-level Makefile for why we divide the build -# into phases. +# For the rationale behind the build phases, see +# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture/Idiom/PhaseOrdering # Setting foo_dist_DISABLE=YES means "in directory foo, for build # "dist", just read the package-data.mk file, do not build anything". @@ -833,12 +851,22 @@ clean_files : distclean : clean $(RM) config.cache config.status config.log mk/config.h mk/stamp-h - $(RM) mk/config.mk mk/are-validating.mk + $(RM) mk/config.mk mk/are-validating.mk mk/project.mk $(RM) extra-gcc-opts docs/users_guide/ug-book.xml $(RM) compiler/ghc.cabal ghc/ghc-bin.cabal $(RM) libraries/base/include/HsBaseConfig.h $(RM) libraries/directory/include/HsDirectoryConfig.h + $(RM) libraries/process/include/HsProcessConfig.h + $(RM) libraries/unix/include/HsUnixConfig.h + $(RM) libraries/old-time/include/HsTimeConfig.h maintainer-clean : distclean + $(RM) configure mk/config.h.in + $(RM) -r autom4te.cache libraries/*/autom4te.cache $(RM) ghc.spec - $(RM) libraries/*/GNUmakefile + $(RM) libraries/*/GNUmakefile libraries/*/ghc.mk libraries/*/configure + $(RM) libraries/base/include/HsBaseConfig.h.in + $(RM) libraries/directory/include/HsDirectoryConfig.h.in + $(RM) libraries/process/include/HsProcessConfig.h.in + $(RM) libraries/unix/include/HsUnixConfig.h.in + $(RM) libraries/old-time/include/HsTimeConfig.h.in