summaryrefslogtreecommitdiffstats
path: root/tools/config-gen
diff options
context:
space:
mode:
authorKarel Zak2011-11-04 12:12:20 +0100
committerKarel Zak2011-11-04 20:56:06 +0100
commit9221fb85f6f5dc97d5a4810c2e87e8882fa85f02 (patch)
tree0e0d7ea68817763eb2b4d7fd0ac54486be1f5818 /tools/config-gen
parentbuild-sys: fix UL_INIT_BUILD macro (diff)
downloadkernel-qcow2-util-linux-9221fb85f6f5dc97d5a4810c2e87e8882fa85f02.tar.gz
kernel-qcow2-util-linux-9221fb85f6f5dc97d5a4810c2e87e8882fa85f02.tar.xz
kernel-qcow2-util-linux-9221fb85f6f5dc97d5a4810c2e87e8882fa85f02.zip
build-sys: add tools/config-gen and basic compilation scenarios
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tools/config-gen')
-rwxr-xr-xtools/config-gen31
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/config-gen b/tools/config-gen
new file mode 100755
index 000000000..441e5a465
--- /dev/null
+++ b/tools/config-gen
@@ -0,0 +1,31 @@
+#!/bin/bash
+#
+# Copyright (C) 2011 Karel Zak <kzak@redhat.com>
+#
+
+test -f mount/mount.c || {
+ echo
+ echo "You must run this script in the top-level util-linux directory"
+ echo
+ exit 1
+}
+
+. tools/config-gen-functions.sh
+
+while [ -n "$1" ]; do
+ opts="$opts $(ul_get_configuration tools/config-gen.d/$1.conf)"
+ shift
+done
+
+opts=$(echo $opts | tr " " "\n" | sort -u)
+echo "Configure options:"
+for x in $opts; do
+ echo " $x"
+done
+if [ -n "$CFLAGS" ]; then
+ echo "CFLAGS: $CFLAGS"
+ export CFLAGS="$CFLAGS"
+fi
+
+echo
+./configure $opts