-# 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) mk/config.mk
- "$(MKDIRHIER)" $(dir $@)
- echo "import System.Environment; import System.Cmd; import System.Exit" >$@
- echo "main :: IO ()" >>$@
- echo "main = do args <- getArgs; if args == [\"--numeric-version\"] then putStrLn \"$(ProjectVersion)\" else do e <- rawSystem \"$(GHC_STAGE0)\" args; exitWith e" >>$@
+$(GHC_CABAL_DIR)_USES_CABAL = YES
+$(GHC_CABAL_DIR)_PACKAGE = ghc-cabal
+$(GHC_CABAL_DIR)_dist-install_PROG = ghc-cabal$(exeext)
+$(GHC_CABAL_DIR)_dist-install_INSTALL_INPLACE = NO
+$(GHC_CABAL_DIR)_dist-install_MODULES = Main