]> xenbits.xensource.com Git - libvirt.git/commitdiff
syntax-check.mk: cleanup sc_po_check dependencies
authorPavel Hrdina <phrdina@redhat.com>
Wed, 23 Oct 2019 13:35:05 +0000 (15:35 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Fri, 8 Nov 2019 16:07:50 +0000 (17:07 +0100)
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@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
build-aux/syntax-check.mk
src/Makefile.am

index 5890f4737fed2b4f4fd1d21d2fba599d262a973f..6acda4eea3c1231262d85be0423e0833a6909cf9 100644 (file)
@@ -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$$
 
index ebc24610e255b1162637ee5d913bce0f6483692f..e0b917fcddc8897a512b2c1318f453c3427979c8 100644 (file)
@@ -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"