[systemd-commits] autogen.sh .gitignore

David Herrmann dvdhrm at kemper.freedesktop.org
Mon Nov 24 06:42:24 PST 2014


 .gitignore |    1 +
 autogen.sh |    4 ++++
 2 files changed, 5 insertions(+)

New commits:
commit 9a20fcbcd1b010ad88bfbb8b7f0417bec7327fb4
Author: David Herrmann <dh.herrmann at gmail.com>
Date:   Mon Nov 24 15:39:00 2014 +0100

    build-sys: support local ./configure arguments
    
    I often want to use the awesome "./autogen.sh [cmd]" arguments, but have
    to append some custom ./configure options. For now, I always had to edit
    autogen.sh manually, or copy the full commands out of it and run it
    myself.
    
    As I think this is super annoying, this commit adds support for
    ".config.args" files in $topdir. If it exists, any content is just
    appended to $args, thus to any ./configure invokation of autogen.sh.
    
    Maybe autotools provide something similar out-of-the-box. In that case,
    feel free to revert this and lemme know!

diff --git a/.gitignore b/.gitignore
index 2293ded..e5953d3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,7 @@
 *.swp
 *.trs
 *~
+.config.args
 .deps/
 .dirstamp
 .libs/
diff --git a/autogen.sh b/autogen.sh
index 0fc6e57..7b62449 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -50,6 +50,10 @@ args="\
 --libdir=$(libdir /usr/lib) \
 $gtkdocargs"
 
+if [ -f "$topdir/.config.args" ]; then
+        args="$args $(cat $topdir/.config.args)"
+fi
+
 if [ ! -L /bin ]; then
 args="$args \
 --with-rootprefix= \



More information about the systemd-commits mailing list