[commit: ghc] master: Move ghc-pkg's generated Version.hs inside the dist directories (0c4ed55)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/0c4ed554091e85ac210267d9064727484df795fe

>---------------------------------------------------------------

commit 0c4ed554091e85ac210267d9064727484df795fe
Author: Ian Lynagh <[email protected]>
Date:   Mon Oct 29 00:19:48 2012 +0000

    Move ghc-pkg's generated Version.hs inside the dist directories

>---------------------------------------------------------------

 .gitignore           |    1 -
 utils/ghc-pkg/ghc.mk |   15 +++++++++------
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/.gitignore b/.gitignore
index af4b4c7..4a87ef9 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 68c63e2..a3c311c 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.