build: Add autogen.sh convenience script

Submitted by Christophe de Dinechin on Feb. 16, 2018, 3:18 p.m.

Details

Message ID 20180216151819.24771-1-christophe@dinechin.org
State New
Headers show
Series "build: Add autogen.sh convenience script" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Christophe de Dinechin Feb. 16, 2018, 3:18 p.m.
From: Christophe de Dinechin <dinechin@redhat.com>

Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
---
 autogen.sh | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100755 autogen.sh

Patch hide | download patch | download mbox

diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..afa3e39
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,9 @@ 
+#!/bin/sh
+
+set -e # exit on errors
+
+autoreconf --verbose --force --install
+
+if [ -z "$NOCONFIGURE" ]; then
+    ./configure ${1+"$@"}
+fi

Comments

On Fri, Feb 16, 2018 at 04:18:19PM +0100, Christophe de Dinechin wrote:
> From: Christophe de Dinechin <dinechin@redhat.com>
> 
> Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
> ---
>  autogen.sh | 9 +++++++++
>  1 file changed, 9 insertions(+)
>  create mode 100755 autogen.sh
> 
> diff --git a/autogen.sh b/autogen.sh
> new file mode 100755
> index 0000000..afa3e39
> --- /dev/null
> +++ b/autogen.sh

This assumes you're running autogen.sh from the source tree. Many folks
prefer todo a vpath builds, so it might be invoked from outside the
source tree like

   mkdir build
   cd build
   ../autogen.sh

> @@ -0,0 +1,9 @@
> +#!/bin/sh
> +
> +set -e # exit on errors

srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.

THEDIR=`pwd`
cd $srcdir

> +
> +autoreconf --verbose --force --install

cd $THEDIR

> +
> +if [ -z "$NOCONFIGURE" ]; then
> +    ./configure ${1+"$@"}

$srcdir/configure ....

> +fi

would make it cope with VPATH builds.

Regards,
Daniel
Hey,

I sent
https://lists.freedesktop.org/archives/spice-devel/2018-March/042479.html
(which is based on spice-gtk's autogen.sh) which should address the
issues below.

Christophe

On Fri, Feb 16, 2018 at 03:28:41PM +0000, Daniel P. Berrangé wrote:
> On Fri, Feb 16, 2018 at 04:18:19PM +0100, Christophe de Dinechin wrote:
> > From: Christophe de Dinechin <dinechin@redhat.com>
> > 
> > Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
> > ---
> >  autogen.sh | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> >  create mode 100755 autogen.sh
> > 
> > diff --git a/autogen.sh b/autogen.sh
> > new file mode 100755
> > index 0000000..afa3e39
> > --- /dev/null
> > +++ b/autogen.sh
> 
> This assumes you're running autogen.sh from the source tree. Many folks
> prefer todo a vpath builds, so it might be invoked from outside the
> source tree like
> 
>    mkdir build
>    cd build
>    ../autogen.sh
> 
> > @@ -0,0 +1,9 @@
> > +#!/bin/sh
> > +
> > +set -e # exit on errors
> 
> srcdir=`dirname $0`
> test -z "$srcdir" && srcdir=.
> 
> THEDIR=`pwd`
> cd $srcdir
> 
> > +
> > +autoreconf --verbose --force --install
> 
> cd $THEDIR
> 
> > +
> > +if [ -z "$NOCONFIGURE" ]; then
> > +    ./configure ${1+"$@"}
> 
> $srcdir/configure ....
> 
> > +fi
> 
> would make it cope with VPATH builds.
> 
> Regards,
> Daniel
> -- 
> |: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-            https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
> On 1 Mar 2018, at 16:42, Christophe Fergeau <cfergeau@redhat.com> wrote:
> 
> Hey,
> 
> I sent
> https://lists.freedesktop.org/archives/spice-devel/2018-March/042479.html
> (which is based on spice-gtk's autogen.sh) which should address the
> issues below.

Will ack there.

> 
> Christophe
> 
> On Fri, Feb 16, 2018 at 03:28:41PM +0000, Daniel P. Berrangé wrote:
>> On Fri, Feb 16, 2018 at 04:18:19PM +0100, Christophe de Dinechin wrote:
>>> From: Christophe de Dinechin <dinechin@redhat.com>
>>> 
>>> Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
>>> ---
>>> autogen.sh | 9 +++++++++
>>> 1 file changed, 9 insertions(+)
>>> create mode 100755 autogen.sh
>>> 
>>> diff --git a/autogen.sh b/autogen.sh
>>> new file mode 100755
>>> index 0000000..afa3e39
>>> --- /dev/null
>>> +++ b/autogen.sh
>> 
>> This assumes you're running autogen.sh from the source tree. Many folks
>> prefer todo a vpath builds, so it might be invoked from outside the
>> source tree like
>> 
>>   mkdir build
>>   cd build
>>   ../autogen.sh
>> 
>>> @@ -0,0 +1,9 @@
>>> +#!/bin/sh
>>> +
>>> +set -e # exit on errors
>> 
>> srcdir=`dirname $0`
>> test -z "$srcdir" && srcdir=.
>> 
>> THEDIR=`pwd`
>> cd $srcdir
>> 
>>> +
>>> +autoreconf --verbose --force --install
>> 
>> cd $THEDIR
>> 
>>> +
>>> +if [ -z "$NOCONFIGURE" ]; then
>>> +    ./configure ${1+"$@"}
>> 
>> $srcdir/configure ....
>> 
>>> +fi
>> 
>> would make it cope with VPATH builds.
>> 
>> Regards,
>> Daniel
>> -- 
>> |: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
>> |: https://libvirt.org         -o-            https://fstop138.berrange.com :|
>> |: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
>> _______________________________________________
>> Spice-devel mailing list
>> Spice-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/spice-devel