2012-11-27 16:02:59 -06:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
|
|
# RUN ME after pulling the code from git!
|
2013-02-03 14:49:03 -06:00
|
|
|
#
|
|
|
|
|
# This script is handy after pulling the code out of git without having
|
|
|
|
|
# to remember all the typing needed to build up and tear down all the
|
|
|
|
|
# crap that autotools puts in your source repo. The intent is to keep
|
|
|
|
|
# all generated files out of git.
|
|
|
|
|
|
2012-11-27 16:02:59 -06:00
|
|
|
if [ "clean" == "$1" ]; then
|
2012-11-28 01:08:23 -06:00
|
|
|
make distclean || echo "continuing..."
|
2014-04-16 18:42:36 -05:00
|
|
|
find config/m4 -type f \( -name libtool\* -o -name lt\* \) | xargs rm -f
|
2015-07-24 23:25:55 -07:00
|
|
|
find config -name m4 -prune \
|
|
|
|
|
-o -name .gitignore -prune \
|
|
|
|
|
-o -type f -print | xargs rm -f
|
|
|
|
|
rm -rf autom4te.cache
|
|
|
|
|
rm -f Makefile.in aclocal.m4 configure
|
2012-11-28 01:08:23 -06:00
|
|
|
elif [ "superclean" == "$1" ]; then
|
2013-02-03 14:49:03 -06:00
|
|
|
# if autoconf errors during distcheck, it leaves files that need chmod'ing
|
2013-12-31 17:15:44 -06:00
|
|
|
ver=$(scripts/version|tr -d '\n')
|
2012-11-28 01:08:23 -06:00
|
|
|
if [ "x${ver}" != "x" ]; then
|
|
|
|
|
if [ -d jq-${ver} ]; then
|
|
|
|
|
chmod -R u+w jq-${ver}
|
|
|
|
|
rm -rf jq-${ver}
|
|
|
|
|
fi
|
2012-12-04 19:50:10 -06:00
|
|
|
rm -f jq-${ver}*
|
2012-11-28 01:08:23 -06:00
|
|
|
fi
|
2012-11-27 16:02:59 -06:00
|
|
|
else
|
|
|
|
|
autoreconf --install
|
2015-07-24 23:25:55 -07:00
|
|
|
./configure --disable-valgrind
|
|
|
|
|
make -j8
|
|
|
|
|
make check -j4
|
2012-11-27 16:02:59 -06:00
|
|
|
fi
|