[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
maintainer checks
From: |
Ralf Wildenhues |
Subject: |
maintainer checks |
Date: |
Wed, 5 Apr 2006 00:55:54 +0200 |
User-agent: |
Mutt/1.5.9i |
OK to apply this? It fixes some and enforces some but not all rules in
Makefile.maint's sytax-check. Some of the imported files violate
several rules (I suppose I should post a patch to doc/make-stds.texi to
gnulib?), also some rules are not so useful (the `space tab' combination
is used several times correctly in some macros).
You may decide some of this to be overkill; I don't know.
Cheers,
Ralf
* Makefile.maint (sc_cast_of_argument_to_free): Do not fail when
no file matches the glob, discard the warning.
(sc_cast_of_x_alloc_return_value): Likewise.
(sc_cast_of_alloca_return_value, sc_error_exit_success)
(sc_prohibit_jm_in_m4, .re-list, sc_unmarked_diagnostics)
(m4-check): Likewise.
(sc_tight_scope): Do not fail for non-existing `src' directory.
(sc_changelog): Skip the Copyright footer.
* NEWS, TODO, bin/autoreconf.in: `filesystem' -> `file system'.
* config/Makefile.am, lib/freeze.mk, lib/autoconf/lang.m4,
lib/autoconf/specific.m4, lib/autoconf/types.m4,
lib/autotest/general.m4, tests/mktests.sh: White space cleanup:
remove some SPACE before TAB.
Index: Makefile.maint
===================================================================
RCS file: /cvsroot/autoconf/autoconf/Makefile.maint,v
retrieving revision 1.34
diff -u -r1.34 Makefile.maint
--- Makefile.maint 30 Mar 2006 19:54:08 -0000 1.34
+++ Makefile.maint 4 Apr 2006 22:40:50 -0000
@@ -119,20 +119,21 @@
# FIXME: don't allow `#include .strings\.h' anywhere
sc_cast_of_argument_to_free:
- @grep -nE '\<free \(\(' $(srcdir)/{lib,src}/*.[chly] && \
+ @grep -nE '\<free \(\(' \
+ $(srcdir)/{lib,src}/*.[chly] /dev/null 2>/dev/null && \
{ echo '$(ME): don'\''t cast free argument' 1>&2; \
exit 1; } || :
sc_cast_of_x_alloc_return_value:
@grep -nE --exclude=$(srcdir)/lib/regex.c \
'\*\) *x(m|c|re)alloc\>' \
- $(srcdir)/{lib,src}/*.[chy] && \
+ $(srcdir)/{lib,src}/*.[chy] /dev/null 2>/dev/null && \
{ echo '$(ME): don'\''t cast x*alloc return value' 1>&2; \
exit 1; } || :
sc_cast_of_alloca_return_value:
@grep -nE '\*\) *alloca\>' \
- $(srcdir)/src/*.[chy] && \
+ $(srcdir)/src/*.[chy] /dev/null 2>/dev/null && \
{ echo '$(ME): don'\''t cast alloca return value' 1>&2; \
exit 1; } || :
@@ -154,7 +155,7 @@
# Using EXIT_SUCCESS as the first argument to error is misleading,
# since when that parameter is 0, error does not exit. Use `0' instead.
sc_error_exit_success:
- @grep -nF 'error (EXIT_SUCCESS,'
\
+ @grep -nF 'error (EXIT_SUCCESS,' /dev/null \
$$(find -type f -name '*.[chly]') && \
{ echo '$(ME): found error (EXIT_SUCCESS' 1>&2; \
exit 1; } || :
@@ -184,7 +185,8 @@
# Each nonempty line must start with a year number, or a TAB.
sc_changelog:
- @grep -n '^[^12 ]' $$(find . -maxdepth 2 -name ChangeLog) && \
+ @sed '/^-----/,$$d' $$(find . -maxdepth 2 -name ChangeLog) \
+ | grep -n '^[^12 ]' && \
{ echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2; \
exit 1; } || :
@@ -209,7 +211,7 @@
# On 2004-04-13, they were all changed to start with gl_ instead.
# Make sure that none are inadvertently reintroduced.
sc_prohibit_jm_in_m4:
- @grep -nE 'jm_[A-Z]' \
+ @grep -nE 'jm_[A-Z]' /dev/null \
$$($(CVS_LIST) $(srcdir)/m4 |grep '\.m4$$') && \
{ echo '$(ME): do not use jm_ in m4 macro names' \
1>&2; exit 1; } || :
@@ -229,8 +231,9 @@
# Create a list of regular expressions matching the names
# of files included from system.h. Exclude a couple.
.re-list:
- @sed -n '/^# *include /s///p' $(srcdir)/src/system.h \
- | grep -Ev 'sys/(param|file)\.h' \
+ @sed -n '/^# *include /s///p' $(srcdir)/src/system.h \
+ /dev/null 2>/dev/null \
+ | grep -Ev 'sys/(param|file)\.h' \
| sed 's/ .*//;;s/^["<]/^# *include [<"]/;s/\.h[">]$$/\\.h[">]/' \
> address@hidden
@mv address@hidden $@
@@ -255,7 +258,7 @@
exit 1; } || :
sc_tight_scope:
- $(MAKE) -C src $@
+ if test -d src; then $(MAKE) -C src $@; else :; fi
sc_trailing_space:
@grep -n '[ ]$$' \
@@ -266,8 +269,8 @@
# Look for diagnostics that aren't marked for translation.
# This won't find any for which error's format string is on a separate line.
sc_unmarked_diagnostics:
- @grep -nE \
- '\<error \([^"]*"[^"]*[a-z]{3}' $(srcdir)/{lib,src}/*.c \
+ @grep -nE /dev/null \
+ '\<error \([^"]*"[^"]*[a-z]{3}' $(srcdir)/{lib,src}/*.c 2>/dev/null
\
| grep -v '_(' && \
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
exit 1; } || :
@@ -312,7 +315,7 @@
fi
m4-check:
- @grep 'AC_DEFUN([^[]' m4/*.m4 \
+ @grep 'AC_DEFUN([^[]' m4/*.m4 /dev/null 2>/dev/null \
&& { echo 'Makefile.maint: quote the first arg to AC_DEFUN' 1>&2; \
exit 1; } || :
Index: NEWS
===================================================================
RCS file: /cvsroot/autoconf/autoconf/NEWS,v
retrieving revision 1.355
diff -u -r1.355 NEWS
--- NEWS 3 Apr 2006 03:18:39 -0000 1.355
+++ NEWS 4 Apr 2006 22:40:51 -0000
@@ -678,7 +678,7 @@
- When recursing into subdirectories, try for configure.gnu before
configure to adapt for packages not using autoconf on case-insensitive
- filesystems.
+ file systems.
- Diagnostics
More errors are now caught (circular AC_REQUIRE dependencies,
Index: TODO
===================================================================
RCS file: /cvsroot/autoconf/autoconf/TODO,v
retrieving revision 1.129
diff -u -r1.129 TODO
--- TODO 14 May 2005 07:00:39 -0000 1.129
+++ TODO 4 Apr 2006 22:40:51 -0000
@@ -78,11 +78,11 @@
I'm starting to use "modules" at more places to handle software
installation, and it would be helpful to set general things like:
- prefix=/opt/pkg/@PACKAGE@/@VERSION@
+ prefix=/opt/pkg/@PACKAGE@/@VERSION@
once at a global level, and then, for example, have things like:
- --with-etcdir=$prefix/etc
+ --with-etcdir=$prefix/etc
stuffed "above" the various versions of SSH so I wouldn't have to hunt for
these things every time it was time to recompile a new version of a
@@ -188,9 +188,9 @@
> documentation, the entry for AC_PATH_XTRA, in particular.
> The documentation says that AC_PATH_XTRA
-> ... adds the C compiler flags that X needs to output variable
-> `X_CFLAGS', and the X linker flags to `X_LIBS'. If X is not
-> available, adds `-DX_DISPLAY_MISSING' to `X_CFLAGS'.
+> ... adds the C compiler flags that X needs to output variable
+> `X_CFLAGS', and the X linker flags to `X_LIBS'. If X is not
+> available, adds `-DX_DISPLAY_MISSING' to `X_CFLAGS'.
> It doesn't seem to add -DX_DISPLAY_MISSING to X_CFLAGS. X_DISPLAY_MISSING
> ends up defined in config.h, instead.
@@ -527,7 +527,7 @@
------------------------------------------------------------------------------
-Support different default filesystem layouts, e.g. SVR4, Linux.
+Support different default file system layouts, e.g. SVR4, Linux.
Of course, this can be done locally with config.site.
------------------------------------------------------------------------------
Index: bin/autoreconf.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/bin/autoreconf.in,v
retrieving revision 1.130
diff -u -r1.130 autoreconf.in
--- bin/autoreconf.in 1 Apr 2006 18:09:07 -0000 1.130
+++ bin/autoreconf.in 4 Apr 2006 22:40:53 -0000
@@ -413,7 +413,7 @@
}
else
{
- # Some filesystems have sub-second time stamps, and if so we may
+ # Some file systems have sub-second time stamps, and if so we may
# run into trouble later, after we rerun autoconf and set the
# time stamps of input files to be no greater than aclocal.m4,
# because the time-stamp-setting operation (utime) has a
Index: config/Makefile.am
===================================================================
RCS file: /cvsroot/autoconf/autoconf/config/Makefile.am,v
retrieving revision 1.7
diff -u -r1.7 Makefile.am
--- config/Makefile.am 14 May 2005 07:00:39 -0000 1.7
+++ config/Makefile.am 4 Apr 2006 22:40:53 -0000
@@ -25,7 +25,7 @@
SPECIFIC_MACROS = \
m4.m4
-GENERIC_TOOLS = \
+GENERIC_TOOLS = \
config.guess \
config.sub \
emacs-comp \
Index: lib/freeze.mk
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/freeze.mk,v
retrieving revision 1.13
diff -u -r1.13 freeze.mk
--- lib/freeze.mk 20 Feb 2006 19:45:32 -0000 1.13
+++ lib/freeze.mk 4 Apr 2006 22:41:01 -0000
@@ -70,7 +70,7 @@
$(m4sugar_m4f_dependencies) \
$(src_libdir)/m4sugar/m4sh.m4
-autotest_m4f_dependencies = \
+autotest_m4f_dependencies = \
$(m4sh_m4f_dependencies) \
$(src_libdir)/autotest/autotest.m4 \
$(src_libdir)/autotest/general.m4
Index: lib/autoconf/lang.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/lang.m4,v
retrieving revision 1.177
diff -u -r1.177 lang.m4
--- lib/autoconf/lang.m4 2 Apr 2006 16:38:54 -0000 1.177
+++ lib/autoconf/lang.m4 4 Apr 2006 22:41:03 -0000
@@ -428,7 +428,7 @@
#
# - *.xSYM
# Created on BeOS. Seems to be per executable.
-#
+#
# - *.map, *.inf
# Created by the Green Hills compiler.
Index: lib/autoconf/specific.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/specific.m4,v
retrieving revision 1.364
diff -u -r1.364 specific.m4
--- lib/autoconf/specific.m4 3 Apr 2006 03:18:39 -0000 1.364
+++ lib/autoconf/specific.m4 4 Apr 2006 22:41:03 -0000
@@ -132,10 +132,10 @@
[while :; do
$3=no
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$5], [$6])],
- [break])
+ [break])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(address@hidden:@define $1 $2
$5], [$6])],
- [$3=$2; break])
+ [$3=$2; break])
break
done])
if test "$$3" != no; then
@@ -162,12 +162,12 @@
if test "$GCC" != yes; then
ac_save_CC=$CC
while :; do
- # IRIX 6.2 and later do not support large files by default,
- # so use the C compiler's -n32 option if that helps.
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
AC_LANG_CONFTEST([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_INCLUDES])])
- AC_COMPILE_IFELSE([], [break])
- CC="$CC -n32"
- AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break])
+ AC_COMPILE_IFELSE([], [break])
+ CC="$CC -n32"
+ AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break])
break
done
CC=$ac_save_CC
Index: lib/autoconf/types.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/types.m4,v
retrieving revision 1.35
diff -u -r1.35 types.m4
--- lib/autoconf/types.m4 3 Apr 2006 03:18:39 -0000 1.35
+++ lib/autoconf/types.m4 4 Apr 2006 22:41:03 -0000
@@ -89,33 +89,33 @@
# The most obvious way to check for a TYPE is just to compile a variable
# definition:
#
-# TYPE my_var;
+# TYPE my_var;
#
# Unfortunately this does not work for const qualified types in C++,
# where you need an initializer. So you think of
#
-# TYPE my_var = (TYPE) 0;
+# TYPE my_var = (TYPE) 0;
#
# Unfortunately, again, this is not valid for some C++ classes.
#
# Then you look for another scheme. For instance you think of declaring
# a function which uses a parameter of type TYPE:
#
-# int foo (TYPE param);
+# int foo (TYPE param);
#
# but of course you soon realize this does not make it with K&R
# compilers. And by no ways you want to
#
-# int foo (param)
-# TYPE param
-# { ; }
+# int foo (param)
+# TYPE param
+# { ; }
#
# since this time it's C++ who is not happy.
#
# Don't even think of the return type of a function, since K&R cries
# there too. So you start thinking of declaring a *pointer* to this TYPE:
#
-# TYPE *p;
+# TYPE *p;
#
# but you know fairly well that this is legal in C for aggregates which
# are unknown (TYPE = struct does-not-exist).
@@ -123,7 +123,7 @@
# Then you think of using sizeof to make sure the TYPE is really
# defined:
#
-# sizeof (TYPE);
+# sizeof (TYPE);
#
# But this succeeds if TYPE is a variable: you get the size of the
# variable's type!!!
@@ -133,7 +133,7 @@
#
# Also note that we use
#
-# if (sizeof (TYPE))
+# if (sizeof (TYPE))
#
# to `read' sizeof (to avoid warnings), while not depending on its type
# (not necessarily size_t etc.). Equally, instead of defining an unused
Index: lib/autotest/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autotest/general.m4,v
retrieving revision 1.202
diff -u -r1.202 general.m4
--- lib/autotest/general.m4 3 Apr 2006 04:47:02 -0000 1.202
+++ lib/autotest/general.m4 4 Apr 2006 22:41:04 -0000
@@ -388,16 +388,16 @@
m4_divert_push([PARSE_ARGS_END])dnl
*=*)
- at_envvar=`expr "x$at_option" : 'x\([[^=]]*\)='`
- # Reject names that are not valid shell variable names.
- expr "x$at_envvar" : "[.*[^_$as_cr_alnum]]" >/dev/null &&
- AS_ERROR([invalid variable name: $at_envvar])
- at_value=`echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$at_envvar='$at_value'"
- export $at_envvar
+ at_envvar=`expr "x$at_option" : 'x\([[^=]]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$at_envvar" : "[.*[^_$as_cr_alnum]]" >/dev/null &&
+ AS_ERROR([invalid variable name: $at_envvar])
+ at_value=`echo "$at_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$at_envvar='$at_value'"
+ export $at_envvar
# Propagate to debug scripts.
- at_debug_args="$at_debug_args $at_option"
- ;;
+ at_debug_args="$at_debug_args $at_option"
+ ;;
*) echo "$as_me: invalid option: $at_option" >&2
echo "Try \`$[0] --help' for more information." >&2
@@ -743,7 +743,7 @@
run. This means that test suite is improperly designed. Please
report this failure to <AT_PACKAGE_BUGREPORT>.
_ATEOF
- echo "$at_setup_line" >"$at_check_line_file"
+ echo "$at_setup_line" >"$at_check_line_file"
fi
at_group_count=`expr 1 + $at_group_count`
$at_verbose $ECHO_N "$at_group. $at_setup_line: $ECHO_C"
Index: tests/mktests.sh
===================================================================
RCS file: /cvsroot/autoconf/autoconf/tests/mktests.sh,v
retrieving revision 1.47
diff -u -r1.47 mktests.sh
--- tests/mktests.sh 3 Apr 2006 19:34:49 -0000 1.47
+++ tests/mktests.sh 4 Apr 2006 22:41:04 -0000
@@ -215,7 +215,7 @@
# Get rid of the macros we are not interested in.
cat $file |
sed -n -e 's/^AC_DEFUN(\[*\([a-zA-Z0-9_]*\).*$/\1/p' \
- -e 's/^AC_DEFUN_ONCE(\[*\([a-zA-Z0-9_]*\).*$/\1/p' |
+ -e 's/^AC_DEFUN_ONCE(\[*\([a-zA-Z0-9_]*\).*$/\1/p' |
sort |
uniq |
# Watch out we are `set -e': don't fail.
@@ -246,14 +246,14 @@
echo "# Modern macros."
for macro in `cat acdefuns`; do
if grep "$macro" requires >/dev/null 2>&1; then :; else
- echo "AT_CHECK_MACRO([$macro])"
+ echo "AT_CHECK_MACRO([$macro])"
fi
done
echo
echo "# Obsolete macros."
for macro in `cat audefuns`; do
if grep "$macro" requires >/dev/null 2>&1; then :; else
- echo "AT_CHECK_AU_MACRO([$macro])"
+ echo "AT_CHECK_AU_MACRO([$macro])"
fi
done
} >ac$base.tat
- maintainer checks,
Ralf Wildenhues <=