2015-05-09 10:07:24 +00:00
|
|
|
extern crate vergen;
|
2016-03-07 18:16:43 +00:00
|
|
|
|
|
|
|
#[cfg(feature = "with-syntex")]
|
|
|
|
fn codegen() {
|
2016-07-06 00:34:20 +00:00
|
|
|
extern crate protobuf_macros;
|
2016-07-06 01:29:38 +00:00
|
|
|
extern crate serde_codegen;
|
2016-07-06 00:34:20 +00:00
|
|
|
|
2016-03-07 18:16:43 +00:00
|
|
|
use std::env;
|
|
|
|
use std::path::PathBuf;
|
|
|
|
|
|
|
|
let out = PathBuf::from(env::var("OUT_DIR").unwrap());
|
|
|
|
|
2017-01-29 12:50:18 +00:00
|
|
|
serde_codegen::expand("src/lib.in.rs", &out.join("lib.tmp0.rs")).unwrap();
|
|
|
|
protobuf_macros::expand(&out.join("lib.tmp0.rs"), &out.join("lib.rs")).unwrap();
|
2016-03-07 18:16:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(not(feature = "with-syntex"))]
|
|
|
|
fn codegen() { }
|
2015-04-25 20:32:07 +00:00
|
|
|
|
|
|
|
fn main() {
|
2016-03-17 03:31:57 +00:00
|
|
|
vergen::vergen(vergen::OutputFns::all()).unwrap();
|
2016-03-07 18:16:43 +00:00
|
|
|
codegen();
|
2015-04-25 20:32:07 +00:00
|
|
|
}
|
|
|
|
|