summaryrefslogtreecommitdiff
path: root/smart-autogen.sh
blob: 6f4525dac19da80fea2617d4872e640ee2c9953b (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

srcdir=${srcdir:-.}
set -ux

AUTOGEN_INPUT_CHECKSUM=`cat $srcdir/configure.ac $srcdir/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
${srcdir}/autogen.sh "$@"
printf "%s" $AUTOGEN_INPUT_CHECKSUM > $CHECKSUM_FILE