]> git.donarmstrong.com Git - lilypond.git/blobdiff - smart-autogen.sh
Smart autogen and configure scripts, to clean up GUB builder.
[lilypond.git] / smart-autogen.sh
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 
+
+