bug-automake
[Top][All Lists]
Advanced

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

automake depcomp portability problem with "tail +3"


From: Paul Eggert
Subject: automake depcomp portability problem with "tail +3"
Date: Mon, 18 Feb 2002 23:19:48 -0800 (PST)

Automake's "depcomp" shell script uses the command "tail +3", but the
new POSIX standard (POSIX 1003.1-2001) no longer allows "tail +3",
and I'm now using an experimental version of "tail" that is picky....

The command "sed '1,2d'" is more portable, so here is a proposed
patch.

2002-02-18  Paul Eggert  <address@hidden>

        * lib/depcomp: Don't use "tail +3"; it's not portable to
        POSIX 1003.1-2001 hosts.

--- lib/depcomp Mon Feb 18 23:11:17 2002
+++ lib/depcomp-fix     Mon Feb 18 23:13:25 2002
@@ -324,7 +324,7 @@ makedepend)
   if test "$stat" != 0; then exit $stat; fi
   rm -f "$depfile"
   cat < "$tmpdepfile" > "$depfile"
-  tail +3 "$tmpdepfile" | tr ' ' '
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
 ' | \
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.



reply via email to

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