forked from M-Labs/artiq
1
0
Fork 0

firmware: simplify ksupport build script.

This commit is contained in:
whitequark 2017-01-24 22:33:09 +00:00
parent b29e2d5bfe
commit 209be73204
3 changed files with 6 additions and 13 deletions

View File

@ -52,6 +52,7 @@ version = "0.0.0"
dependencies = [
"alloc_none 0.0.0",
"board 0.0.0",
"build_artiq 0.0.0",
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"std_artiq 0.0.0",
]

View File

@ -9,6 +9,9 @@ name = "ksupport"
path = "lib.rs"
crate-type = ["staticlib"]
[build-dependencies]
build_artiq = { path = "../libbuild_artiq" }
[dependencies]
alloc_none = { path = "../liballoc_none" }
std_artiq = { path = "../libstd_artiq" }

View File

@ -1,17 +1,6 @@
use std::env;
use std::path::Path;
use std::io::{BufRead, BufReader};
use std::fs::File;
extern crate build_artiq;
fn main() {
let out_dir = env::var("BUILDINC_DIRECTORY").unwrap();
let cfg_path = Path::new(&out_dir).join("generated").join("rust-cfg");
println!("cargo:rerun-if-changed={}", cfg_path.to_str().unwrap());
let f = BufReader::new(File::open(&cfg_path).unwrap());
for line in f.lines() {
println!("cargo:rustc-cfg={}", line.unwrap());
}
build_artiq::misoc_registers();
println!("cargo:rustc-cfg={}", "ksupport");
}