opgpcard: Add rudimentary logging to build.rs

This commit is contained in:
Nora Widdecke 2022-10-27 11:53:45 +02:00
parent 46b5f59d0f
commit f0d6d4b1d2
No known key found for this signature in database
GPG key ID: 2D4111B31DBB99B6

View file

@ -13,10 +13,12 @@ fn main() {
if flagfile.exists() {
subplot_build::codegen("subplot/opgpcard.subplot")
.expect("failed to generate code with Subplot");
println!("cargo:warning=generating subplot tests");
} else {
// If we're not generating code from the subplot, we should at
// least create an empty file so that the tests/opgpcard.rs
// file can include it. Otherwise the build will fail.
println!("cargo:warning=flagfile not found");
let out_dir = std::env::var("OUT_DIR").unwrap();
let include = Path::new(&out_dir).join("opgpcard.rs");
eprintln!("build.rs: include={}", include.display());