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 = [ dependencies = [
"alloc_none 0.0.0", "alloc_none 0.0.0",
"board 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)", "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"std_artiq 0.0.0", "std_artiq 0.0.0",
] ]

View File

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

View File

@ -1,17 +1,6 @@
use std::env; extern crate build_artiq;
use std::path::Path;
use std::io::{BufRead, BufReader};
use std::fs::File;
fn main() { fn main() {
let out_dir = env::var("BUILDINC_DIRECTORY").unwrap(); build_artiq::misoc_registers();
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());
}
println!("cargo:rustc-cfg={}", "ksupport"); println!("cargo:rustc-cfg={}", "ksupport");
} }