From 65fb7be72820f9be7ee7bb8e626e1d0fbb03968d Mon Sep 17 00:00:00 2001 From: Ximin Luo Date: Thu, 14 Jul 2016 17:13:13 +0200 Subject: [PATCH] mk: Move some definitions after their dependencies, to be visually less confusing --- mk/main.mk | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/mk/main.mk b/mk/main.mk index 4c72597f0c5..e446b64a6f5 100644 --- a/mk/main.mk +++ b/mk/main.mk @@ -20,29 +20,6 @@ CFG_RELEASE_NUM=1.12.0 # versions (section 9) CFG_PRERELEASE_VERSION=.1 -# Append a version-dependent hash to each library, so we can install different -# versions in the same place -CFG_FILENAME_EXTRA=$(shell printf '%s' $(CFG_RELEASE)$(CFG_EXTRA_FILENAME) | $(CFG_HASH_COMMAND)) - -# A magic value that allows the compiler to use unstable features during the -# bootstrap even when doing so would normally be an error because of feature -# staging or because the build turns on warnings-as-errors and unstable features -# default to warnings. The build has to match this key in an env var. -# -# This value is keyed off the release to ensure that all compilers for one -# particular release have the same bootstrap key. Note that this is -# intentionally not "secure" by any definition, this is largely just a deterrent -# from users enabling unstable features on the stable compiler. -CFG_BOOTSTRAP_KEY=$(CFG_FILENAME_EXTRA) - -# The stage0 compiler needs to use the previous key recorded in src/stage0.txt, -# except for local-rebuild when it just uses the same current key. -ifdef CFG_ENABLE_LOCAL_REBUILD -CFG_BOOTSTRAP_KEY_STAGE0=$(CFG_BOOTSTRAP_KEY) -else -CFG_BOOTSTRAP_KEY_STAGE0=$(shell grep 'rustc_key' $(S)src/stage0.txt | sed 's/rustc_key: '//) -endif - ifeq ($(CFG_RELEASE_CHANNEL),stable) # This is the normal semver version string, e.g. "0.12.0", "0.12.0-nightly" CFG_RELEASE=$(CFG_RELEASE_NUM) @@ -72,6 +49,29 @@ CFG_RELEASE=$(CFG_RELEASE_NUM)-dev CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-dev endif +# Append a version-dependent hash to each library, so we can install different +# versions in the same place +CFG_FILENAME_EXTRA=$(shell printf '%s' $(CFG_RELEASE)$(CFG_EXTRA_FILENAME) | $(CFG_HASH_COMMAND)) + +# A magic value that allows the compiler to use unstable features during the +# bootstrap even when doing so would normally be an error because of feature +# staging or because the build turns on warnings-as-errors and unstable features +# default to warnings. The build has to match this key in an env var. +# +# This value is keyed off the release to ensure that all compilers for one +# particular release have the same bootstrap key. Note that this is +# intentionally not "secure" by any definition, this is largely just a deterrent +# from users enabling unstable features on the stable compiler. +CFG_BOOTSTRAP_KEY=$(CFG_FILENAME_EXTRA) + +# The stage0 compiler needs to use the previous key recorded in src/stage0.txt, +# except for local-rebuild when it just uses the same current key. +ifdef CFG_ENABLE_LOCAL_REBUILD +CFG_BOOTSTRAP_KEY_STAGE0=$(CFG_BOOTSTRAP_KEY) +else +CFG_BOOTSTRAP_KEY_STAGE0=$(shell grep 'rustc_key' $(S)src/stage0.txt | sed 's/rustc_key: '//) +endif + # The name of the package to use for creating tarballs, installers etc. CFG_PACKAGE_NAME=rustc-$(CFG_PACKAGE_VERS)