simplify restack()
[awesome.git] / autogen.sh
blobde5d14eba951e4dadbf5cf5186c36a58be9b40d6
1 #!/bin/sh
3 # Change to source tree
4 srcdir=`dirname "$0"`
5 [ -z "$srcdir" ] || cd "$srcdir"
7 # sed program
8 SED=${SED-sed}
10 # Check whether the version needs to be updated from VCS/version-stamp
11 if [ -d ".git" ] && [ -d "autom4te.cache" ]; then
12 git_describe=`./build-utils/package-version . version-stamp`
13 for f in autom4te.cache/output.*; do
14 [ -f "$f" ] || continue
15 pkg_ver=`${SED} -n "s/^PACKAGE_VERSION='\(.*\)'\$/\1/p" "$f"`
16 if [ "x$pkg_ver" = "x$git_describe" ]
17 then :
18 else
19 echo "Cleaning out autom4te.cache (${pkg_ver} -> ${git_describe})"
20 rm -rf "autom4te.cache"
21 break
23 done
26 echo "Generating configure files... may take a while."
28 autoreconf --install --force && \
29 echo "Preparing was successful if there was no error messages above." && \
30 echo "Now type:" && \
31 echo " ./configure && make" && \
32 echo "Run './configure --help' for more information"