[Top][All Lists]

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

Re: AWKPATH and AWKLIBPATH: default values different from documentation

From: Jeffrey Walton
Subject: Re: AWKPATH and AWKLIBPATH: default values different from documentation (gawk 5.0.1)
Date: Mon, 2 Mar 2020 23:18:07 -0500

On Sun, Feb 23, 2020 at 9:56 AM Andrew J. Schorr
<address@hidden> wrote:
> On Sun, Feb 23, 2020 at 12:39:42PM +0100, Jannick wrote:
> > I think the usual way is - as you point out - that prefix is set once at
> > configure-time: either explicitly on the command line or CONFIG_SITE does it
> > for you or configure sets the default value '/usr/local' if no one does it.
> > In this case everything is consistent. Running ./configure -h shows you the
> > values ./configure uses if prefix is not given on the command line.  What I
> > am trying to say is that prefix as at configure-time COULD be overridden in
> > the two steps afterwards (make && make install - if you wish to split them
> > up):
> > - make prefix=/path1 ... compiles AWKPATH and AWKLIBPATH into gawk using
> > path1
> OK, yes, you could also change prefix at the make stage, although it's
> not clear to me why that's appealing. In general, the directory scheme
> is designed so that the locations referenced by AWKPATH and AWKLIBPATH
> should make sense relative to where the binaries are installed.
> > - make install DESTDIR=/destdir prefix=/path2 ... sets the parent directory
> > of the bin directory gawk will be installed into
> I think that's too late. At this point, the default AWKPATH and AWKLIBPATH
> values have already been compiled into the gawk binary. You can certainly
> choose to install it wherever you want, but that won't change the default
> environment variable values. And gawk will not then be able to find the
> bundled libraries and program files properly.

Also keep in mind the make install recipe is not supposed to build
anything. From 

If possible, write the install target rule so that it does not modify
anything in the directory where the program was built, provided ‘make
all’ has just been done. This is convenient for building the program
under one user name and installing it under another.

It is incredibly annoying when we have to 'sudo rm -rf <dir>' because
someone is building during 'sudo make install'.


reply via email to

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