Does anyone know of a system for which `head -n1' doesn't work
the same as the traditional `head -1'?

The latter doesn't conform to POSIX 1003.1-2001.

Without this patch, dependencies don't work when
using `head' from the next test release of the GNU textutils
and with the `conform-to-latest-POSIX' switch set (via e.g.,
export _POSIX2_VERSION=200112).

I'll check it in if I don't hear anything by tomorrow.

Index: m4/depout.m4
===================================================================
RCS file: /cvs/automake/automake/m4/depout.m4,v
retrieving revision 1.10
diff -u -p -u -p -r1.10 depout.m4
--- depout.m4   2001/12/30 20:29:14     1.10
+++ depout.m4   2002/02/17 17:14:58
@@ -25,7 +25,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS
 [for mf in $CONFIG_FILES; do
   # Strip MF so we end up with the name of the file.
   mf=`echo "$mf" | sed -e 's/:.*$//'`
-  if (head -1 $mf | fgrep 'generated by automake') > /dev/null 2>&1; then
+  if (head -n1 $mf | fgrep 'generated by automake') > /dev/null 2>&1; then
     dirpart=`AS_DIRNAME("$mf")`
   else
     dirpart=

Reply via email to