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?



Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to