proxmox-backup/src/buildcfg.rs

18 lines
526 B
Rust
Raw Normal View History

2019-02-16 11:28:50 +00:00
//! Exports configuration data from the build system
/// The configured configuration directory
pub const CONFIGDIR: &'static str = env!("PROXMOX_CONFIGDIR");
2019-02-16 11:28:50 +00:00
/// Prepend configuration directory to a file name
///
/// This is a simply way to get the full path for configuration files.
/// #### Example:
/// ```
/// # #[macro_use] extern crate proxmox_backup;
/// let cert_path = configdir!("/proxy.pfx");
/// ```
#[macro_export]
macro_rules! configdir {
($subdir:expr) => (concat!(env!("PROXMOX_CONFIGDIR"), $subdir))
}