Merge pull request #380 from felixbuenemann/improve-bootstrap-sh

bootstrap.sh: Better doc pruning / support acdir dirlists
This commit is contained in:
John Cupitt 2016-02-09 16:34:06 +00:00
commit a739ba9ca2
1 changed files with 25 additions and 29 deletions

View File

@ -13,47 +13,43 @@ rm -f swig/vipsCC/*.cxx
rm -f swig/vipsCC/VImage.h rm -f swig/vipsCC/VImage.h
rm -f swig/vipsCC/VImage.py python/vipsCC/VError.py python/vipsCC/VMask.py python/vipsCC/Display.py rm -f swig/vipsCC/VImage.py python/vipsCC/VError.py python/vipsCC/VMask.py python/vipsCC/Display.py
rm -f benchmark/temp* rm -f benchmark/temp*
( mkdir poop ; \ find doc -depth \( \
mv doc/libvips-docs.xml.in poop ; \ -path doc/libvips-docs.xml.in \
mv doc/Makefile.am poop ; \ -o -path doc/Makefile.am \
mv doc/images poop ; \ -o -path 'doc/images/*' \
mv doc/*.xml poop ; \ -o -name '*.xml' ! -name libvips-docs.xml ! -path 'doc/xml/*' \
mv doc/*.py poop ; \ -o -name '*.py' \
rm -rf doc/* ; \ \) -prune -or \( \
mv poop/* doc ; \ -type f \
rmdir poop \ -o -type d -empty \
) \) -delete
# glib-gettextize asks us to copy these files to m4 if they aren't there
# I don't have $ACDIR/isc-posix.m4, how mysterious
ACDIR=`aclocal --print-ac-dir` ACDIR=`aclocal --print-ac-dir`
# OS X with brew has a dirlist in ACDIR that points to several directories
# OS X with brew sets ACDIR to # dirlist supports wildcards, but that would require eval ... which is evil
# /usr/local/Cellar/automake/1.13.1/share/aclocal, the staging area, which is if [ -e $ACDIR/dirlist ]; then
# totally wrong argh ACDIR=`cat $ACDIR/dirlist`
if [ ! -d $ACDIR ]; then
ACDIR=/usr/local/share/aclocal
fi fi
mkdir -p m4 mkdir -p m4
cp $ACDIR/codeset.m4 m4 # glib-gettextize asks us to copy these files to m4 if they aren't there:
cp $ACDIR/gettext.m4 m4 files="codeset gettext glibc21 iconv isc-posix lcmessage progtest introspection"
cp $ACDIR/glibc21.m4 m4 for dir in $ACDIR; do
cp $ACDIR/iconv.m4 m4 test -d $dir && for file in $files; do
cp $ACDIR/lcmessage.m4 m4 test -e $dir/$file.m4 && cp $dir/$file.m4 m4
cp $ACDIR/progtest.m4 m4 done
cp $ACDIR/introspection.m4 m4 done
gtkdocize --copy --docdir doc --flavour no-tmpl || exit 1 gtkdocize --copy --docdir doc --flavour no-tmpl || exit 1
# some systems need libtoolize, some glibtoolize ... how annoying # some systems need libtoolize, some glibtoolize ... how annoying
echo testing for glibtoolize ... echo testing for glibtoolize ...
if glibtoolize --version >/dev/null 2>&1; then if glibtoolize --version >/dev/null 2>&1; then
LIBTOOLIZE=glibtoolize LIBTOOLIZE=glibtoolize
echo using glibtoolize echo using glibtoolize
else else
LIBTOOLIZE=libtoolize LIBTOOLIZE=libtoolize
echo using libtoolize echo using libtoolize
fi fi
test -r aclocal.m4 || touch aclocal.m4 test -r aclocal.m4 || touch aclocal.m4
@ -62,7 +58,7 @@ test -r aclocal.m4 || touch aclocal.m4
glib-gettextize --force --copy > /dev/null glib-gettextize --force --copy > /dev/null
test -r aclocal.m4 && chmod u+w aclocal.m4 test -r aclocal.m4 && chmod u+w aclocal.m4
# intltoolize --copy --force --automake # intltoolize --copy --force --automake
aclocal aclocal
autoconf autoconf
autoheader autoheader
$LIBTOOLIZE --copy --force --automake $LIBTOOLIZE --copy --force --automake