[Sugar-devel] [PATCH sugar] Allow to build outside the source directory

James Cameron quozl at laptop.org
Wed Jun 27 04:53:43 EDT 2012


On Wed, Jun 27, 2012 at 10:45:13AM +0200, Daniel Narvaez wrote:
> On 27 June 2012 02:42, James Cameron <quozl at laptop.org> wrote:
> >> diff --git a/autogen.sh b/autogen.sh
> >> index a71e202..bac5247 100755
> >> --- a/autogen.sh
> >> +++ b/autogen.sh
> >> @@ -1,4 +1,13 @@
> >> ?#!/bin/sh
> >> +
> >> +test -n "${srcdir}" || srcdir=`dirname "$0"`
> >> +test -n "${srcdir}" || srcdir="$(pwd)"
> >
> > I don't quite understand the intent here. ?The dirname should always
> > succeed.
> 
> I'm not sure exactly why but this is present, in one form or another,
> in all the autogen.sh script I checked on git.gnome.org and
> freedesktop
> 
> The most common form is really
> 
> srcdir=`dirname $0`
> test -z "$srcdir" && srcdir=.
> 
> Maybe be they are trying to account for systems that doesn't have
> dirname? Or maybe dirname on some systems returns empty instead of .?
> 
> I don't have a strong feeling here but I'm tempted to go with the
> commonly used pattern. It won't hurt and if we find out later there
> was a good reason for it, it will be a bunch of scripts to update.

Okay, I see your point.

Each of your autogen.sh patches that do this therefore:

Reviewed-by: James Cameron <quozl at laptop.org>

-- 
James Cameron
http://quozl.linux.org.au/


More information about the Sugar-devel mailing list