Merge branch 'master' of http://darcs.haskell.org/ghc
[ghc-hetmet.git] / ghc.mk
diff --git a/ghc.mk b/ghc.mk
index b00d925..3d3c3a6 100644 (file)
--- a/ghc.mk
+++ b/ghc.mk
@@ -1211,3 +1211,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/hetmet/Makefile:
+       git submodule update --init compiler/hetmet
+       cd compiler/hetmet/; git checkout master
+compiler/hetmet/build/CoqPass.hs: compiler/hetmet/Makefile $(wildcard compiler/hetmet/src/*.v) $(wildcard compiler/hetmet/src/*.hs)
+       cd compiler/hetmet; make build/CoqPass.hs
+compiler/stage1/build/CoqPass.hs: compiler/hetmet/build/CoqPass.hs
+       cp compiler/hetmet/build/CoqPass.hs $@
+compiler/stage2/build/CoqPass.hs: compiler/hetmet/build/CoqPass.hs
+       cp compiler/hetmet/build/CoqPass.hs $@