]> xenbits.xensource.com Git - libvirt.git/commitdiff
maint: ensure syntax check exceptions are distributed
authorEric Blake <eblake@redhat.com>
Sat, 13 Nov 2010 22:18:55 +0000 (15:18 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 24 Nov 2010 22:23:43 +0000 (15:23 -0700)
* Makefile.am (EXTRA_DIST): Factor exceptions files...
(syntax_check_excpetions): into new list.  Include recently added
exceptions.
* cfg.mk (sc_x_sc_dist_check): New check, copied from coreutils.

Makefile.am
cfg.mk

index bf1b49b5152bb5c2f90bef255caae36c71218c4d..bd70a3a8ab3ca9dd57ccca99b913d1bf26d6db0e 100644 (file)
@@ -14,17 +14,14 @@ XML_EXAMPLES = \
   $(patsubst $(srcdir)/%,%,$(wildcard $(addprefix $(srcdir)/examples/xml/, \
                                        test/*.xml storage/*.xml)))
 
-EXTRA_DIST = \
-  ChangeLog-old \
-  libvirt.spec libvirt.spec.in \
-  mingw32-libvirt.spec.in \
-  libvirt.pc libvirt.pc.in \
-  autobuild.sh \
+syntax_check_exceptions = \
   .x-sc_avoid_ctype_macros \
   .x-sc_avoid_if_before_free \
   .x-sc_avoid_write \
   .x-sc_bindtextdomain \
   .x-sc_m4_quote_check \
+  .x-sc_po_check \
+  .x-sc_prohibit_always_true_header_tests \
   .x-sc_prohibit_asprintf \
   .x-sc_prohibit_close \
   .x-sc_prohibit_empty_lines_at_EOF \
@@ -34,6 +31,7 @@ EXTRA_DIST = \
   .x-sc_prohibit_have_config_h \
   .x-sc_prohibit_HAVE_MBRTOWC \
   .x-sc_prohibit_nonreentrant \
+  .x-sc_prohibit_readlink \
   .x-sc_prohibit_sprintf \
   .x-sc_prohibit_strcmp \
   .x-sc_prohibit_strncmp \
@@ -43,9 +41,18 @@ EXTRA_DIST = \
   .x-sc_require_config_h \
   .x-sc_require_config_h_first \
   .x-sc_trailing_blank \
+  .x-sc_unmarked_diagnostics
+
+EXTRA_DIST = \
+  ChangeLog-old \
+  libvirt.spec libvirt.spec.in \
+  mingw32-libvirt.spec.in \
+  libvirt.pc libvirt.pc.in \
+  autobuild.sh \
   Makefile.nonreentrant \
   autogen.sh \
   examples/domain-events/events-python \
+  $(syntax_check_exceptions) \
   $(XML_EXAMPLES)
 
 pkgconfigdir = $(libdir)/pkgconfig
diff --git a/cfg.mk b/cfg.mk
index 963c7db3843063c126bde090291907f7b90976d0..5b4a603d7c73646166be65136a09be66c597105f 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -454,6 +454,19 @@ sc_prohibit_gettext_markup:
        halt='do not mark these strings for translation'                \
          $(_sc_search_regexp)
 
+# Ensure that the syntax_check_exceptions file list in Makefile.am
+# stays in sync with corresponding files in the repository.
+sce = syntax_check_exceptions
+sc_x_sc_dist_check:
+       @test "$$( ($(VC_LIST) | sed -n '/\.x-sc_/p'                    \
+                    | sed 's|^$(_dot_escaped_srcdir)/||';              \
+                  sed -n '/^$(sce) =[   ]*\\$$/,/[^\]$$/p'             \
+                    $(srcdir)/Makefile.am                              \
+                      | sed 's/^  *//;/^$(sce) =/d'                    \
+                      | tr -s '\012\\' '  ' | fmt -1                   \
+                  ) | sort | uniq -u)"                                 \
+         && { echo 'Makefile.am: $(sce) mismatch' >&2; exit 1; } || :;
+
 # We don't use this feature of maint.mk.
 prev_version_file = /dev/null