introduce buildcfg module and PROXMOX_CONFIGDIR

buildcfg.rs should contain convenience variables or macros
for using build-time configured variables

For now we replace hardcoded "/etc/proxmox-backup/<foo>"
with configdir!("<foo>").

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller
2019-02-04 15:13:03 +01:00
parent 0d176f3681
commit 9f4962d396
5 changed files with 16 additions and 5 deletions

6
src/buildcfg.rs Normal file
View File

@ -0,0 +1,6 @@
pub const CONFIGDIR: &'static str = env!("PROXMOX_CONFIGDIR");
#[macro_export]
macro_rules! configdir {
($subdir:expr) => (concat!(env!("PROXMOX_CONFIGDIR"), $subdir))
}