build: nuke all .x-sc* files, and fix VPATH syntax-check

Not every day you see a patch that nukes 27 files!

* .gnulib: Update to latest, for maint.mk improvements
* bootstrap: Resync to gnulib.
* bootstrap.conf (ACLOCAL): Swap the secondary aclocal include
directory, now that bootstrap picks up gnulib/m4 instead of m4.
* Makefile.am (syntax_check_exceptions, EXTRA_DIST): No longer
worry about nuked files.
* cfg.mk (sc_x_sc_dist_check): Delete dead rule.
(VC_LIST_ALWAYS_EXCLUDE_REGEX): Add HACKING.
(exclude_file_name_regexp--sc_*): Inline and simplify contents...
* .x-sc_*: ...from here, then delete the files.
This commit is contained in:
Eric Blake 2011-03-16 15:25:56 -06:00
parent ee691d8433
commit 2d24037db0
32 changed files with 59 additions and 142 deletions

@ -1 +1 @@
Subproject commit c2090a84dc3997acada3166772afac94f2d3a25c
Subproject commit 422ab2e0d70ed348e2fd0a82558be38e5859011a

View File

@ -1 +0,0 @@
^gnulib/.*

View File

@ -1 +0,0 @@
^ChangeLog

View File

@ -1,9 +0,0 @@
^src/libvirt\.c$
^src/fdstream\.c$
^src/qemu/qemu_monitor\.c$
^src/util/command\.c$
^src/util/util\.c$
^src/xen/xend_internal\.c$
^daemon/libvirtd.c$
^gnulib/
^tools/console.c$

View File

@ -1,2 +0,0 @@
^tests/.*
^examples/.*

View File

@ -1 +0,0 @@
^gnulib/m4/intl\.m4$

View File

@ -1 +0,0 @@
^docs/

View File

@ -1 +0,0 @@
gnulib/.*

View File

@ -1,5 +0,0 @@
^ChangeLog$
^ChangeLog-old$
^include/libvirt/virterror\.h$
^daemon/dispatch\.c$
^src/util/virterror\.c$

View File

@ -1,4 +0,0 @@
ChangeLog*
docs/news.html.in
python/libvirt-override.c
python/typewrappers.c

View File

@ -1,5 +0,0 @@
ChangeLog
^bootstrap.conf$
^gnulib/
^po/
^src/util/util.c$

View File

@ -1,9 +0,0 @@
# Non-C files:
^docs/.*
^ChangeLog*
^HACKING$
*\.py$
# Wrapper implementation:
^src/util/files\.c$
# Only uses close in documentation comments:
^src/libvirt\.c$

View File

@ -1,5 +0,0 @@
^docs/api_extension/.*
^tests/qemuhelpdata/.*
*.gif$
*.ico$
*.png$

View File

@ -1,8 +0,0 @@
^docs/.*
^HACKING$
^src/util/util\.c$
^tests/testutils\.c$
# Files that we may want to convert over to virCommand someday...
^daemon/libvirtd\.c$
^src/libvirt\.c$
^src/lxc/lxc_controller\.c$

View File

@ -1,2 +0,0 @@
^gnulib/lib/getaddrinfo\.c$
^gnulib/m4/

View File

@ -1,2 +0,0 @@
^src/util/util\.c$
^ChangeLog-old$

View File

@ -1,2 +0,0 @@
ChangeLog*
docs/news.html.in

View File

@ -1 +0,0 @@
^gnulib/lib/strsep\.c$

View File

@ -1,10 +0,0 @@
^gnulib/
^po/
^ChangeLog$
^ChangeLog-old$
^Makefile*
^docs/
^tests/
^tools/virsh\.c$
^tools/console\.c$
^build-aux/

View File

@ -1,2 +0,0 @@
^src/util/util\.c$
^ChangeLog-old$

View File

@ -1,4 +0,0 @@
^docs/
^po/
^ChangeLog
^HACKING

View File

@ -1,2 +0,0 @@
^src/util/util\.c$
^tools/virsh\.c$

View File

@ -1 +0,0 @@
docs/news.html.in

View File

@ -1 +0,0 @@
^src/util/xml.c$

View File

@ -1,4 +0,0 @@
^examples/
^gnulib/lib/dummy\.c$
^gnulib/tests/dummy\.c$
^ChangeLog$

View File

@ -1 +0,0 @@
^examples/

View File

@ -1,7 +0,0 @@
\.fig$
\.gif$
\.ico$
\.png$
^ChangeLog$
^NEWS$
^docs/.*

View File

@ -1,2 +0,0 @@
docs/apibuild.py
tests/virt-aa-helper-test

View File

@ -14,35 +14,6 @@ XML_EXAMPLES = \
$(patsubst $(srcdir)/%,%,$(wildcard $(addprefix $(srcdir)/examples/xml/, \
test/*.xml storage/*.xml)))
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 \
.x-sc_prohibit_fork_wrappers \
.x-sc_prohibit_gethostby \
.x-sc_prohibit_gethostname \
.x-sc_prohibit_gettext_noop \
.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_strncpy \
.x-sc_prohibit_test_minus_ao \
.x-sc_prohibit_VIR_ERR_NO_MEMORY \
.x-sc_prohibit_xmlGetProp \
.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 \
@ -53,7 +24,6 @@ EXTRA_DIST = \
autogen.sh \
cfg.mk \
examples/domain-events/events-python \
$(syntax_check_exceptions) \
$(XML_EXAMPLES)
pkgconfigdir = $(libdir)/pkgconfig

View File

@ -1,6 +1,6 @@
#! /bin/sh
# Print a version string.
scriptversion=2011-01-21.16; # UTC
scriptversion=2011-03-03.12; # UTC
# Bootstrap this package from checked-out sources.
@ -874,7 +874,7 @@ grep -E '^[ ]*AC_CONFIG_HEADERS?\>' configure.ac >/dev/null ||
for command in \
libtool \
"${ACLOCAL-aclocal} --force -I m4 $ACLOCAL_FLAGS" \
"${ACLOCAL-aclocal} --force -I '$m4_base' $ACLOCAL_FLAGS" \
"${AUTOCONF-autoconf} --force" \
"${AUTOHEADER-autoheader} --force" \
"${AUTOMAKE-automake} --add-missing --copy --force-missing"
@ -885,7 +885,7 @@ do
command="${LIBTOOLIZE-libtoolize} -c -f"
fi
echo "$0: $command ..."
$command || exit
eval "$command" || exit
done

View File

@ -145,7 +145,7 @@ gnulib_tool_option_extras="\
# Convince bootstrap to use multiple m4 directories.
: ${ACLOCAL=aclocal}
ACLOCAL="$ACLOCAL -I gnulib/m4"
ACLOCAL="$ACLOCAL -I m4"
export ACLOCAL
# Build prerequisites

68
cfg.mk
View File

@ -66,7 +66,7 @@ local-checks-to-skip = \
sc_useless_cpp_parens
# Files that should never cause syntax check failures.
VC_LIST_ALWAYS_EXCLUDE_REGEX = ^docs/news.html.in$$
VC_LIST_ALWAYS_EXCLUDE_REGEX = ^(HACKING|docs/news\.html\.in)$$
# Functions like free() that are no-ops on NULL arguments.
useless_free_options = \
@ -482,19 +482,6 @@ 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
@ -551,3 +538,56 @@ _makefile_at_at_check_exceptions = ' && !/(SCHEMA|SYSCONF)DIR/'
# regenerate HACKING as part of the syntax-check
syntax-check: $(top_srcdir)/HACKING
# List all syntax-check exemptions:
_src1=libvirt|fdstream|qemu/qemu_monitor|util/(command|util)|xen/xend_internal
exclude_file_name_regexp--sc_avoid_write = \
^(src/($(_src1))|daemon/libvirtd|tools/console)\.c$$
exclude_file_name_regexp--sc_bindtextdomain = ^(tests|examples)/
exclude_file_name_regexp--sc_po_check = ^docs/
exclude_file_name_regexp--sc_prohibit_VIR_ERR_NO_MEMORY = \
^(include/libvirt/virterror\.h|daemon/dispatch\.c|src/util/virterror\.c)$$
exclude_file_name_regexp--sc_prohibit_always_true_header_tests = \
(^docs|^python/(libvirt-override|typewrappers)\.c$$)
exclude_file_name_regexp--sc_prohibit_asprintf = \
^(bootstrap.conf$$|po/|src/util/util\.c$$)
exclude_file_name_regexp--sc_prohibit_close = \
(\.py$$|^docs/|(src/util/files\.c|src/libvirt\.c)$$)
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
(^docs/api_extension/|^tests/qemuhelpdata/|\.(gif|ico|png)$$)
_src2=src/(util/util|libvirt|lxc/lxc_controller)
exclude_file_name_regexp--sc_prohibit_fork_wrappers = \
(^docs|^($(_src2)|tests/testutils|daemon/libvirtd)\.c$$)
exclude_file_name_regexp--sc_prohibit_gethostname = ^src/util/util\.c$$
exclude_file_name_regexp--sc_prohibit_gettext_noop = ^docs/
exclude_file_name_regexp--sc_prohibit_nonreentrant = \
^((po|docs|tests)/|tools/(virsh|console)\.c$$)
exclude_file_name_regexp--sc_prohibit_readlink = ^src/util/util\.c$$
exclude_file_name_regexp--sc_prohibit_sprintf = ^(docs/|HACKING$$)
exclude_file_name_regexp--sc_prohibit_strncpy = \
^(src/util/util|tools/virsh)\.c$$
exclude_file_name_regexp--sc_prohibit_xmlGetProp = ^src/util/xml\.c$$
exclude_file_name_regexp--sc_require_config_h = ^examples/
exclude_file_name_regexp--sc_require_config_h_first = ^examples/
exclude_file_name_regexp--sc_trailing_blank = (^docs/|\.(fig|gif|ico|png)$$)
exclude_file_name_regexp--sc_unmarked_diagnostics = \
^(docs/apibuild.py|tests/virt-aa-helper-test)$$