From: Jim Meyering Date: Mon, 18 Feb 2002 15:52:46 +0000 (+0000) Subject: Don't use `head -1'; it's no longer portable. X-Git-Tag: v1.10.2~1441 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be3875fe0f0e776c3eda15eeda5b401bd718feae;p=platform%2Fupstream%2Fautomake.git Don't use `head -1'; it's no longer portable. Use `sed 1q' instead. --- diff --git a/m4/depout.m4 b/m4/depout.m4 index bb45738..4ab715a 100644 --- a/m4/depout.m4 +++ b/m4/depout.m4 @@ -1,6 +1,6 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright 1999, 2000, 2001 Free Software Foundation, Inc. +# Copyright 1999, 2000, 2001, 2002 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 @@ -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 (sed 1q $mf | fgrep 'generated by automake') > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else dirpart= diff --git a/tests/insthook.test b/tests/insthook.test index 7950bb2..c12376b 100755 --- a/tests/insthook.test +++ b/tests/insthook.test @@ -15,4 +15,4 @@ $AUTOMAKE || exit 1 test "`grep install-exec-hook Makefile.in | wc -l`" -gt 1 || exit 1 lnum=`grep -n '^install-exec-am:' Makefile.in | awk -F: '{print $1}'` -test x$lnum != x && tail +$lnum Makefile.in | head -3 | grep install-exec-hook +test x$lnum != x && tail +$lnum Makefile.in | sed 3q | grep install-exec-hook