3 # Run this to generate all the initial makefiles, etc.
6 test -z "$srcdir" && srcdir=.
8 PKG_NAME="PLD Linux Distribution rc-scripts"
10 if [ "$1" = "changelog" ]; then
12 [ -z "$svn2log" -a -x ~/bin/svn2log.py ] && svn2log=~/bin/svn2log.py
13 [ -z "$svn2log" -a -x /usr/bin/svn2log ] && svn2log=/usr/bin/svn2log
14 if [ -z "$svn2log" ]; then
15 echo >&2 'Need svn2log program!'
19 [ -n "$2" ] && dir="$2" || dir="rc-scripts"
20 # create users for svn2log format
21 tmp=$(mktemp -q svn2logXXXXXX 2>/dev/null || echo ${TMPDIR:-/tmp}/svn2log.tmp)
24 [ -z "$users" -a -f ../CVSROOT/users ] && users=../CVSROOT/users
25 [ -z "$users" -a -f ~/.CVS-PLD/CVSROOT/users ] && users=~/.CVS-PLD/CVSROOT/users
26 if [ -z "$users" ]; then
27 echo >&2 "Can't find users file!"
28 echo >&2 'Run in parent dir to fetch one:'
29 echo >&2 '$ cvs -d :pserver:cvs@cvs.pld-linux.org:/cvsroot co CVSROOT/users'
33 awk -F":" ' { login=$1; if ($3 != "") { name=$3 } else { name=$1 }; email=$2; printf "%s\t%s <%s@pld-linux.org>\n", login, name, login } ' $users > $tmp
35 svn log -v --xml | $svn2log --domain "pld-linux.org" -p /${dir}/trunk -u $tmp --exclude ChangeLog -o ChangeLog
38 # obfuscate emails <user@domain> and (user@domain)
39 sed -i -e 's,\([<(].*\)@\(.*[)>]\),\1/at/\2,g' ChangeLog
47 (test -f $srcdir/configure.ac \
48 && test -d $srcdir/src) || {
49 echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
50 echo " top-level rc-scripts directory"
57 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
59 echo "**Error**: You must have \`autoconf' installed to compile $PKG_NAME."
60 echo "Download the appropriate package for your distribution,"
61 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
65 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
66 (libtoolize --version) < /dev/null > /dev/null 2>&1 || {
68 echo "**Error**: You must have \`libtool' installed to compile $PKG_NAME."
69 echo "Get ftp://alpha.gnu.org/gnu/libtool/libtool-1.4b.tar.gz"
70 echo "(or a newer version if it is available)"
75 grep "^AM_GNU_GETTEXT" $srcdir/configure.ac >/dev/null && {
76 grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \
77 (gettextize --version) < /dev/null > /dev/null 2>&1 || {
79 echo "**Error**: You must have \`gettext' installed to compile $PKG_NAME."
80 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.38.tar.gz"
81 echo "(or a newer version if it is available)"
86 (automake --version) < /dev/null > /dev/null 2>&1 || {
88 echo "**Error**: You must have \`automake' installed to compile $PKG_NAME."
89 echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4-p4.tar.gz"
90 echo "(or a newer version if it is available)"
96 # if no automake, don't bother testing for aclocal
97 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
99 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
100 echo "installed doesn't appear recent enough."
101 echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4-p4.tar.gz"
102 echo "(or a newer version if it is available)"
106 if test "$DIE" -eq 1; then
110 if test -z "$*"; then
111 echo "**Warning**: I am going to run \`configure' with no arguments."
112 echo "If you wish to pass any to it, please specify them on the"
113 echo \`$0\'" command line."
119 am_opt=--include-deps;;
122 for coin in `find $srcdir -name configure.ac -print`
125 if test -f $dr/NO-AUTO-GEN; then
126 echo skipping $dr -- flagged as no auto-gen
129 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
131 aclocalinclude="$ACLOCAL_FLAGS"
132 for k in $macrodirs; do
134 aclocalinclude="$aclocalinclude -I $k"
136 ## echo "**Warning**: No such directory \`$k'. Ignored."
139 if grep "^AM_GNU_GETTEXT" configure.ac >/dev/null; then
140 if grep "sed.*POTFILES" configure.ac >/dev/null; then
141 : do nothing -- we still have an old unmodified configure.ac
143 echo "Creating $dr/aclocal.m4 ..."
144 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
145 echo "Running gettextize... Ignore non-fatal messages."
146 echo "no" | gettextize --force --copy
147 echo "Making $dr/aclocal.m4 writable ..."
148 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
151 if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
152 echo "Running libtoolize..."
153 libtoolize --force --copy
155 echo "Running aclocal $aclocalinclude ..."
156 aclocal $aclocalinclude
157 if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
158 echo "Running autoheader..."
161 echo "Running autoconf ..."
163 echo "Running automake --gnu $am_opt ..."
164 automake --add-missing --gnu $am_opt
169 conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
171 if test x$NOCONFIGURE = x; then
172 echo Running $srcdir/configure $conf_flags "$@" ...
173 $srcdir/configure $conf_flags "$@" \
174 && echo Now type \`make\' to compile $PKG_NAME
176 echo Skipping configure process.