X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=ghc.mk;h=f818482e3458b4bd76b7691e82b99b47f627616d;hp=53b859da77992aaff070c3ba6ca5c63143ddba0d;hb=9e5a454cd78650a0c9e2a859693ee1af056b3fb9;hpb=dd47428295d89eb6bbf91316ac4f5a6e98b1ec70 diff --git a/ghc.mk b/ghc.mk index 53b859d..f818482 100644 --- a/ghc.mk +++ b/ghc.mk @@ -136,9 +136,14 @@ $(error $$(GhcLibWays) is empty, it must contain at least one way) endif endif +ifeq "$(phase)" "" +phase = final +endif + # ----------------------------------------------------------------------------- # Utility definitions +include rules/prof.mk include rules/trace.mk include rules/make-command.mk @@ -307,7 +312,7 @@ TH_PACKAGES := $(DPH_PACKAGES) # # We assume that the stage0 compiler has a suitable bytestring package, # so we don't have to include it below. -STAGE0_PACKAGES = Cabal hpc extensible-exceptions binary bin-package-db +STAGE0_PACKAGES = Cabal hpc extensible-exceptions binary bin-package-db hoopl # These packages are installed, but are installed hidden # Why install them at all? Because the 'ghc' package depends on them @@ -390,6 +395,7 @@ $(eval $(call addPackage,template-haskell)) $(eval $(call addPackage,Cabal)) $(eval $(call addPackage,binary)) $(eval $(call addPackage,bin-package-db)) +$(eval $(call addPackage,hoopl)) $(eval $(call addPackage,mtl)) $(eval $(call addPackage,utf8-string)) $(eval $(call addPackage,xhtml)) @@ -505,7 +511,7 @@ endif # ---------------------------------------------- # Checking packages with 'cabal check' -ifeq "$(phase)" "" +ifeq "$(phase)" "final" ifeq "$(CHECK_PACKAGES)" "YES" all: check_packages endif @@ -642,7 +648,7 @@ $(foreach p,$(STAGE0_PACKAGES),$(eval libraries/$p_dist-boot_DO_HADDOCK = NO)) ifeq "$(HADDOCK_DOCS)" "YES" libraries/index.html: inplace/bin/haddock$(exeext) $(ALL_HADDOCK_FILES) cd libraries && sh gen_contents_index --inplace -ifeq "$(phase)" "" +ifeq "$(phase)" "final" $(eval $(call all-target,library_doc_index,libraries/index.html)) endif INSTALL_LIBRARY_DOCS += libraries/*.html libraries/*.gif libraries/*.css libraries/*.js @@ -674,6 +680,7 @@ $(eval $(call build-package,libraries/extensible-exceptions,dist-boot,0)) $(eval $(call build-package,libraries/Cabal,dist-boot,0)) $(eval $(call build-package,libraries/binary,dist-boot,0)) $(eval $(call build-package,libraries/bin-package-db,dist-boot,0)) +$(eval $(call build-package,libraries/hoopl,dist-boot,0)) # register the boot packages in strict sequence, because running # multiple ghc-pkgs in parallel doesn't work (registrations may get @@ -1205,3 +1212,15 @@ phase_0_builds: $(utils/genprimopcode_dist_depfile_c_asm) .PHONY: phase_1_builds phase_1_builds: $(PACKAGE_DATA_MKS) +# ----------------------------------------------------------------------------- +# Support for writing GHC passes in Coq + +compiler/coq/Makefile: + git submodule update --init compiler/coq + cd compiler/coq/; git checkout master +compiler/coq/build/CoqPass.hs: compiler/coq/Makefile $(wildcard compiler/coq/src/*.v) $(wildcard compiler/coq/src/*.hs) + cd compiler/coq; make +compiler/stage1/build/CoqPass.hs: compiler/coq/build/CoqPass.hs + cp compiler/coq/build/CoqPass.hs $@ +compiler/stage2/build/CoqPass.hs: compiler/coq/build/CoqPass.hs + cp compiler/coq/build/CoqPass.hs $@