summaryrefslogtreecommitdiff
path: root/utils/genapply
diff options
context:
space:
mode:
Diffstat (limited to 'utils/genapply')
-rw-r--r--utils/genapply/Makefile32
-rw-r--r--utils/genapply/ghc.mk16
2 files changed, 19 insertions, 29 deletions
diff --git a/utils/genapply/Makefile b/utils/genapply/Makefile
index 186eb0e034..06c44cf2a8 100644
--- a/utils/genapply/Makefile
+++ b/utils/genapply/Makefile
@@ -1,29 +1,3 @@
-TOP=../..
-include $(TOP)/mk/boilerplate.mk
-
-HS_PROG = $(GHC_GENAPPLY_PGM)
-
-# genapply is needed to boot in rts/...
-ifneq "$(BootingFromHc)" "YES"
-boot :: all
-endif
-
-ifeq "$(GhcUnregisterised)" "YES"
-SRC_HC_OPTS += -DNO_REGS
-endif
-
-ifeq "$(ghc_ge_607)" "YES"
-SRC_HC_OPTS += -package pretty
-endif
-
-# Try to get dependencies right...
-SRC_HC_OPTS += -fforce-recomp
-
-GenApply.o : $(GHC_INCLUDE_DIR)/ghcconfig.h
-GenApply.o : $(GHC_INCLUDE_DIR)/MachRegs.h
-GenApply.o : $(GHC_INCLUDE_DIR)/Constants.h
-
-binary-dist:
- @:
-
-include $(TOP)/mk/target.mk
+dir = utils/genapply
+TOP = ../..
+include $(TOP)/mk/sub-makefile.mk
diff --git a/utils/genapply/ghc.mk b/utils/genapply/ghc.mk
new file mode 100644
index 0000000000..94fb45639c
--- /dev/null
+++ b/utils/genapply/ghc.mk
@@ -0,0 +1,16 @@
+utils/genapply_dist_MODULES = GenApply
+utils/genapply_dist_PROG = $(GHC_GENAPPLY_PGM)
+
+ifeq "$(ghc_ge_607)" "YES"
+utils/genapply_HC_OPTS += -package pretty
+endif
+
+ifeq "$(GhcUnregisterised)" "YES"
+utils/genapply_HC_OPTS += -DNO_REGS
+endif
+
+utils/genapply/GenApply.hs : $(GHC_INCLUDE_DIR)/ghcconfig.h
+utils/genapply/GenApply.hs : $(GHC_INCLUDE_DIR)/MachRegs.h
+utils/genapply/GenApply.hs : $(GHC_INCLUDE_DIR)/Constants.h
+
+$(eval $(call build-prog,utils/genapply,dist,0))