]> git.donarmstrong.com Git - lilypond.git/commitdiff
Smart autogen and configure scripts, to clean up GUB builder.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 17 Nov 2007 16:36:54 +0000 (14:36 -0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 17 Nov 2007 16:36:54 +0000 (14:36 -0200)
smart-autogen.sh [new file with mode: 0755]
smart-configure.sh [new file with mode: 0755]

diff --git a/smart-autogen.sh b/smart-autogen.sh
new file mode 100755 (executable)
index 0000000..3f93243
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+srcdir=${srcdir:-.}
+set -ux
+
+AUTOGEN_INPUT_CHECKSUM=`cat $srcdir/configure.in $srcdir/stepmake/aclocal.m4 | md5sum | cut -b 1-32`
+
+CHECKSUM_FILE=autogen.checksum
+
+if test `cat $CHECKSUM_FILE`"" = "$AUTOGEN_INPUT_CHECKSUM"; then
+  exit 0
+fi
+
+set -e
+./autogen.sh
+echo -n $AUTOGEN_INPUT_CHECKSUM > $CHECKSUM_FILE 
+
+
diff --git a/smart-configure.sh b/smart-configure.sh
new file mode 100755 (executable)
index 0000000..fa27ed8
--- /dev/null
@@ -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
+
+
+
+