summaryrefslogtreecommitdiff
path: root/smart-configure.sh
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@xs4all.nl>2007-11-17 14:36:54 -0200
committerHan-Wen Nienhuys <hanwen@xs4all.nl>2007-11-17 14:36:54 -0200
commitdb3c701cff1bb7cfdc1128bc78e6058a622e23c1 (patch)
treefa8ea889675cb44c4c2b6bd2c60d40a43bcdeb76 /smart-configure.sh
parent095abc24e86c62a9ad06358ba9b0240d57326594 (diff)
Smart autogen and configure scripts, to clean up GUB builder.
Diffstat (limited to 'smart-configure.sh')
-rwxr-xr-xsmart-configure.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/smart-configure.sh b/smart-configure.sh
new file mode 100755
index 0000000000..fa27ed8462
--- /dev/null
+++ b/smart-configure.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+srcdir=${srcdir:-.}
+set -ux
+
+MAKEFILE_MD5=`find $srcdir -name GNUmakefile | grep -v '^./GNUmakefile$' | sort | md5sum | cut -b 1-32`
+CONFIGURE_INPUT_MD5=`cat $srcdir/config.make.in $srcdir/config.hh.in $srcdir/GNUmakefile.in | md5sum | cut -b 1-32`
+
+
+CONFIGURE_CHECKSUM_FILE=configure.checksum
+CONFIGURE_CHECKSUM="$MAKEFILE_MD5$CONFIGURE_INPUT_MD5"
+
+if test `cat $CONFIGURE_CHECKSUM_FILE` = "$CONFIGURE_CHECKSUM" ; then
+ exit 0
+fi
+
+set -e
+$srcdir/configure "$@"
+echo -n $CONFIGURE_CHECKSUM > $CONFIGURE_CHECKSUM_FILE
+
+
+
+