bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: gawk 3.1.0 DEFPATH problem


From: Aharon Robbins
Subject: Re: gawk 3.1.0 DEFPATH problem
Date: Sun, 7 Apr 2002 17:53:46 +0300

Greetings. Re this:

> Date: Fri, 5 Apr 2002 22:31:06 -0800 (PST)
> From: Tony Leneis <address@hidden>
> To: address@hidden
> Subject: gawk 3.1.0 DEFPATH problem
>
>       I just upgraded from gawk 3.0.3 to gawk 3.1.0 and discovered that
> the default for AWKPATH has changed.  It used to be
>
> .:/usr/local/share/awk
>
> but now it's
>
> .:/usr/local/share
>
> I suspect this is a bug, since 3.1.0 still includes a number of files in
> /usr/local/share/awk (most notably getopt.awk for me.)  I was able to solve
> the problem by changing the definition of DEFPATH in the Makefile from
>
> DEFPATH = "\".:$(datadir)\""
>
> to
>
> DEFPATH = "\".:$(datadir)/awk\""
>
> This was on a Tru64 4.0F system and the Makefile was generated by running
> configure without any options, if it makes a difference...
>
> -Tony

This is indeed a bug.  I'm mortified that I didn't notice this before 3.1.0 went
out the door.  Below is an unofficial patch to Makefile.am in the gawk dist that
should fix the problem.  You'll need to regenerate Makefile.in using automake 
1.5
(not 1.6!).

This also fixes the installation/deinstallation of pgawk to have a version-based
link as well.

Thanks,

Arnold
--------------- cut here -------------------------
Sun Apr  7 17:48:05 2002  Arnold D. Robbins  <address@hidden>

        * Makefile.am (DEFPATH): Use $(pkgdatadir).
        (libexecdir): Append `/awk' to value.
        (install-exec-hook): Also make version link for pgawk.
        (uninstall-links): Remove the version link for pgawk too.

diff -cr gawk-3.1.1/Makefile.am gawk-am/Makefile.am
*** gawk-3.1.1/Makefile.am      Thu Feb 21 10:34:21 2002
--- gawk-am/Makefile.am Sun Apr  7 17:44:43 2002
***************
*** 115,122 ****
  # Special stuff for OS/2, remove after switch to autoconf 2.5x
  PATH_SEPARATOR = @PATH_SEPARATOR@
  
! # stuff for compiling gawk/pgawk
! DEFPATH="\".$(PATH_SEPARATOR)$(datadir)\""
  
  DEFS= -DDEFPATH=$(DEFPATH) -DHAVE_CONFIG_H -DGAWK 
-DLOCALEDIR="\"$(datadir)/locale\""
  
--- 115,125 ----
  # Special stuff for OS/2, remove after switch to autoconf 2.5x
  PATH_SEPARATOR = @PATH_SEPARATOR@
  
! # Set autoconf Makefile.in variables correctly
! libexecdir = @libexecdir@/awk
! 
! # stuff for compiling gawk/pgawk, note use of pkgdatadir
! DEFPATH="\".$(PATH_SEPARATOR)$(pkgdatadir)\""
  
  DEFS= -DDEFPATH=$(DEFPATH) -DHAVE_CONFIG_H -DGAWK 
-DLOCALEDIR="\"$(datadir)/locale\""
  
***************
*** 126,136 ****
--- 129,141 ----
  LN= ln
  
  # First, add a link from gawk to gawk-X.Y.Z
+ # Same for pgawk
  # For systems where gawk is awk, add a link to awk
  install-exec-hook:
        (fullname=gawk-`./gawk --version | sed 1q | awk '{print $$3}'` ; \
        cd $(DESTDIR)$(bindir); \
        $(LN) gawk $$fullname ; \
+       $(LN) pgawk p$$fullname ; \
        if [ ! -f awk ]; \
        then    $(LN_S) gawk awk; \
        fi; exit 0)
***************
*** 140,146 ****
        (cd $(DESTDIR)$(bindir); \
        if [ -f awk ] && cmp awk gawk > /dev/null; then rm -f awk; fi ; \
        fullname=gawk-`./gawk --version | sed 1q | ./gawk '{print $$3}'` ; \
!       rm -f $$fullname; exit 0)
  
  uninstall-recursive: uninstall-links
  
--- 145,151 ----
        (cd $(DESTDIR)$(bindir); \
        if [ -f awk ] && cmp awk gawk > /dev/null; then rm -f awk; fi ; \
        fullname=gawk-`./gawk --version | sed 1q | ./gawk '{print $$3}'` ; \
!       rm -f $$fullname p$$fullname; exit 0)
  
  uninstall-recursive: uninstall-links
  



reply via email to

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