[PATCH v4 04/20] [ACKED] syntax-check.mk: cleanup sc_po_check dependencies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: Pavel Hrdina <phrdina@xxxxxxxxxx>
Reviewed-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---

Notes:
    New in v2.

 build-aux/syntax-check.mk | 25 ++++++-------------------
 src/Makefile.am           |  3 +++
 2 files changed, 9 insertions(+), 19 deletions(-)

diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk
index 5890f4737f..6acda4eea3 100644
--- a/build-aux/syntax-check.mk
+++ b/build-aux/syntax-check.mk
@@ -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$$
 
diff --git a/src/Makefile.am b/src/Makefile.am
index ebc24610e2..e0b917fcdd 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -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"
-- 
2.23.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux