Store all macros in a separate module
This commit is contained in:
parent
428fcf697a
commit
db2208a33a
2 changed files with 6 additions and 6 deletions
|
@ -2,12 +2,6 @@ use crate::cnf::PKG_NAME;
|
|||
use crate::cnf::PKG_VERS;
|
||||
use crate::err::Error;
|
||||
|
||||
macro_rules! get_cfg {
|
||||
($i:ident : $($s:expr),+) => (
|
||||
let $i = || { $( if cfg!($i=$s) { return $s; } );+ "unknown"};
|
||||
)
|
||||
}
|
||||
|
||||
pub fn init(_: &clap::ArgMatches) -> Result<(), Error> {
|
||||
get_cfg!(target_os: "windows", "macos", "ios", "linux", "android", "freebsd", "openbsd", "netbsd");
|
||||
get_cfg!(target_arch: "x86", "x86_64", "mips", "powerpc", "powerpc64", "arm", "aarch64");
|
||||
|
|
|
@ -13,3 +13,9 @@ macro_rules! mrg {
|
|||
$($m)+
|
||||
}};
|
||||
}
|
||||
|
||||
macro_rules! get_cfg {
|
||||
($i:ident : $($s:expr),+) => (
|
||||
let $i = || { $( if cfg!($i=$s) { return $s; } );+ "unknown"};
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue