summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-03-14 14:26:38 +0100
committerJim Meyering <meyering@redhat.com>2011-03-16 12:22:22 +0100
commit8e4e1d484f88502dbe9336050232a5f90e0b68d4 (patch)
treeaa9036ddd6b86e42888e5e10ea5762fb2ae58cc8
parent0ddfd54b08dfe4e78b8aa2dd74378e5b62c9d68c (diff)
downloadcoreutils-8e4e1d484f88502dbe9336050232a5f90e0b68d4.tar.xz
maint: stop using .x-sc_* files to list syntax-check exemptions
Instead, use the brand new mechanism with which you merely use a variable (derived from the rule name) defined in cfg.mk to an ERE matching the exempted file names. * gnulib: Update to latest, to get maint.mk that implements this. * Makefile.am (syntax_check_exceptions): Remove variable. (EXTRA_DIST): Remove use of the variable. * cfg.mk (sc_x_sc_dist_check): Remove rule, no longer useful. (exclude_file_name_regexp--sc_space_tab): Define variable. (exclude_file_name_regexp--sc_bindtextdomain): Likewise. (exclude_file_name_regexp--sc_unmarked_diagnostics): Likewise. (exclude_file_name_regexp--sc_error_message_uppercase): Likewise. (exclude_file_name_regexp--sc_trailing_blank): Likewise. (exclude_file_name_regexp--sc_system_h_headers): Likewise. (exclude_file_name_regexp--sc_require_config_h_first): Likewise. (exclude_file_name_regexp--sc_require_config_h): Likewise. (exclude_file_name_regexp--sc_po_check): Likewise. (exclude_file_name_regexp--sc_prohibit_always-defined_macros): Likewise. (exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF): Likewise. (exclude_file_name_regexp--sc_program_name): Likewise. (exclude_file_name_regexp--sc_file_system): Likewise. (exclude_file_name_regexp--sc_prohibit_always_true_header_tests): Likewise. (exclude_file_name_regexp--sc_prohibit_fail_0): Likewise. (exclude_file_name_regexp--sc_prohibit_atoi_atof): Likewise. (exclude_file_name_regexp--sc_prohibit_tab_based_indentation): Likewise. (exclude_file_name_regexp--sc_prohibit_stat_st_blocks): Likewise. * configure.ac [whether localtime caches TZ]: Use return 0/1, not exit (0/1) to avoid triggering a sc_prohibit_magic_number_exit failure. * .x-sc_GPL_version: Remove file. * .x-sc_bindtextdomain: Likewise. * .x-sc_error_message_uppercase: Likewise. * .x-sc_file_system: Likewise. * .x-sc_obsolete_symbols: Likewise. * .x-sc_po_check: Likewise. * .x-sc_program_name: Likewise. * .x-sc_prohibit_always-defined_macros: Likewise. * .x-sc_prohibit_always_true_header_tests: Likewise. * .x-sc_prohibit_atoi_atof: Likewise. * .x-sc_prohibit_empty_lines_at_EOF: Likewise. * .x-sc_prohibit_fail_0: Likewise. * .x-sc_prohibit_magic_number_exit: Likewise. * .x-sc_prohibit_stat_st_blocks: Likewise. * .x-sc_prohibit_strcmp: Likewise. * .x-sc_prohibit_tab_based_indentation: Likewise. * .x-sc_require_config_h: Likewise. * .x-sc_require_config_h_first: Likewise. * .x-sc_space_tab (config): Likewise. * .x-sc_sun_os_names: Likewise. * .x-sc_system_h_headers: Likewise. * .x-sc_trailing_blank: Likewise. * .x-sc_unmarked_diagnostics: Likewise. * .x-sc_useless_cpp_parens: Likewise.
-rw-r--r--.x-sc_GPL_version1
-rw-r--r--.x-sc_bindtextdomain7
-rw-r--r--.x-sc_error_message_uppercase1
-rw-r--r--.x-sc_file_system5
-rw-r--r--.x-sc_obsolete_symbols1
-rw-r--r--.x-sc_po_check1
-rw-r--r--.x-sc_program_name3
-rw-r--r--.x-sc_prohibit_always-defined_macros1
-rw-r--r--.x-sc_prohibit_always_true_header_tests2
-rw-r--r--.x-sc_prohibit_atoi_atof1
-rw-r--r--.x-sc_prohibit_empty_lines_at_EOF1
-rw-r--r--.x-sc_prohibit_fail_04
-rw-r--r--.x-sc_prohibit_magic_number_exit2
-rw-r--r--.x-sc_prohibit_stat_st_blocks4
-rw-r--r--.x-sc_prohibit_strcmp1
-rw-r--r--.x-sc_prohibit_tab_based_indentation7
-rw-r--r--.x-sc_require_config_h9
-rw-r--r--.x-sc_require_config_h_first9
-rw-r--r--.x-sc_space_tab12
-rw-r--r--.x-sc_sun_os_names2
-rw-r--r--.x-sc_system_h_headers3
-rw-r--r--.x-sc_trailing_blank1
-rw-r--r--.x-sc_unmarked_diagnostics2
-rw-r--r--.x-sc_useless_cpp_parens13
-rw-r--r--Makefile.am27
-rw-r--r--cfg.mk45
-rw-r--r--configure.ac10
m---------gnulib0
28 files changed, 37 insertions, 138 deletions
diff --git a/.x-sc_GPL_version b/.x-sc_GPL_version
deleted file mode 100644
index d496afaad..000000000
--- a/.x-sc_GPL_version
+++ /dev/null
@@ -1 +0,0 @@
-^build-aux/check\.mk$
diff --git a/.x-sc_bindtextdomain b/.x-sc_bindtextdomain
deleted file mode 100644
index 2a568be2b..000000000
--- a/.x-sc_bindtextdomain
+++ /dev/null
@@ -1,7 +0,0 @@
-^gl/lib/randint\.c$
-^gl/tests/test-di-set\.c$
-^gl/tests/test-fadvise\.c$
-^gl/tests/test-ino-map\.c$
-^gl/tests/test-mbsalign\.c$
-^gl/tests/test-rand-isaac\.c$
-^lib/euidaccess-stat\.c$
diff --git a/.x-sc_error_message_uppercase b/.x-sc_error_message_uppercase
deleted file mode 100644
index 245223016..000000000
--- a/.x-sc_error_message_uppercase
+++ /dev/null
@@ -1 +0,0 @@
-build-aux/cvsu
diff --git a/.x-sc_file_system b/.x-sc_file_system
deleted file mode 100644
index e9971821f..000000000
--- a/.x-sc_file_system
+++ /dev/null
@@ -1,5 +0,0 @@
-ChangeLog
-NEWS
-src/df.c
-src/stat.c
-tests/misc/df-P
diff --git a/.x-sc_obsolete_symbols b/.x-sc_obsolete_symbols
deleted file mode 100644
index 56631abf1..000000000
--- a/.x-sc_obsolete_symbols
+++ /dev/null
@@ -1 +0,0 @@
-ChangeLog
diff --git a/.x-sc_po_check b/.x-sc_po_check
deleted file mode 100644
index ffa8d972c..000000000
--- a/.x-sc_po_check
+++ /dev/null
@@ -1 +0,0 @@
-^gl/
diff --git a/.x-sc_program_name b/.x-sc_program_name
deleted file mode 100644
index 86cc5c1a7..000000000
--- a/.x-sc_program_name
+++ /dev/null
@@ -1,3 +0,0 @@
-gl/lib/randint.c
-lib/euidaccess-stat.c
-gl/tests/.*\.c
diff --git a/.x-sc_prohibit_always-defined_macros b/.x-sc_prohibit_always-defined_macros
deleted file mode 100644
index 8c96958a4..000000000
--- a/.x-sc_prohibit_always-defined_macros
+++ /dev/null
@@ -1 +0,0 @@
-src/seq.c
diff --git a/.x-sc_prohibit_always_true_header_tests b/.x-sc_prohibit_always_true_header_tests
deleted file mode 100644
index 732d9ecde..000000000
--- a/.x-sc_prohibit_always_true_header_tests
+++ /dev/null
@@ -1,2 +0,0 @@
-^m4/stat-prog\.m4$
-ChangeLog
diff --git a/.x-sc_prohibit_atoi_atof b/.x-sc_prohibit_atoi_atof
deleted file mode 100644
index f66450ef3..000000000
--- a/.x-sc_prohibit_atoi_atof
+++ /dev/null
@@ -1 +0,0 @@
-^lib/euidaccess-stat\.c$
diff --git a/.x-sc_prohibit_empty_lines_at_EOF b/.x-sc_prohibit_empty_lines_at_EOF
deleted file mode 100644
index 92571d699..000000000
--- a/.x-sc_prohibit_empty_lines_at_EOF
+++ /dev/null
@@ -1 +0,0 @@
-^tests/pr/
diff --git a/.x-sc_prohibit_fail_0 b/.x-sc_prohibit_fail_0
deleted file mode 100644
index 7055351cd..000000000
--- a/.x-sc_prohibit_fail_0
+++ /dev/null
@@ -1,4 +0,0 @@
-\.mk$
-/Makefile\.am$
-^tests/init\.sh$
-^tests/test-lib\.sh$
diff --git a/.x-sc_prohibit_magic_number_exit b/.x-sc_prohibit_magic_number_exit
deleted file mode 100644
index ffeb5acb2..000000000
--- a/.x-sc_prohibit_magic_number_exit
+++ /dev/null
@@ -1,2 +0,0 @@
-configure.ac
-ChangeLog*
diff --git a/.x-sc_prohibit_stat_st_blocks b/.x-sc_prohibit_stat_st_blocks
deleted file mode 100644
index eb590cd56..000000000
--- a/.x-sc_prohibit_stat_st_blocks
+++ /dev/null
@@ -1,4 +0,0 @@
-src/system.h
-tests/du/2g
-old/fileutils/ChangeLog-1997
-ChangeLog-2005
diff --git a/.x-sc_prohibit_strcmp b/.x-sc_prohibit_strcmp
deleted file mode 100644
index 56631abf1..000000000
--- a/.x-sc_prohibit_strcmp
+++ /dev/null
@@ -1 +0,0 @@
-ChangeLog
diff --git a/.x-sc_prohibit_tab_based_indentation b/.x-sc_prohibit_tab_based_indentation
deleted file mode 100644
index 388f94a3b..000000000
--- a/.x-sc_prohibit_tab_based_indentation
+++ /dev/null
@@ -1,7 +0,0 @@
-^GNUMakefile$
-Makefile\.am$
-\.mk$
-^tests/pr/
-ChangeLog.*
-^man/help2man$
-^gl/lib/.*\.c\.diff$
diff --git a/.x-sc_require_config_h b/.x-sc_require_config_h
deleted file mode 100644
index 727bb8ead..000000000
--- a/.x-sc_require_config_h
+++ /dev/null
@@ -1,9 +0,0 @@
-^lib/buffer-lcm\.c$
-^src/false\.c$
-^src/lbracket\.c$
-^src/ls-dir\.c$
-^src/ls-ls\.c$
-^src/ls-vdir\.c$
-^src/tac-pipe\.c$
-^src/uname-arch\.c$
-^src/uname-uname\.c$
diff --git a/.x-sc_require_config_h_first b/.x-sc_require_config_h_first
deleted file mode 100644
index 727bb8ead..000000000
--- a/.x-sc_require_config_h_first
+++ /dev/null
@@ -1,9 +0,0 @@
-^lib/buffer-lcm\.c$
-^src/false\.c$
-^src/lbracket\.c$
-^src/ls-dir\.c$
-^src/ls-ls\.c$
-^src/ls-vdir\.c$
-^src/tac-pipe\.c$
-^src/uname-arch\.c$
-^src/uname-uname\.c$
diff --git a/.x-sc_space_tab b/.x-sc_space_tab
deleted file mode 100644
index 2ef34285d..000000000
--- a/.x-sc_space_tab
+++ /dev/null
@@ -1,12 +0,0 @@
-config(ure|\.(guess|sub))
-tests/pr
-lib/regex.c
-config-log
-tests/misc/nl
-po/de.po
-m4/lib-ld.m4
-m4/lib-prefix.m4
-m4/po.m4
-aclocal.m4
-src/c99-to-c89.diff
-^gl/lib/.*\.c\.diff$
diff --git a/.x-sc_sun_os_names b/.x-sc_sun_os_names
deleted file mode 100644
index 3ffc52c36..000000000
--- a/.x-sc_sun_os_names
+++ /dev/null
@@ -1,2 +0,0 @@
-config-log
-build-aux/config.guess
diff --git a/.x-sc_system_h_headers b/.x-sc_system_h_headers
deleted file mode 100644
index 14e020f34..000000000
--- a/.x-sc_system_h_headers
+++ /dev/null
@@ -1,3 +0,0 @@
-^src/libstdbuf\.c$
-^src/system\.h$
-^src/copy\.h$
diff --git a/.x-sc_trailing_blank b/.x-sc_trailing_blank
deleted file mode 100644
index 92571d699..000000000
--- a/.x-sc_trailing_blank
+++ /dev/null
@@ -1 +0,0 @@
-^tests/pr/
diff --git a/.x-sc_unmarked_diagnostics b/.x-sc_unmarked_diagnostics
deleted file mode 100644
index aac89841b..000000000
--- a/.x-sc_unmarked_diagnostics
+++ /dev/null
@@ -1,2 +0,0 @@
-^lib/xstrtol\.h$
-^build-aux/cvsu$
diff --git a/.x-sc_useless_cpp_parens b/.x-sc_useless_cpp_parens
deleted file mode 100644
index 01eb4b4e5..000000000
--- a/.x-sc_useless_cpp_parens
+++ /dev/null
@@ -1,13 +0,0 @@
-^build-aux/config.guess
-^configure
-^lib/alloca.c
-^lib/fts.c
-^lib/getdate.c
-^lib/getloadavg.c
-^lib/gettext.h
-^lib/getusershell.c
-^lib/mbswidth.c
-^lib/strtod.c
-^lib/xstrtol.c
-^m4/
-^tests/misc/pwd-unreadable-parent
diff --git a/Makefile.am b/Makefile.am
index 18f09b79e..9322658f1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,35 +39,8 @@ changelog_etc = \
old/textutils/NEWS \
po/ChangeLog-2007
-syntax_check_exceptions = \
- .x-sc_GPL_version \
- .x-sc_bindtextdomain \
- .x-sc_error_message_uppercase \
- .x-sc_file_system \
- .x-sc_obsolete_symbols \
- .x-sc_po_check \
- .x-sc_program_name \
- .x-sc_prohibit_always-defined_macros \
- .x-sc_prohibit_atoi_atof \
- .x-sc_prohibit_empty_lines_at_EOF \
- .x-sc_prohibit_fail_0 \
- .x-sc_prohibit_magic_number_exit \
- .x-sc_prohibit_stat_st_blocks \
- .x-sc_prohibit_strcmp \
- .x-sc_prohibit_tab_based_indentation \
- .x-sc_require_config_h \
- .x-sc_require_config_h_first \
- .x-sc_space_tab \
- .x-sc_sun_os_names \
- .x-sc_system_h_headers \
- .x-sc_trailing_blank \
- .x-sc_prohibit_always_true_header_tests \
- .x-sc_unmarked_diagnostics \
- .x-sc_useless_cpp_parens
-
EXTRA_DIST = \
$(changelog_etc) \
- $(syntax_check_exceptions) \
.mailmap \
.prev-version \
.version \
diff --git a/cfg.mk b/cfg.mk
index c897dc45f..fe2dd13b9 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -93,19 +93,6 @@ sc_root_tests:
exit 1; } || :; \
fi
-# 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; } || :;
-
# Create a list of regular expressions matching the names
# of files included from system.h. Exclude a couple.
.re-list:
@@ -337,3 +324,35 @@ include $(srcdir)/dist-check.mk
update-copyright-env = \
UPDATE_COPYRIGHT_USE_INTERVALS=1 \
UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79
+
+# List syntax-check exemptions.
+exclude_file_name_regexp--sc_space_tab = \
+ ^(tests/pr/|tests/misc/nl$$|gl/.*\.diff$$)
+exclude_file_name_regexp--sc_bindtextdomain = ^(gl/.*|lib/euidaccess-stat)\.c$$
+exclude_file_name_regexp--sc_unmarked_diagnostics = ^build-aux/cvsu$$
+exclude_file_name_regexp--sc_error_message_uppercase = ^build-aux/cvsu$$
+exclude_file_name_regexp--sc_trailing_blank = ^tests/pr/
+exclude_file_name_regexp--sc_system_h_headers = \
+ ^src/((system|copy)\.h|libstdbuf\.c)$$
+
+_src = (false|lbracket|ls-(dir|ls|vdir)|tac-pipe|uname-(arch|uname))
+exclude_file_name_regexp--sc_require_config_h_first = \
+ (^lib/buffer-lcm\.c|src/$(_src)\.c)$$
+exclude_file_name_regexp--sc_require_config_h = \
+ $(exclude_file_name_regexp--sc_require_config_h_first)
+
+exclude_file_name_regexp--sc_po_check = ^gl/
+exclude_file_name_regexp--sc_prohibit_always-defined_macros = ^src/seq\.c$$
+exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^tests/pr/
+exclude_file_name_regexp--sc_program_name = ^(gl/.*|lib/euidaccess-stat)\.c$$
+exclude_file_name_regexp--sc_file_system = NEWS|^(src/df\.c|tests/misc/df-P)$$
+exclude_file_name_regexp--sc_prohibit_always_true_header_tests = \
+ ^m4/stat-prog\.m4$$
+exclude_file_name_regexp--sc_prohibit_fail_0 = \
+ (^tests/init\.sh|Makefile\.am|\.mk)$$
+exclude_file_name_regexp--sc_prohibit_atoi_atof = ^lib/euidaccess-stat\.c$$
+exclude_file_name_regexp--sc_prohibit_tab_based_indentation = \
+ ^tests/pr/|(^gl/lib/reg.*\.c\.diff|Makefile(\.am)?|\.mk|^man/help2man)$$
+
+exclude_file_name_regexp--sc_prohibit_stat_st_blocks = \
+ ^(src/system\.h|tests/du/2g)$$
diff --git a/configure.ac b/configure.ac
index bc9933d72..6407bea9f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -162,18 +162,18 @@ int main()
time_t now = time ((time_t *) 0);
int hour_GMT0, hour_unset;
if (putenv ("TZ=GMT0") != 0)
- exit (1);
+ return 1;
hour_GMT0 = localtime (&now)->tm_hour;
unset_TZ ();
hour_unset = localtime (&now)->tm_hour;
if (putenv ("TZ=PST8") != 0)
- exit (1);
+ return 1;
if (localtime (&now)->tm_hour == hour_GMT0)
- exit (1);
+ return 1;
unset_TZ ();
if (localtime (&now)->tm_hour != hour_unset)
- exit (1);
- exit (0);
+ return 1;
+ return 0;
}]])],
[utils_cv_localtime_cache=no],
[utils_cv_localtime_cache=yes],
diff --git a/gnulib b/gnulib
-Subproject 68d757e2cb228590d46961cbf3e9ec7d4460e33
+Subproject 0baae9cadd08c9704e3c704dd69fb75640293e9