X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Futils%2Fghc-pkg%2FMakefile;h=528088712998fef4ced1b6ad99c3464e6abb01da;hb=61ccfec175e1f51b2c89559faf91d9bee0b3b601;hp=1cad68944bbaf92746cf01c0d0c2edc3d8fa73ee;hpb=4d65dec814743bb685ea590503bb54dd5b18023b;p=ghc-hetmet.git diff --git a/ghc/utils/ghc-pkg/Makefile b/ghc/utils/ghc-pkg/Makefile index 1cad689..5280887 100644 --- a/ghc/utils/ghc-pkg/Makefile +++ b/ghc/utils/ghc-pkg/Makefile @@ -1,5 +1,4 @@ # ----------------------------------------------------------------------------- -# $Id: Makefile,v 1.22 2003/06/04 15:18:29 panne Exp $ TOP=../.. include $(TOP)/mk/boilerplate.mk @@ -10,10 +9,10 @@ INSTALLING=1 # ----------------------------------------------------------------------------- # ghc-pkg.bin -SRC_HC_OPTS += -cpp -DPKG_TOOL -DWANT_PRETTY - ghc_ge_504 = $(shell if (test $(GhcCanonVersion) -ge 504); then echo YES; else echo NO; fi) +SRC_HC_OPTS += -cpp -DPKG_TOOL -DWANT_PRETTY + ifeq "$(ghc_ge_504)" "NO" SRC_HC_OPTS += -package lang -package util -package text endif @@ -30,6 +29,20 @@ HS_PROG = ghc-pkg.bin INSTALL_LIBEXECS += $(HS_PROG) endif +# -----------------------------------------------------------------------------= +# Create the Version.hs file + +VERSION_HS = Version.hs +EXTRA_SRCS += $(VERSION_HS) + +boot :: $(VERSION_HS) + +Version.hs : $(TOP)/mk/version.mk + @$(RM) -f $(VERSION_HS) + @echo "Creating $(VERSION_HS) ... " + @echo "module Version where" >>$(VERSION_HS) + @echo "version = \"$(ProjectVersion)\"" >> $(VERSION_HS) + # ----------------------------------------------------------------------------- # ghc-pkg script