<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.26.0">
</HEAD>
<BODY>
On Thu, 2010-12-16 at 22:48 -0500, Trevor Woerner wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
On Thu, Dec 16, 2010 at 9:31 PM, Gaetan Nadon <<A HREF="mailto:memsize@videotron.ca">memsize@videotron.ca</A>> 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 :-)
</PRE>
</BLOCKQUOTE>
<BR>
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.<BR>
<BR>
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.<BR>
<BR>
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.<BR>
<BR>
Thanks<BR>
Gaetan<BR>
<BR>
<BR>
<BR>
<BR>
</BODY>
</HTML>