chiark / gitweb /
build-sys: support local ./configure arguments
authorDavid Herrmann <dh.herrmann@gmail.com>
Mon, 24 Nov 2014 14:39:00 +0000 (15:39 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Mon, 24 Nov 2014 14:39:00 +0000 (15:39 +0100)
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!

.gitignore
autogen.sh

index 2293dedd8e98eb0f5bba02bfd69e77cfffcb527f..e5953d3086f88c055be2201f1916b9b1df98ca67 100644 (file)
@@ -11,6 +11,7 @@
 *.swp
 *.trs
 *~
 *.swp
 *.trs
 *~
+.config.args
 .deps/
 .dirstamp
 .libs/
 .deps/
 .dirstamp
 .libs/
index 0fc6e57027af85d111f0067be49932b5e8feb8f3..7b62449be81f4b0faac508bb9692695ee804d9fd 100755 (executable)
@@ -50,6 +50,10 @@ args="\
 --libdir=$(libdir /usr/lib) \
 $gtkdocargs"
 
 --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= \
 if [ ! -L /bin ]; then
 args="$args \
 --with-rootprefix= \