提交 0c4eefe4 编写于 作者: P Pavel Hrdina

syntax-check.mk: cleanup sc_po_check dependencies

Introduce new rule 'generated-sources' as a helper for PO files check
to make sure that all generated files are prepared and to not duplicate
the list on different places.  This will be used as a dependency for
sc_po_check rule instead of duplicated list of generated files.
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 c6471079
......@@ -1953,6 +1953,9 @@ sc_m4_quote_check:
halt='quote the first arg to AC_DEF*' \
$(_sc_search_regexp)
gen_source_files:
$(MAKE) -C src generated-sources
fix_po_file_diag = \
'you have changed the set of files with translatable diagnostics;\n\
apply the above patch\n'
......@@ -1977,7 +1980,9 @@ perl_translatable_files_list_ = \
po_file ?= $(srcdir)/po/POTFILES
generated_files ?= $(srcdir)/lib/*.[ch]
_gl_translatable_string_re ?= \b(N?_|gettext *)\([^)"]*("|$$)
sc_po_check:
# sc_po_check can fail if generated files are not built first
sc_po_check: gen_source_files
@if test -f $(po_file); then \
$(GREP) -E -v '^(#|$$)' $(po_file) \
| $(GREP) -v '^src/false\.c$$' | sort > $@-1; \
......@@ -2160,24 +2165,6 @@ test-wrap-argv:
group-qemu-caps:
$(AM_V_GEN)$(PERL) $(top_srcdir)/tests/group-qemu-caps.pl --check $(top_srcdir)/
# sc_po_check can fail if generated files are not built first
sc_po_check: \
$(srcdir)/src/remote/remote_daemon_dispatch_stubs.h \
$(srcdir)/src/remote/remote_daemon_dispatch_qemu_stubs.h \
$(srcdir)/src/remote/remote_client_bodies.h \
$(srcdir)/src/admin/admin_server_dispatch_stubs.h \
$(srcdir)/src/admin/admin_client.h
$(srcdir)/src/remote/remote_daemon_dispatch_stubs.h: $(srcdir)/src/remote/remote_protocol.x
$(MAKE) -C src remote/remote_daemon_dispatch_stubs.h
$(srcdir)/src/remote/remote_daemon_dispatch_qemu_stubs.h: $(srcdir)/src/remote/qemu_protocol.x
$(MAKE) -C src remote/remote_daemon_dispatch_qemu_stubs.h
$(srcdir)/src/remote/remote_client_bodies.h: $(srcdir)/src/remote/remote_protocol.x
$(MAKE) -C src remote/remote_client_bodies.h
$(srcdir)/src/admin/admin_server_dispatch_stubs.h: $(srcdir)/src/admin/admin_protocol.x
$(MAKE) -C src admin/admin_server_dispatch_stubs.h
$(srcdir)/src/admin/admin_client.h: $(srcdir)/src/admin/admin_protocol.x
$(MAKE) -C src admin/admin_client.h
# List all syntax-check exemptions:
exclude_file_name_regexp--sc_avoid_strcase = ^tools/vsh\.h$$
......
......@@ -717,6 +717,9 @@ libvirt_iohelper_CFLAGS = \
endif WITH_LIBVIRTD
generated-sources: $(BUILT_SOURCES)
install-data-local: $(INSTALL_DATA_LOCAL) \
$(INSTALL_DATA_DIRS:%=install-data-%)
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/libvirt"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册