[PATCH modular 1/8] build.sh: expose the PREFIX variable for the user to set

Gaetan Nadon memsize at videotron.ca
Wed Dec 22 06:34:39 PST 2010


On Tue, 2010-12-21 at 23:42 -0500, Trevor Woerner wrote:

> I'm just wondering how you would update the wiki page to describe how
> to use the script?: "...currently the build.sh script requires 1
> argument to be supplied on the cmdline, unless PREFIX is already
> defined in the environment in which case you must not provide the
> required argument because it would be supplied twice which causes the
> script to fail."? 

My understanding of the current code is that PREFIX was never a
published variable
and could not be used to replace the the last parameter

In this section:
HAVE_ARCH="`uname -i`"

DIR_ARCH=""
DIR_CONFIG="."
LIB_ONLY=0
PREFIX=""

PREFIX is always blanked out. This is in part what motivated me to do the patch.

> In other words, after applying this patch the usage
> becomes confusing since the prefix can't be supplied twice.

It is very common to have a command line backed-up by an env variable.

Tom Fogal:

        Yes; IMHO it's always nice for an option to be backed by an env var.



> 
> Also, this patch implies that the default PREFIX is /usr/local, which
> sort of implies the user doesn't need to provide it. But if the user
> doesn't supply a prefix or it isn't defined in the environment then
> the script fails. If the user does provide the prefix (either on the
> cmdline or in the environment (but not both!)) then it is whatever the
> user provides, not necessarily /usr/local.

Correct. So I should not claim there is a default value then because it
is mandatory.

I was contemplating another patch where PREFIX would not be mandatory
and set /usr/local
by default. This is what the autoconf does. That would be much more
consistent with everything.
What do you think?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20101222/f101d39d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20101222/f101d39d/attachment.pgp>


More information about the xorg-devel mailing list