X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghc.mk;h=c237df7a5c30143ad0d017044fcd6515bc975ad5;hb=3a60f713e57c22c7357bec66bfcee6e8ddffee9a;hp=abc3788705f4ae3066e8bcfb4f6dfd9c42155164;hpb=aea784af873f089a40af71849d83f59008562a58;p=ghc-hetmet.git diff --git a/compiler/ghc.mk b/compiler/ghc.mk index abc3788..c237df7 100644 --- a/compiler/ghc.mk +++ b/compiler/ghc.mk @@ -35,6 +35,8 @@ compiler_stage1_MKDEPENDC_OPTS = -DMAKING_GHC_BUILD_SYSTEM_DEPENDENCIES compiler_stage2_MKDEPENDC_OPTS = -DMAKING_GHC_BUILD_SYSTEM_DEPENDENCIES compiler_stage3_MKDEPENDC_OPTS = -DMAKING_GHC_BUILD_SYSTEM_DEPENDENCIES +compiler_stage1_C_FILES_NODEPS = compiler/parser/cutils.c + ifneq "$(BINDIST)" "YES" compiler/stage1/package-data.mk : $(compiler_CONFIG_HS) compiler/stage2/package-data.mk : $(compiler_CONFIG_HS) @@ -419,8 +421,13 @@ compiler_PACKAGE = ghc # Note: we also have to tweak the version number of the package itself # when it gets registered; see Note [munge-stage1-package-config] # below. -ifneq "$(ProjectPatchLevel)" "0" +# The ProjectPatchLevel > 20000000 iff it's a date. If it's e.g. 6.12.1 +# then we don't want to remove it +ifeq "$(shell [ $(ProjectPatchLevel) -gt 20000000 ] && echo YES)" "YES" +compiler_stage1_VERSION_MUNGED = YES +endif +ifeq "$(compiler_stage1_VERSION_MUNGED)" "YES" define compiler_PACKAGE_MAGIC compiler_stage1_VERSION = $(subst .$(ProjectPatchLevel),,$(ProjectVersion)) endef @@ -481,7 +488,7 @@ compiler/main/Constants_HC_OPTS += -fforce-recomp # Note [munge-stage1-package-config] # Strip the date/patchlevel from the version of stage1. See Note # [fiddle-stage1-version] above. -ifneq "$(ProjectPatchLevel)" "0" +ifeq "$(compiler_stage1_VERSION_MUNGED)" "YES" compiler/stage1/inplace-pkg-config-munged: compiler/stage1/inplace-pkg-config sed -e 's/^\(version: .*\)\.$(ProjectPatchLevel)$$/\1/' \ -e 's/^\(id: .*\)\.$(ProjectPatchLevel)$$/\1/' \