[project @ 2004-11-09 16:59:31 by simonmar]
[ghc-hetmet.git] / ghc / utils / genprimopcode / Makefile
index 3d9dbcd..2b1ecd9 100644 (file)
@@ -1,13 +1,21 @@
-# -----------------------------------------------------------------------------
-# $Id: Makefile,v 1.4 2000/12/30 20:42:03 panne Exp $
-
 TOP=../..
 include $(TOP)/mk/boilerplate.mk
 
-HS_PROG        = genprimopcode
-SRC_HC_OPTS   += -syslib text
+HS_PROG = genprimopcode
+
+ghc_lt_504 = $(shell if (test $(GhcCanonVersion) -lt 504); then echo YES; else echo NO; fi)
+ifeq "$(ghc_lt_504)" "YES"
+SRC_HC_OPTS += -package text
+endif
+
+ghc_ge_601 = $(shell if (test $(GhcCanonVersion) -ge 601); then echo YES; else echo NO; fi)
+ifeq "$(ghc_ge_601)" "YES"
+SRC_HC_OPTS += -package parsec
+endif
 
 # genprimopcode is needed to boot in ghc/compiler...
+ifneq "$(BootingFromHc)" "YES"
 boot :: all
+endif
 
 include $(TOP)/mk/target.mk