maintcheck: fix spurious warnings
authorStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 13 Aug 2012 16:00:57 +0000 (18:00 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 13 Aug 2012 16:00:57 +0000 (18:00 +0200)
* t/distcheck-override-infodir.sh: Be sure that valid occurences
of the "aclocal" and "automake" strings, which can confuse the
'sc_tests_plain_automake' check, are protected by leading "#"
characters.
* t/ax/test-lib.sh: Always use '$(...)' for command subtitution,
to avoid triggering the 'sc_tests_command_subst' check; there was
still once place where `...` was used.  While at it, fix a related
comment.
* t/ax/test-defs.in ($sleep): Use creative quoting to avoid
spuriously triggering the 'sc_tests_plain_sleep' check.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
t/ax/test-defs.in
t/ax/test-lib.sh
t/distcheck-override-infodir.sh

index 56b45e1..dbfe827 100644 (file)
@@ -165,7 +165,9 @@ TEX=${AM_TESTSUITE_TEX-'@TEX@'}
 # The amount we should wait after modifying files depends on the platform.
 # For instance, Windows '95, '98 and ME have 2-second granularity
 # and can be up to 3 seconds in the future w.r.t. the system clock.
-sleep='sleep @MODIFICATION_DELAY@'
+# The creative quoting is to avoid spuriously triggering a failure in
+# the maintainer checks,
+sleep='sleep ''@MODIFICATION_DELAY@'
 
 # An old timestamp that can be given to a file, in "touch -t" format.
 # The time stamp should be portable to all file systems of interest.
index 6048f81..71c2e49 100644 (file)
@@ -51,9 +51,11 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   }
 else
   argv0=$0
-  # Avoid command substitution failure, for it might cause problems with
-  # "set -e" on some shells.
-  case `(set -o) 2>/dev/null || :` in *posix*) set -o posix;; esac
+  # Ignore command substitution failure, for it might cause problems
+  # with "set -e" on some shells.
+  am_shell_opts=$(set -o) || :
+  case $am_shell_opts in *posix*) set -o posix;; esac
+  unset am_shell_opts
 fi
 
 # A single whitespace character.
index ff792f7..74f6c67 100755 (executable)
@@ -38,29 +38,30 @@ installcheck-local:
        fi
 END
 
-cat > main.texi << 'END'
-\input texinfo
-@setfilename main.info
-@settitle main
-
-@c Explicit calls to @dircategory and @direntry required to ensure that
-@c a 'dir' file will be created also by older versions of 'install-info'
-@c (e.g., the one coming with Texinfo 4.8).
-
-@dircategory Software development
-@direntry
-* Automake: (automake).  Making GNU standards-compliant Makefiles
-@end direntry
-
-@dircategory Individual utilities
-@direntry
-* aclocal-invocation: (automake)aclocal Invocation.   Generating aclocal.m4
-* automake-invocation: (automake)automake Invocation. Generating Makefile.in
-@end direntry
-
-@node Top
-Hello walls.
-@bye
+# Protect with leading " # " to avoid spurious maintainer-check failures.
+sed 's/^ #//' > main.texi << 'END'
+ # \input texinfo
+ # @setfilename main.info
+ # @settitle main
+ #
+ # @c Explicit calls to @dircategory and @direntry required to ensure that
+ # @c a 'dir' file will be created also by older versions of 'install-info'
+ # @c (e.g., the one coming with Texinfo 4.8).
+ #
+ # @dircategory Software development
+ # @direntry
+ # * Automake: (automake).  Making GNU standards-compliant Makefiles
+ # @end direntry
+ #
+ # @dircategory Individual utilities
+ # @direntry
+ # * aclocal-invocation: (automake)aclocal Invocation.   Generating aclocal.m4
+ # * automake-invocation: (automake)automake Invocation. Generating Makefile.in
+ # @end direntry
+ #
+ # @node Top
+ # Hello walls.
+ # @bye
 END
 
 $ACLOCAL