automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: proposed change for depout.m4


From: Jim Meyering
Subject: Re: proposed change for depout.m4
Date: Sun, 17 Feb 2002 22:32:56 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.2.50 (i686-pc-linux-gnu)

Alexandre Duret-Lutz <address@hidden> wrote:

> On Sun, Feb 17, 2002 at 08:35:31PM +0100, Jim Meyering wrote:
>>
>>      * m4/depout.m4: Don't use `head -1'; it's no longer portable.
>>      Use `sed 1q' instead.
>>
>
> Hi Jim!  Could you adjust tests/cond12.test and
> tests/insthook.test similarly?

Sure.  Thanks!
Here are the additional changes I expect to check in tomorrow.

        * tests/cond12.test: Use sed 1q, not `head -n 1'.
        The latter is not portable to some old systems.
        * m4/depout.m4: Don't use `head -1'; it's no longer portable.
        Use `sed 1q' instead.
        * tests/insthook.test: Likewise.

Index: tests/cond12.test
===================================================================
RCS file: /cvs/automake/automake/tests/cond12.test,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 cond12.test
--- cond12.test 2001/07/01 22:51:38     1.1
+++ cond12.test 2002/02/17 21:31:41
@@ -9,7 +9,7 @@
 # FIXME: probably ought to let use override this like we do in `defs'.
 amfile=../../automake
 
-head -n 1 $amfile >>automake_tmp
+sed 1q $amfile >>automake_tmp
 cat << 'END' >> automake_tmp
 my $failed = 0;
 sub check_reduce($$) {
@@ -17,7 +17,7 @@ sub check_reduce($$) {
  my @result = sort &Automake::variable_conditions_reduce(@$inref);
  my $correct = 1;
  $correct = 0 if (join(",", @result) ne join(",", @$outref));
- 
+
  if (! $correct) {
    print '"'.join(",", @$inref) . '" => "' .
         join(",", @result) . '" expected "' .
Index: tests/insthook.test
===================================================================
RCS file: /cvs/automake/automake/tests/insthook.test,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 insthook.test
--- insthook.test       2001/10/20 11:17:17     1.4
+++ insthook.test       2002/02/17 21:31:41
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]