about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-01-27 14:48:48 -0800
committerAlex Crichton <alex@alexcrichton.com>2017-02-06 08:44:27 -0800
commit9ad13c8d0204fb7cd9a3988a5a73f60efce39481 (patch)
tree87e1af1e14827aeee467d4ca9076603f89554e30 /src/bootstrap
parentffd3070cc9ea6d845865f11d70c220da40720d7e (diff)
downloadrust-9ad13c8d0204fb7cd9a3988a5a73f60efce39481.tar.gz
rust-9ad13c8d0204fb7cd9a3988a5a73f60efce39481.zip
rustbuild: Fix a few locations with makefiles gone
* Add version info to channel.rs as main.mk is no longer available
* Update `Makefile.in` used with bootstrap to not try to require `mk/util.mk`
* Update the `dist` target to avoid the makefile pieces
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/channel.rs40
-rw-r--r--src/bootstrap/dist.rs2
-rw-r--r--src/bootstrap/mk/Makefile.in3
3 files changed, 17 insertions, 28 deletions
diff --git a/src/bootstrap/channel.rs b/src/bootstrap/channel.rs
index 585d9f51b92..81e745bc76c 100644
--- a/src/bootstrap/channel.rs
+++ b/src/bootstrap/channel.rs
@@ -15,55 +15,45 @@
 //! `package_vers`, and otherwise indicating to the compiler what it should
 //! print out as part of its version information.
 
-use std::fs::File;
-use std::io::prelude::*;
 use std::process::Command;
 
 use build_helper::output;
 
 use Build;
 
-pub fn collect(build: &mut Build) {
-    // Currently the canonical source for the release number (e.g. 1.10.0) and
-    // the prerelease version (e.g. `.1`) is in `mk/main.mk`. We "parse" that
-    // here to learn about those numbers.
-    let mut main_mk = String::new();
-    t!(t!(File::open(build.src.join("mk/main.mk"))).read_to_string(&mut main_mk));
-    let mut release_num = "";
-    let mut prerelease_version = "";
-    for line in main_mk.lines() {
-        if line.starts_with("CFG_RELEASE_NUM") {
-            release_num = line.split('=').skip(1).next().unwrap().trim();
-        }
-        if line.starts_with("CFG_PRERELEASE_VERSION") {
-            prerelease_version = line.split('=').skip(1).next().unwrap().trim();
-        }
-    }
+// The version number
+const CFG_RELEASE_NUM: &'static str = "1.17.0";
+
+// An optional number to put after the label, e.g. '.2' -> '-beta.2'
+// Be sure to make this starts with a dot to conform to semver pre-release
+// versions (section 9)
+const CFG_PRERELEASE_VERSION: &'static str = ".1";
 
-    build.release_num = release_num.to_string();
-    build.prerelease_version = release_num.to_string();
+pub fn collect(build: &mut Build) {
+    build.release_num = CFG_RELEASE_NUM.to_string();
+    build.prerelease_version = CFG_RELEASE_NUM.to_string();
 
     // Depending on the channel, passed in `./configure --release-channel`,
     // determine various properties of the build.
     match &build.config.channel[..] {
         "stable" => {
-            build.release = release_num.to_string();
+            build.release = CFG_RELEASE_NUM.to_string();
             build.package_vers = build.release.clone();
             build.unstable_features = false;
         }
         "beta" => {
-            build.release = format!("{}-beta{}", release_num,
-                                   prerelease_version);
+            build.release = format!("{}-beta{}", CFG_RELEASE_NUM,
+                                   CFG_PRERELEASE_VERSION);
             build.package_vers = "beta".to_string();
             build.unstable_features = false;
         }
         "nightly" => {
-            build.release = format!("{}-nightly", release_num);
+            build.release = format!("{}-nightly", CFG_RELEASE_NUM);
             build.package_vers = "nightly".to_string();
             build.unstable_features = true;
         }
         _ => {
-            build.release = format!("{}-dev", release_num);
+            build.release = format!("{}-dev", CFG_RELEASE_NUM);
             build.package_vers = build.release.clone();
             build.unstable_features = true;
         }
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index 9327cc0cf7f..1c3901bf2a1 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -381,13 +381,11 @@ pub fn rust_src(build: &Build) {
         "README.md",
         "RELEASES.md",
         "configure",
-        "Makefile.in",
         "x.py",
     ];
     let src_dirs = [
         "man",
         "src",
-        "mk"
     ];
 
     let filter_fn = move |path: &Path| {
diff --git a/src/bootstrap/mk/Makefile.in b/src/bootstrap/mk/Makefile.in
index d6f6a7772c9..536095503e0 100644
--- a/src/bootstrap/mk/Makefile.in
+++ b/src/bootstrap/mk/Makefile.in
@@ -9,11 +9,12 @@
 # except according to those terms.
 
 include config.mk
-include $(CFG_SRC_DIR)mk/util.mk
 
 ifdef VERBOSE
+Q :=
 BOOTSTRAP_ARGS := -v
 else
+Q := @
 BOOTSTRAP_ARGS :=
 endif