[Top][All Lists]

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

Re: 02-lineno.patch

From: Akim Demaille
Subject: Re: 02-lineno.patch
Date: 03 Oct 2001 10:47:21 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence)

>>>>> "Raja" == Raja R Harinath <Raja> writes:

Raja> The patch you applied uses

Raja>   source ./$as_me.lineno

Raja> Solaris /bin/sh isn't happy with that.

Hm, still learning everyday....  I made this decision based on actual
material saying source was somewhat better for this, but after, that's
one more thing to add the doc (which Paul did).

Raja>   ../../configure: source: not found

Raja> I'm afraid you'll have to use '.'.

That's already done, but there is also an AWK portability issue.  I
will install the patch below some time today, together with a test.
In the meanwhile, may I ask you to give a try to the protopatch?


Index: lib/m4sugar/m4sh.m4
RCS file: /cvs/autoconf/lib/m4sugar/m4sh.m4,v
retrieving revision 1.53
diff -u -u -r1.53 m4sh.m4
--- lib/m4sugar/m4sh.m4 2001/10/02 23:14:30 1.53
+++ lib/m4sugar/m4sh.m4 2001/10/03 08:28:09
@@ -143,12 +143,12 @@
                 != x$as_me.lineno; then
      # Be sure to write the pattern so that it doesn't replace itself:
      # it must not match itself.
-     awk '{
-            if ($[0] ~ /[[$]]LINENO/)
-              while (sub (/[[$]]LINENO/, NR))
-                continue
-            print
-          }' <$as_myself >$as_me.lineno
+     awk <$as_myself '
+           /[[$]]LINENO/ { printf "%d:", NR + 1 }
+                         { print }
+         ' |
+       sed ['/[$]LINENO/s/^\([0-9][0-9]*\):\(.*\)[$]LINENO/\2\1/'] \
+         >$as_me.lineno
     chmod +x $as_me.lineno

reply via email to

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