diff options
author | Eric Blake <eblake@redhat.com> | 2013-09-03 20:39:16 -0600 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2013-09-04 09:40:20 -0600 |
commit | 58b82e0d5724146105ee52f41e46b356bf0298a7 (patch) | |
tree | 57009ccd13ff9e9abf931422be6ac88edc42ea66 /libvirt-lxc-override.c | |
parent | ed0a51292d0a8283453a4638e3672347ed6d2dc9 (diff) | |
download | libvirt-python-split-58b82e0d5724146105ee52f41e46b356bf0298a7.tar.gz libvirt-python-split-58b82e0d5724146105ee52f41e46b356bf0298a7.tar.xz libvirt-python-split-58b82e0d5724146105ee52f41e46b356bf0298a7.zip |
build: enforce makefile conditional style
Automake has builtin support to prevent botched conditional nesting,
but only if you use:
if FOO
else !FOO
endif !FOO
An example error message when using the wrong name:
daemon/Makefile.am:378: error: else reminder (LIBVIRT_INIT_SCRIPT_SYSTEMD_TRUE) incompatible with current conditional: LIBVIRT_INIT_SCRIPT_SYSTEMD_FALSE
daemon/Makefile.am:381: error: endif reminder (LIBVIRT_INIT_SCRIPT_SYSTEMD_TRUE) incompatible with current conditional: LIBVIRT_INIT_SCRIPT_SYSTEMD_FALSE
As our makefiles tend to have quite a bit of nested conditionals,
it's better to take advantage of the benefits of the build system
double-checking that our conditionals are well-nested, but that
requires a syntax check to enforce our usage style.
Alas, unlike C preprocessor and spec files, we can't use indentation
to make it easier to see how deeply nesting goes.
* cfg.mk (sc_makefile_conditionals): New rule.
* daemon/Makefile.am: Enforce the style.
* gnulib/tests/Makefile.am: Likewise.
* python/Makefile.am: Likewise.
* src/Makefile.am: Likewise.
* tests/Makefile.am: Likewise.
* tools/Makefile.am: Likewise.
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'libvirt-lxc-override.c')
0 files changed, 0 insertions, 0 deletions