summaryrefslogtreecommitdiff
path: root/check-AC_LIBOBJ
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-12-13 00:28:20 +0100
committerBruno Haible <bruno@clisp.org>2020-12-13 00:28:20 +0100
commit0f1b9440bc719abcee7cbdf137e723cfe153038a (patch)
treef2d1f399e7db6857bc15e70f5792353622c73282 /check-AC_LIBOBJ
parentc893594d0c33139efbc8d75e43eaed487116b58b (diff)
downloadgnulib-0f1b9440bc719abcee7cbdf137e723cfe153038a.tar.gz
Fix gnulib-tool error when some modules occur in tests/.
* doc/gnulib.texi (Specification): Update statistics. (Autoconf macros): Don't suggest to use AC_LIBOBJ in a .m4 file. (Using AC_LIBOBJ): New section. * check-AC_LIBOBJ: New file. * modules/fnmatch-gnu (Files): Add lib/fnmatch.c. * modules/fopen-gnu (Files): Add lib/fopen.c. * modules/memmem (Files): Add lib/memmem.c. * modules/renameat (Files): Add lib/at-func2.c. * modules/strcasestr (Files): Add lib/strcasestr.c. * modules/strstr (Files): Add lib/strstr.c.
Diffstat (limited to 'check-AC_LIBOBJ')
-rwxr-xr-xcheck-AC_LIBOBJ32
1 files changed, 32 insertions, 0 deletions
diff --git a/check-AC_LIBOBJ b/check-AC_LIBOBJ
new file mode 100755
index 0000000000..f0c5a074d4
--- /dev/null
+++ b/check-AC_LIBOBJ
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# Copyright (C) 2020 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+#
+
+# Check that all AC_LIBOBJ invocations in module descriptions follow the rules.
+exitcode=0
+for module in `./gnulib-tool --list`; do
+ f=modules/$module
+ for g in `sed -n -e 's/^ *AC_LIBOBJ(\[\(.*\)\]).*/\1/p' < $f`; do
+ if grep "^lib/$g\.c\$" $f >/dev/null; then
+ :
+ else
+ echo "$f lacks file lib/$g.c"
+ exitcode=1
+ fi
+ done
+done
+exit $exitcode