X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fghc.mk;h=901b0695997a01dd80c881ccf44ca455bd35c202;hp=abc3788705f4ae3066e8bcfb4f6dfd9c42155164;hb=3ddb6bb4edf70b2456d789f34d3f56541818a696;hpb=aea784af873f089a40af71849d83f59008562a58 diff --git a/compiler/ghc.mk b/compiler/ghc.mk index abc3788..901b069 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,15 @@ 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 +ifneq "$(CLEANING)" "YES" +ifeq "$(shell [ $(ProjectPatchLevel) -gt 20000000 ] && echo YES)" "YES" +compiler_stage1_VERSION_MUNGED = YES +endif +endif +ifeq "$(compiler_stage1_VERSION_MUNGED)" "YES" define compiler_PACKAGE_MAGIC compiler_stage1_VERSION = $(subst .$(ProjectPatchLevel),,$(ProjectVersion)) endef @@ -481,7 +490,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/' \