aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorsimonmar <unknown>2004-08-31 13:09:42 +0000
committersimonmar <unknown>2004-08-31 13:09:42 +0000
commitb3fbc8674b3fe6769580ee26fa2d5812889e463a (patch)
treeb653fc55ae98df7fc9fb093f77f1031ea9cc58e4 /src/Makefile
parente6982912efacef7a78bc2dc98607622a81566a3f (diff)
[haddock @ 2004-08-31 13:09:42 by simonmar]
Avoid GHC/shell versionitis and create Version.hs
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/Makefile b/src/Makefile
index b4997738..b25f1ff0 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -5,7 +5,6 @@ INSTALLING=1
ghc_ge_504 := $(shell if (test $(GhcCanonVersion) -ge 504); then echo YES; else echo NO; fi)
ghc_ge_603 := $(shell if (test $(GhcCanonVersion) -ge 603); then echo YES; else echo NO; fi)
-ghc_le_600 := $(shell if (test $(GhcCanonVersion) -le 600); then echo YES; else echo NO; fi)
SRC_HC_OPTS += -fglasgow-exts -cpp
@@ -35,15 +34,21 @@ endif
HsParser_HC_OPTS += -Onot
HaddockParse_HC_OPTS += -Onot
-# <= 6.0.x (double-)quotes all arguments when invoking utils, hence
-# the need to escape the string quotes here. >= 6.2.x does add a
-# layer of quoting.
-ifeq "$(ghc_le_600)" "YES"
-HaddockVersion_HC_OPTS = -D'HADDOCK_VERSION=\"$(ProjectVersion)\"'
-else
-HaddockVersion_HC_OPTS = -D'HADDOCK_VERSION="$(ProjectVersion)"'
-endif
-HaddockVersion : ../mk/version.mk
+# -----------------------------------------------------------------------------
+# 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)
+
+# -----------------------------------------------------------------------------
ifeq "$(INSTALLING)" "1"
ifeq "$(BIN_DIST)" "1"