summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-10-29 00:19:48 +0000
committerIan Lynagh <ian@well-typed.com>2012-10-29 00:19:48 +0000
commit0c4ed554091e85ac210267d9064727484df795fe (patch)
tree46ede504c6b91fd6741e7be1bd9db53af24bdb74
parentd24ffd62de3301311dccd2f9e0e49b87e2c58ab4 (diff)
downloadhaskell-0c4ed554091e85ac210267d9064727484df795fe.tar.gz
Move ghc-pkg's generated Version.hs inside the dist directories
-rw-r--r--.gitignore1
-rw-r--r--utils/ghc-pkg/ghc.mk15
2 files changed, 9 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index af4b4c77b4..4a87ef9cd4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -190,7 +190,6 @@ _darcs/
/utils/ext-core/Driver
/utils/ext-core/PrimEnv.hs
/utils/genapply/genapply
-/utils/ghc-pkg/Version.hs
/utils/ghc-pwd/dist-boot/ghc-pwd
/utils/runghc/runghc.cabal
diff --git a/utils/ghc-pkg/ghc.mk b/utils/ghc-pkg/ghc.mk
index 68c63e2a1f..a3c311cba9 100644
--- a/utils/ghc-pkg/ghc.mk
+++ b/utils/ghc-pkg/ghc.mk
@@ -51,7 +51,7 @@ endif
#
# ToDo: we might want to do this using ghc-cabal instead.
#
-utils/ghc-pkg/dist/build/tmp/$(utils/ghc-pkg_dist_PROG)$(exeext): utils/ghc-pkg/Main.hs utils/ghc-pkg/Version.hs | bootstrapping/. $$(dir $$@)/. $(GHC_CABAL_INPLACE)
+utils/ghc-pkg/dist/build/tmp/$(utils/ghc-pkg_dist_PROG)$(exeext): utils/ghc-pkg/Main.hs utils/ghc-pkg/dist/build/Version.hs | bootstrapping/. $$(dir $$@)/. $(GHC_CABAL_INPLACE)
"$(GHC)" $(SRC_HC_OPTS) --make utils/ghc-pkg/Main.hs -o $@ \
-no-user-$(GHC_PACKAGE_DB_FLAG) \
-Wall -fno-warn-unused-imports -fno-warn-warnings-deprecations \
@@ -60,8 +60,9 @@ utils/ghc-pkg/dist/build/tmp/$(utils/ghc-pkg_dist_PROG)$(exeext): utils/ghc-pkg/
-DBOOTSTRAPPING \
-odir bootstrapping \
-hidir bootstrapping \
- -iutils/ghc-pkg \
+ -iutils/ghc-pkg \
-XCPP -XExistentialQuantification -XDeriveDataTypeable \
+ -iutils/ghc-pkg/dist/build \
-ilibraries/Cabal/Cabal \
-ilibraries/filepath \
-ilibraries/hpc \
@@ -69,7 +70,8 @@ utils/ghc-pkg/dist/build/tmp/$(utils/ghc-pkg_dist_PROG)$(exeext): utils/ghc-pkg/
-ilibraries/bin-package-db
-utils/ghc-pkg/Version.hs: mk/project.mk
+utils/ghc-pkg/dist/build/Version.hs \
+utils/ghc-pkg/dist-install/build/Version.hs: mk/project.mk $$(dir $$@)/.
$(call removeFiles,$@)
echo "module Version where" >> $@
echo "version, targetOS, targetARCH :: String" >> $@
@@ -77,9 +79,7 @@ utils/ghc-pkg/Version.hs: mk/project.mk
echo "targetOS = \"$(TargetOS_CPP)\"" >> $@
echo "targetARCH = \"$(TargetArch_CPP)\"" >> $@
-$(eval $(call clean-target,utils/ghc-pkg,dist,\
- utils/ghc-pkg/dist \
- utils/ghc-pkg/Version.hs))
+$(eval $(call clean-target,utils/ghc-pkg,dist,utils/ghc-pkg/dist))
# -----------------------------------------------------------------------------
# Cross-compile case: Install our dist version
@@ -110,6 +110,9 @@ else
$(eval $(call build-prog,utils/ghc-pkg,dist-install,1))
endif
+utils/ghc-pkg/dist-install/package-data.mk: \
+ utils/ghc-pkg/dist-install/build/Version.hs
+
ifeq "$(Windows)" "NO"
install: install_utils/ghc-pkg_link