From 29c7945166be73aa70453d14dc2a334d16a434f2 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Wed, 19 Jan 2011 20:32:29 +0000 Subject: [PATCH] Move the PACKAGE_MAGIC evaluation inside package-data.mk --- rules/build-package.mk | 4 ---- utils/ghc-cabal/Main.hs | 9 +++++++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/rules/build-package.mk b/rules/build-package.mk index 9e2bae3..ab73ebe 100644 --- a/rules/build-package.mk +++ b/rules/build-package.mk @@ -125,10 +125,6 @@ endif ifeq "$$(phase_$$($1_$2_CONFIGURE_PHASE)_done)" "YES" -# Sometimes we need to modify the automatically-generated package-data.mk -# bindings in a special way for the GHC build system, so allow that here: -$($1_PACKAGE_MAGIC) - # Bootstrapping libs are only built one way ifeq "$3" "0" $1_$2_WAYS = v diff --git a/utils/ghc-cabal/Main.hs b/utils/ghc-cabal/Main.hs index 9cb9928..f189e07 100644 --- a/utils/ghc-cabal/Main.hs +++ b/utils/ghc-cabal/Main.hs @@ -376,9 +376,14 @@ generate config_args distdir directory variablePrefix ++ "_DEP_LIB_DIRS = " ++ unwords (wrap $ forDeps Installed.libraryDirs), variablePrefix ++ "_DEP_EXTRA_LIBS = " ++ unwords (forDeps Installed.extraLibraries), variablePrefix ++ "_DEP_LD_OPTS = " ++ unwords (forDeps Installed.ldOptions), - variablePrefix ++ "_BUILD_GHCI_LIB = " ++ boolToYesNo (withGHCiLib lbi)] + variablePrefix ++ "_BUILD_GHCI_LIB = " ++ boolToYesNo (withGHCiLib lbi), + "", + -- Sometimes we need to modify the automatically-generated package-data.mk + -- bindings in a special way for the GHC build system, so allow that here: + "$(eval $(" ++ directory ++ "_PACKAGE_MAGIC))", + ] writeFile (distdir ++ "/package-data.mk") $ unlines xs - writeFile (distdir ++ "/haddock-prologue.txt") $ + writeFile (distdir ++ "/haddock-prologue.txt") $ if null (description pd) then synopsis pd else description pd where -- 1.7.10.4