| 1 |
#!/bin/bash |
| 2 |
|
| 3 |
# $Id: bootstrap,v 1.21 2005/03/27 18:21:20 joostvb Exp $ |
| 4 |
|
| 5 |
# |
| 6 |
# bootstrap - script to bootstrap the distribution rolling engine |
| 7 |
# |
| 8 |
# to build a tarball, ready for distribution, from fresh checked out |
| 9 |
# sources, do e.g. |
| 10 |
# |
| 11 |
# shed/bootstrap |
| 12 |
# cd adirectory |
| 13 |
# ../configure && make && make distcheck |
| 14 |
# |
| 15 |
# (I use slate/build for adirectory and ../../configure). |
| 16 |
# |
| 17 |
# this will yield a tarball, e.g. mcl-21-257.tar.gz . Once this has been |
| 18 |
# run, one can, after e.g. editing sources, run just |
| 19 |
# |
| 20 |
# make distcheck |
| 21 |
# |
| 22 |
# to generate a new tarball. (No need to run ./bootstrap again in this case.) |
| 23 |
# After downloading, users do |
| 24 |
# |
| 25 |
# tar zxf mcl-20020109.tar.gz |
| 26 |
# cd mcl-20020109 |
| 27 |
# ./configure && make |
| 28 |
# make install |
| 29 |
# |
| 30 |
# To force a new configure.ac.in to get read, do either |
| 31 |
# |
| 32 |
# make configure.ac |
| 33 |
# |
| 34 |
# or |
| 35 |
# |
| 36 |
# rm VERSION ; ./bootstrap |
| 37 |
# |
| 38 |
# . |
| 39 |
|
| 40 |
set -euo pipefail |
| 41 |
set -x |
| 42 |
|
| 43 |
[[ ! -f VERSION ]] && echo "Need file VERSION (cf setversion)" && false |
| 44 |
|
| 45 |
|
| 46 |
# hack as used in systraq |
| 47 |
test -f acinclude.m4 || { |
| 48 |
if test -f /usr/share/autoconf-archive/acx_pthread.m4 |
| 49 |
then |
| 50 |
# we probably have the autoconf-archive Debian package installed |
| 51 |
ln -s /usr/share/autoconf-archive/acx_pthread.m4 acinclude.m4 |
| 52 |
elif test -f /usr/share/aclocal/z-acx_pthread.m4 |
| 53 |
then |
| 54 |
# we probably have an aclocal-archive RPM installed |
| 55 |
ln -s /usr/share/aclocal/z-acx_pthread.m4 acinclude.m4 |
| 56 |
elif test -f $HOME/local/share/autoconf-archive/acx_pthread.m4 |
| 57 |
then |
| 58 |
# some people prefer to maintain fresh copies of development tools |
| 59 |
# in their home directories. be nice to them too. |
| 60 |
ln -s $HOME/local/share/autoconf-archive/acx_pthread.m4 acinclude.m4 |
| 61 |
else |
| 62 |
cat <<EOT |
| 63 |
You need the autoconf-archive Debian package, or the aclocal-archive |
| 64 |
RPM package. Alternatively, you could install the GNU Autoconf Macro |
| 65 |
Archive's http://www.gnu.org/software/ac-archive/htmldoc/acx_pthread.html |
| 66 |
as `pwd`/acinclude.m4. |
| 67 |
EOT |
| 68 |
fi |
| 69 |
} |
| 70 |
|
| 71 |
aclocal \ |
| 72 |
&& autoheader \ |
| 73 |
&& automake --verbose --gnu --add-missing \ |
| 74 |
&& autoconf |
| 75 |
|
| 76 |
|