devela/build/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// devela build
//
//! The build scripts.
//
// NOTE: use relative imports (super::*) instead of crate::*,
// so that it also works when compiling private documentation.

#![cfg_attr(feature = "nightly_doc", feature(doc_cfg, doc_notable_trait))]
#![cfg_attr(test, allow(dead_code))]

mod environment;
mod features;
mod generate;
mod utils;

fn main() {
    if let Err(err) = try_main() {
        panic!("{}", err);
    }
}

fn try_main() -> Result<(), Box<dyn core::error::Error>> {
    #[cfg(feature = "__dbg")]
    utils::println_start_end(true);

    environment::main()?;
    features::main()?;
    generate::main()?;

    #[cfg(feature = "__dbg")]
    utils::println_start_end(false);
    Ok(())
}