dummy-ghc should depend on config.mk, to pick up the latest version number
authorSimon Marlow <marlowsd@gmail.com>
Wed, 13 May 2009 14:44:44 +0000 (14:44 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Wed, 13 May 2009 14:44:44 +0000 (14:44 +0000)
This fixes build problems of the form
  ghc-cabal: Version mismatch between ghc and ghc-pkg

utils/ghc-cabal/ghc.mk

index 6c6e649..4ffab8b 100644 (file)
@@ -53,7 +53,8 @@ $(eval $(call all-target,$(GHC_CABAL_DIR),$(GHC_CABAL_INPLACE)))
 $(GHC_CABAL_DIR)_dist-dummy-ghc_MODULES = dummy-ghc
 $(GHC_CABAL_DIR)_dist-dummy-ghc_PROG    = dummy-ghc$(exeext)
 
-$(GHC_CABAL_DIR)/dist-dummy-ghc/build/dummy-ghc.hs : $(GHC_CABAL_DIR)/ghc.mk $(MKDIRHIER)
+# depend on config.mk, so we pick up the new version number if it changes.
+$(GHC_CABAL_DIR)/dist-dummy-ghc/build/dummy-ghc.hs : $(GHC_CABAL_DIR)/ghc.mk $(MKDIRHIER) $(TOP)/mk/config.mk
        $(MKDIRHIER) $(dir $@)
        echo "import System.Environment; import System.Cmd; import System.Exit" >$@
        echo "main = do args <- getArgs; if args == [\"--numeric-version\"] then putStrLn \"$(ProjectVersion)\" else do e <- rawSystem \"$(GHC_STAGE0)\" args; exitWith e" >>$@