diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-10-03 13:15:27 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-10-04 12:09:51 +0200 |
commit | a9149d876bd4a345a1156061f907bce0384702c8 (patch) | |
tree | 3c9843c48bae6412dc69e587ec3849dd0ccb4501 /meson.build | |
parent | build-sys: s/ENABLE_RESOLVED/ENABLE_RESOLVE/ (diff) | |
download | systemd-a9149d876bd4a345a1156061f907bce0384702c8.tar.xz systemd-a9149d876bd4a345a1156061f907bce0384702c8.zip |
meson: generate ENABLE_* names automatically
After previous changes, the naming of configuration options and internal
defines is consistent.
Diffstat (limited to '')
-rw-r--r-- | meson.build | 71 |
1 files changed, 35 insertions, 36 deletions
diff --git a/meson.build b/meson.build index ea53ebec3a..87a2859034 100644 --- a/meson.build +++ b/meson.build @@ -1036,42 +1036,41 @@ else endif conf.set10('ENABLE_REMOTE', have) -foreach pair : [['utmp', 'ENABLE_UTMP'], - ['hibernate', 'ENABLE_HIBERNATE'], - ['environment-d', 'ENABLE_ENVIRONMENT_D'], - ['binfmt', 'ENABLE_BINFMT'], - ['coredump', 'ENABLE_COREDUMP'], - ['resolve', 'ENABLE_RESOLVE'], - ['logind', 'ENABLE_LOGIND'], - ['hostnamed', 'ENABLE_HOSTNAMED'], - ['localed', 'ENABLE_LOCALED'], - ['machined', 'ENABLE_MACHINED'], - ['networkd', 'ENABLE_NETWORKD'], - ['timedated', 'ENABLE_TIMEDATED'], - ['timesyncd', 'ENABLE_TIMESYNCD'], - ['myhostname', 'ENABLE_MYHOSTNAME'], - ['firstboot', 'ENABLE_FIRSTBOOT'], - ['randomseed', 'ENABLE_RANDOMSEED'], - ['backlight', 'ENABLE_BACKLIGHT'], - ['vconsole', 'ENABLE_VCONSOLE'], - ['quotacheck', 'ENABLE_QUOTACHECK'], - ['sysusers', 'ENABLE_SYSUSERS'], - ['tmpfiles', 'ENABLE_TMPFILES'], - ['hwdb', 'ENABLE_HWDB'], - ['rfkill', 'ENABLE_RFKILL'], - ['ldconfig', 'ENABLE_LDCONFIG'], - ['efi', 'ENABLE_EFI'], - ['tpm', 'ENABLE_TPM'], - ['ima', 'ENABLE_IMA'], - ['smack', 'ENABLE_SMACK'], - ['gshadow', 'ENABLE_GSHADOW'], - ['idn', 'ENABLE_IDN'], - ['nss-systemd', 'ENABLE_NSS_SYSTEMD'], - ] - - have = get_option(pair[0]) - conf.set10(pair[1], have) - m4_defines += have ? ['-D' + pair[1]] : [] +foreach term : ['utmp', + 'hibernate', + 'environment-d', + 'binfmt', + 'coredump', + 'resolve', + 'logind', + 'hostnamed', + 'localed', + 'machined', + 'networkd', + 'timedated', + 'timesyncd', + 'myhostname', + 'firstboot', + 'randomseed', + 'backlight', + 'vconsole', + 'quotacheck', + 'sysusers', + 'tmpfiles', + 'hwdb', + 'rfkill', + 'ldconfig', + 'efi', + 'tpm', + 'ima', + 'smack', + 'gshadow', + 'idn', + 'nss-systemd'] + have = get_option(term) + name = 'ENABLE_' + term.underscorify().to_upper() + conf.set10(name, have) + m4_defines += have ? ['-D' + name] : [] endforeach want_tests = get_option('tests') |