[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 02-lineno.patch
From: |
Raja R Harinath |
Subject: |
Re: 02-lineno.patch |
Date: |
Wed, 03 Oct 2001 12:31:55 -0500 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.105 |
Hi,
Akim Demaille <address@hidden> writes:
[snip]
> 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?
>
> Thanks!
>
> 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 }
^^^^^^
Seems OK on Solaris 2.6, except for the line number. I tested it with
both /bin/awk and gawk. Both of them produced configure.lineno with
line numbers one too big. Why the NR+1 instead of plain NR?
- Hari
--
Raja R Harinath ------------------------------ address@hidden
"When all else fails, read the instructions." -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing." -- Roy L Ash