From: Ian Lynagh Date: Sun, 24 May 2009 13:34:39 +0000 (+0000) Subject: Be more precise about munging compiler/stage1/inplace-pkg-config X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=e0e0e1e04c990d3233a2b20ad6be0d4794e19b29 Be more precise about munging compiler/stage1/inplace-pkg-config We were removing ".$(ProjectPatchLevel)" from anywhere in the file. However, it included absolute paths, so if you untar a source tarball into its default directory name, e.g. "6.11.$(ProjectPatchLevel)", then the sed would break the paths. --- diff --git a/compiler/ghc.mk b/compiler/ghc.mk index 8ecfa7d..8a34723 100644 --- a/compiler/ghc.mk +++ b/compiler/ghc.mk @@ -463,7 +463,9 @@ $(compiler_stage3_depfile) : $(includes_H_CONFIG) $(includes_H_PLATFORM) $(inclu # [fiddle-stage1-version] above. ifneq "$(ProjectPatchLevel)" "0" compiler/stage1/inplace-pkg-config-munged: compiler/stage1/inplace-pkg-config - sed "s#.$(ProjectPatchLevel)##" <$< >$@ + sed -e 's/^\(version: .*\)\.$(ProjectPatchLevel)$$/\1/' \ + -e 's/^\(hs-libraries: HSghc-.*\)\.$(ProjectPatchLevel)$$/\1/' \ + < $< > $@ $(compiler_stage1_GHC_PKG) update --force $(compiler_stage1_GHC_PKG_OPTS) $@ $(compiler_stage1_v_LIB) : compiler/stage1/inplace-pkg-config-munged