123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- #! /bin/sh
- set -e
- me=`echo "$0" | sed 's,^.*/,,'`
- : ${AUTOCONF=autoconf}
- export AUTOCONF
- : ${AUTOM4TE=autom4te}
- export AUTOM4TE
- : ${PERL=perl}
- VERSION=`sed -ne '/AC_INIT/s/^[^[]*\[[^[]*\[\([^]]*\)\].*$/\1/p' configure.ac`
- PACKAGE=automake
- datadir=.
- RELEASE_YEAR=2017
- if test -n "$DJDIR"; then
- BOOTSTRAP_SHELL=/dev/env/DJDIR/bin/bash.exe
- else
- BOOTSTRAP_SHELL=/bin/sh
- fi
- apiver_cmd=`sed -ne 's/\[\[/[/g;s/\]\]/]/g;/^APIVERSION=/p' configure.ac`
- eval "$apiver_cmd"
- if test -z "$VERSION"; then
- echo "$me: cannot find VERSION" >&2
- exit 1
- fi
- if test -z "$APIVERSION"; then
- echo "$me: cannot find APIVERSION" >&2
- exit 1
- fi
- rm -rf aclocal-$APIVERSION
- mkdir aclocal-$APIVERSION
- if test -d automake-$APIVERSION; then
- find automake-$APIVERSION -exec chmod u+wx '{}' ';'
- fi
- rm -rf automake-$APIVERSION
- mkdir automake-$APIVERSION
- cp -rf lib/* automake-$APIVERSION
- dosubst ()
- {
- rm -f $2
- in=`echo $1 | sed 's,^.*/,,'`
- sed -e "s%@APIVERSION@%$APIVERSION%g" \
- -e "s%@PACKAGE@%$PACKAGE%g" \
- -e "s%@PERL@%$PERL%g" \
- -e "s%@SHELL@%$BOOTSTRAP_SHELL%g" \
- -e "s%@VERSION@%$VERSION%g" \
- -e "s%@datadir@%$datadir%g" \
- -e "s%@RELEASE_YEAR@%$RELEASE_YEAR%g" \
- -e "s%@configure_input@%Generated from $in; do not edit by hand.%g" \
- $1 > $2
- chmod a-w $2
- }
- dosubst automake-$APIVERSION/Automake/Config.in \
- automake-$APIVERSION/Automake/Config.pm
- dosubst m4/amversion.in m4/amversion.m4
- for p in bin/aclocal bin/automake; do
- dosubst $p.in $p.tmp
- $PERL -w bin/gen-perl-protos $p.tmp > $p.tmp2
- mv -f $p.tmp2 $p.tmp
- done
- $PERL ./gen-testsuite-part > t/testsuite-part.tmp
- chmod a-w t/testsuite-part.tmp
- mv -f t/testsuite-part.tmp t/testsuite-part.am
- $PERL ./bin/aclocal.tmp -Wall -Werror -I m4 \
- --automake-acdir=m4 --system-acdir=m4/acdir
- $AUTOCONF -Wall -Werror
- $PERL ./bin/automake.tmp -Wall -Werror
- rm -rf aclocal-$APIVERSION automake-$APIVERSION
- rm -f bin/aclocal.tmp bin/automake.tmp
|