[PATCH modular 2/8] build.sh: add support for EPREFIX for architecture-dependent files

Gaetan Nadon memsize at videotron.ca
Sat Dec 18 08:14:49 PST 2010


On Thu, 2010-12-16 at 22:48 -0500, Trevor Woerner wrote:

> On Thu, Dec 16, 2010 at 9:31 PM, Gaetan Nadon <memsize at videotron.ca> wrote:
> > ---
> >  build.sh |   37 ++++++++++++++++++++++++++-----------
> >  1 files changed, 26 insertions(+), 11 deletions(-)
> >
> > diff --git a/build.sh b/build.sh
> > index 4979fc0..80452d3 100755
> > --- a/build.sh
> > +++ b/build.sh
> > @@ -356,12 +358,15 @@ process() {
> >
> >     LIB_FLAGS=
> >     if [ X"$LIBDIR" != X ]; then
> > -       LIB_FLAGS="--libdir=${PREFIX}/${LIBDIR}"
> > +       LIB_FLAGS="--libdir=${EPREFIX}/${LIBDIR}"
> >     fi
> >
> >     # Use "sh autogen.sh" since some scripts are not executable in CVS
> >     if [ $needs_config -eq 1 ] || [ X"$NOAUTOGEN" = X ]; then
> > -       sh ${DIR_CONFIG}/${CONFCMD} --prefix=${PREFIX} ${LIB_FLAGS} \
> > +       sh ${DIR_CONFIG}/${CONFCMD} \
> > +           --prefix=${PREFIX} \
> > +           ${EPREFIX_SET:+--exec-prefix="$EPREFIX"} \
> > +           ${LIB_FLAGS} \
> >            ${QUIET:+--quiet} \
> >            ${CONFFLAGS} \
> >            ${CC:+CC="$CC"} \
> 
> Instead of doing all the "EPREFIX_SET" stuff, couldn't we just do:
> 
>  +           ${EPREFIX:+--exec-prefix="$EPREFIX"} \
> 
> and leave off the rest of this patch? We don't really need another
> variable whose defined or undefined state lets us know whether EPREFIX
> is defined or not :-)


That's what I first thought, then I realized the difference between
$PREFIX and the other ones. $PREFIX is a mandatory variable while the
others are not. We need the value from EPREFIX to compute the default
values for other variables, but we don't want to emit a command line
with --exec-prefix on each module.

I did not want to invoke each module with a long list of --what-have-you
when they are all default values. In fact, I was thinking that perhaps
we should not make PREFIX mandatory. The configure script has a default
value usr/local when none supplied. That a separate question of course.

Currently, all modules are invoked with --libdir even when the default
value is used, and that's bugging me. The user should be able to switch
back and forth between build.sh and configure for a particular module
and not see a different config.log which would trigger an investigation.
How does he know it is equivalent and not a script bug.

Thanks
Gaetan




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20101218/cdb1bcbb/attachment.html>
-------------- 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/20101218/cdb1bcbb/attachment.pgp>


More information about the xorg-devel mailing list