提交 2ffbdabb 编写于 作者: D Daniel P. Berrangé

build: use a common rule for checking augeas test data files

Instead of each subdir containing its own custom rule for checking the
augeas tests, use common rule for all.

The new rule searches both src + build dirs for include files, since
some augeas files will be auto-generated very shortly.
Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 2cdabb17
...@@ -74,7 +74,6 @@ GENERATED_SYM_FILES = ...@@ -74,7 +74,6 @@ GENERATED_SYM_FILES =
augeas_DATA = augeas_DATA =
augeastest_DATA = augeastest_DATA =
conf_DATA = conf_DATA =
AUGEAS_DIRS =
if WITH_DTRACE_PROBES if WITH_DTRACE_PROBES
tapset_DATA = tapset_DATA =
endif WITH_DTRACE_PROBES endif WITH_DTRACE_PROBES
...@@ -395,15 +394,20 @@ GENERATED_SYM_FILES += \ ...@@ -395,15 +394,20 @@ GENERATED_SYM_FILES += \
$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -h \ $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -h \
$< $(srcdir)/$(subst $(srcdir)/,,$@) $< $(srcdir)/$(subst $(srcdir)/,,$@)
check-local: check-augeas check-local: check-augeas
check-augeas: $(AUGEAS_DIRS:%=check-augeas-%) check-augeas: $(augeas_DATA) $(augeastest_DATA)
$(AM_V_GEN) \
if test -x "$(AUGPARSE)"; then \
for f in $(augeastest_DATA); do \
DIR=$$(dirname "$$f"); \
FILE=$$(basename "$$f"); \
"$(AUGPARSE)" \
-I "$(srcdir)/$$DIR" -I "$(builddir)/$$DIR" \
"$$DIR/$$FILE"; \
done; \
fi
.PHONY: check-augeas
AUG_GENTEST = $(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl AUG_GENTEST = $(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl
......
...@@ -51,17 +51,10 @@ conf_DATA += bhyve/bhyve.conf ...@@ -51,17 +51,10 @@ conf_DATA += bhyve/bhyve.conf
augeas_DATA += bhyve/libvirtd_bhyve.aug augeas_DATA += bhyve/libvirtd_bhyve.aug
augeastest_DATA += bhyve/test_libvirtd_bhyve.aug augeastest_DATA += bhyve/test_libvirtd_bhyve.aug
AUGEAS_DIRS += bhyve
bhyve/test_libvirtd_bhyve.aug: bhyve/test_libvirtd_bhyve.aug.in \ bhyve/test_libvirtd_bhyve.aug: bhyve/test_libvirtd_bhyve.aug.in \
$(srcdir)/bhyve/bhyve.conf $(AUG_GENTEST) $(srcdir)/bhyve/bhyve.conf $(AUG_GENTEST)
$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/bhyve/bhyve.conf $< > $@ $(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/bhyve/bhyve.conf $< > $@
check-augeas-bhyve: bhyve/test_libvirtd_bhyve.aug
$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
'$(AUGPARSE)' -I $(srcdir)/bhyve bhyve/test_libvirtd_bhyve.aug; \
fi
endif WITH_BHYVE endif WITH_BHYVE
EXTRA_DIST += \ EXTRA_DIST += \
...@@ -69,7 +62,3 @@ EXTRA_DIST += \ ...@@ -69,7 +62,3 @@ EXTRA_DIST += \
bhyve/libvirtd_bhyve.aug \ bhyve/libvirtd_bhyve.aug \
bhyve/test_libvirtd_bhyve.aug.in \ bhyve/test_libvirtd_bhyve.aug.in \
$(NULL) $(NULL)
.PHONY: \
check-augeas-bhyve \
$(NULL)
...@@ -69,17 +69,10 @@ conf_DATA += libxl/libxl.conf ...@@ -69,17 +69,10 @@ conf_DATA += libxl/libxl.conf
augeas_DATA += libxl/libvirtd_libxl.aug augeas_DATA += libxl/libvirtd_libxl.aug
augeastest_DATA += libxl/test_libvirtd_libxl.aug augeastest_DATA += libxl/test_libvirtd_libxl.aug
AUGEAS_DIRS += libxl
libxl/test_libvirtd_libxl.aug: libxl/test_libvirtd_libxl.aug.in \ libxl/test_libvirtd_libxl.aug: libxl/test_libvirtd_libxl.aug.in \
$(srcdir)/libxl/libxl.conf $(AUG_GENTEST) $(srcdir)/libxl/libxl.conf $(AUG_GENTEST)
$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/libxl/libxl.conf $< > $@ $(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/libxl/libxl.conf $< > $@
check-augeas-libxl: libxl/test_libvirtd_libxl.aug
$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
'$(AUGPARSE)' -I $(srcdir)/libxl libxl/test_libvirtd_libxl.aug; \
fi
INSTALL_DATA_DIRS += libxl INSTALL_DATA_DIRS += libxl
install-data-libxl: install-data-libxl:
...@@ -94,10 +87,6 @@ uninstall-data-libxl: ...@@ -94,10 +87,6 @@ uninstall-data-libxl:
endif WITH_LIBXL endif WITH_LIBXL
.PHONY: \
check-augeas-libxl \
$(NULL)
EXTRA_DIST += \ EXTRA_DIST += \
libxl/libxl.conf \ libxl/libxl.conf \
libxl/libvirtd_libxl.aug \ libxl/libvirtd_libxl.aug \
......
...@@ -227,16 +227,8 @@ locking/test_libvirt_sanlock.aug: locking/test_libvirt_sanlock.aug.in \ ...@@ -227,16 +227,8 @@ locking/test_libvirt_sanlock.aug: locking/test_libvirt_sanlock.aug.in \
locking/qemu-sanlock.conf $(AUG_GENTEST) locking/qemu-sanlock.conf $(AUG_GENTEST)
$(AM_V_GEN)$(AUG_GENTEST) locking/qemu-sanlock.conf $< > $@ $(AM_V_GEN)$(AUG_GENTEST) locking/qemu-sanlock.conf $< > $@
check-augeas-sanlock: locking/test_libvirt_sanlock.aug endif WITH_QEMU
$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \ endif WITH_SANLOCK
'$(AUGPARSE)' -I $(srcdir)/locking locking/test_libvirt_sanlock.aug; \
fi
else ! WITH_QEMU
check-augeas-sanlock:
endif ! WITH_QEMU
else ! WITH_SANLOCK
check-augeas-sanlock:
endif ! WITH_SANLOCK
if WITH_QEMU if WITH_QEMU
locking/test_libvirt_lockd.aug: locking/test_libvirt_lockd.aug.in \ locking/test_libvirt_lockd.aug: locking/test_libvirt_lockd.aug.in \
...@@ -248,33 +240,11 @@ locking/test_virtlockd.aug: locking/test_virtlockd.aug.in \ ...@@ -248,33 +240,11 @@ locking/test_virtlockd.aug: locking/test_virtlockd.aug.in \
locking/virtlockd.conf $(AUG_GENTEST) locking/virtlockd.conf $(AUG_GENTEST)
$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/locking/virtlockd.conf $< > $@ $(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/locking/virtlockd.conf $< > $@
if WITH_QEMU
check-augeas-lockd: locking/test_libvirt_lockd.aug
$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
'$(AUGPARSE)' -I $(srcdir)/locking locking/test_libvirt_lockd.aug; \
fi
else ! WITH_QEMU
check-augeas-lockd:
endif ! WITH_QEMU
check-augeas-virtlockd: locking/test_virtlockd.aug
$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
'$(AUGPARSE)' -I $(srcdir)/locking locking/test_virtlockd.aug; \
fi
AUGEAS_DIRS += locking
check-augeas-locking: check-augeas-virtlockd check-augeas-lockd check-augeas-sanlock
endif WITH_LIBVIRTD endif WITH_LIBVIRTD
.PHONY: \ .PHONY: \
install-data-locking \ install-data-locking \
uninstall-data-locking \ uninstall-data-locking \
check-augeas-locking \
check-augeas-virtlockd \
check-augeas-lockd \
check-augeas-sanlock \
$(NULL) $(NULL)
locking/%-lockd.conf: $(srcdir)/locking/lockd.conf locking/%-lockd.conf: $(srcdir)/locking/lockd.conf
......
...@@ -101,17 +101,8 @@ logging/test_virtlogd.aug: logging/test_virtlogd.aug.in \ ...@@ -101,17 +101,8 @@ logging/test_virtlogd.aug: logging/test_virtlogd.aug.in \
logging/virtlogd.conf $(AUG_GENTEST) logging/virtlogd.conf $(AUG_GENTEST)
$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/logging/virtlogd.conf $< > $@ $(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/logging/virtlogd.conf $< > $@
AUGEAS_DIRS += logging
check-augeas-logging: logging/test_virtlogd.aug
$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
'$(AUGPARSE)' -I $(srcdir)/logging logging/test_virtlogd.aug; \
fi
endif WITH_LIBVIRTD endif WITH_LIBVIRTD
.PHONY: check-augeas-logging
logging/log_daemon_dispatch_stubs.h: $(LOG_PROTOCOL) \ logging/log_daemon_dispatch_stubs.h: $(LOG_PROTOCOL) \
$(srcdir)/rpc/gendispatch.pl Makefile.am $(srcdir)/rpc/gendispatch.pl Makefile.am
$(AM_V_GEN)perl -w $(srcdir)/rpc/gendispatch.pl --mode=server \ $(AM_V_GEN)perl -w $(srcdir)/rpc/gendispatch.pl --mode=server \
......
...@@ -158,17 +158,10 @@ conf_DATA += lxc/lxc.conf ...@@ -158,17 +158,10 @@ conf_DATA += lxc/lxc.conf
augeas_DATA += lxc/libvirtd_lxc.aug augeas_DATA += lxc/libvirtd_lxc.aug
augeastest_DATA += lxc/test_libvirtd_lxc.aug augeastest_DATA += lxc/test_libvirtd_lxc.aug
AUGEAS_DIRS += lxc
lxc/test_libvirtd_lxc.aug: lxc/test_libvirtd_lxc.aug.in \ lxc/test_libvirtd_lxc.aug: lxc/test_libvirtd_lxc.aug.in \
$(srcdir)/lxc/lxc.conf $(AUG_GENTEST) $(srcdir)/lxc/lxc.conf $(AUG_GENTEST)
$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/lxc/lxc.conf $< > $@ $(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/lxc/lxc.conf $< > $@
check-augeas-lxc: lxc/test_libvirtd_lxc.aug
$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
'$(AUGPARSE)' -I $(srcdir)/lxc lxc/test_libvirtd_lxc.aug; \
fi
INSTALL_DATA_DIRS += lxc INSTALL_DATA_DIRS += lxc
install-data-lxc: install-data-lxc:
...@@ -196,7 +189,6 @@ lxc/lxc_controller_dispatch.h: $(srcdir)/rpc/gendispatch.pl \ ...@@ -196,7 +189,6 @@ lxc/lxc_controller_dispatch.h: $(srcdir)/rpc/gendispatch.pl \
$(srcdir)/lxc/lxc_controller_dispatch.h $(srcdir)/lxc/lxc_controller_dispatch.h
.PHONY: \ .PHONY: \
check-agueas-lxc \
install-data-lxc \ install-data-lxc \
uninstall-data-lxc \ uninstall-data-lxc \
$(NULL) $(NULL)
......
...@@ -117,17 +117,10 @@ conf_DATA += qemu/qemu.conf ...@@ -117,17 +117,10 @@ conf_DATA += qemu/qemu.conf
augeas_DATA += qemu/libvirtd_qemu.aug augeas_DATA += qemu/libvirtd_qemu.aug
augeastest_DATA += qemu/test_libvirtd_qemu.aug augeastest_DATA += qemu/test_libvirtd_qemu.aug
AUGEAS_DIRS += qemu
qemu/test_libvirtd_qemu.aug: qemu/test_libvirtd_qemu.aug.in \ qemu/test_libvirtd_qemu.aug: qemu/test_libvirtd_qemu.aug.in \
$(srcdir)/qemu/qemu.conf $(AUG_GENTEST) $(srcdir)/qemu/qemu.conf $(AUG_GENTEST)
$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/qemu/qemu.conf $< > $@ $(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/qemu/qemu.conf $< > $@
check-augeas-qemu: qemu/test_libvirtd_qemu.aug
$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
'$(AUGPARSE)' -I $(srcdir)/qemu qemu/test_libvirtd_qemu.aug; \
fi
INSTALL_DATA_DIRS += qemu INSTALL_DATA_DIRS += qemu
install-data-qemu: install-data-qemu:
...@@ -151,7 +144,6 @@ uninstall-data-qemu: ...@@ -151,7 +144,6 @@ uninstall-data-qemu:
endif WITH_QEMU endif WITH_QEMU
.PHONY: \ .PHONY: \
check-augeas-qemu \
install-data-qemu \ install-data-qemu \
uninstall-data-qemu \ uninstall-data-qemu \
$(NULL) $(NULL)
......
...@@ -184,17 +184,10 @@ install-data-remote: ...@@ -184,17 +184,10 @@ install-data-remote:
uninstall-data-remote: uninstall-data-remote:
rmdir "$(DESTDIR)$(localstatedir)/log/libvirt" ||: rmdir "$(DESTDIR)$(localstatedir)/log/libvirt" ||:
AUGEAS_DIRS += remote
remote/test_libvirtd.aug: remote/test_libvirtd.aug.in \ remote/test_libvirtd.aug: remote/test_libvirtd.aug.in \
remote/libvirtd.conf $(AUG_GENTEST) remote/libvirtd.conf $(AUG_GENTEST)
$(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/remote/libvirtd.conf $< > $@ $(AM_V_GEN)$(AUG_GENTEST) $(srcdir)/remote/libvirtd.conf $< > $@
check-augeas-remote: remote/test_libvirtd.aug
$(AM_V_GEN)if test -x '$(AUGPARSE)'; then \
'$(AUGPARSE)' -I $(srcdir)/remote remote/test_libvirtd.aug; \
fi
if WITH_SYSCTL if WITH_SYSCTL
# Use $(prefix)/lib rather than $(libdir), since man sysctl.d insists on # Use $(prefix)/lib rather than $(libdir), since man sysctl.d insists on
# /usr/lib/sysctl.d/ even when libdir is /usr/lib64 # /usr/lib/sysctl.d/ even when libdir is /usr/lib64
...@@ -241,7 +234,6 @@ endif WITH_LIBVIRTD ...@@ -241,7 +234,6 @@ endif WITH_LIBVIRTD
.PHONY: \ .PHONY: \
install-data-remote \ install-data-remote \
uninstall-data-remote \ uninstall-data-remote \
check-augeas-remote \
$(NULL) $(NULL)
# This is needed for clients too, so can't wrap in # This is needed for clients too, so can't wrap in
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册