Files
heimdal/fix-export
Johan Danielsson 7e6154db38 if DATEDVERSION is set, change the version to current date
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11059 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-07-24 12:55:43 +00:00

73 lines
1.5 KiB
Bash
Executable File

#! /bin/sh
# $Id$
echo "fixing distribution in $1..."
cd $1
if test "$DATEDVERSION"; then
date=`date -u +%Y%m%d`
perl -i.old -p -e 's/AM_INIT_AUTOMAKE\(([^,]*),[^)]*\)/AM_INIT_AUTOMAKE\($1,'$date'\)/' configure.in
rm configure.in.old
fi
ver=`sed -n 's/AM_INIT_AUTOMAKE(.*,\(.*\))/\1/p' configure.in`
M="* This is version $ver. *"
echo "$M" | sed -e 's/./*/g'
echo "$M"
echo "$M" | sed -e 's/./*/g'
ed -s configure.in << END
/test -z/s,^,#,
w
q
END
# XXX autoreconf bug
for i in include/config.h.in lib/roken/config.h.in; do
echo '/*autoheader*/' > $i
done
autoreconf --force --install
automake lib/roken/Makefile ## stupid automake gets this wrong
(cd doc && makeinfo heimdal.texi)
find . -name Makefile.am | while read f; do
for i in `sed -n -e '/^man_MANS/{
:loop
p
/[^\\]$/b quit
n
b loop
}
:quit' $f | sed 's/man_MANS//;s/=//;s/[ \\][ \\]*/ /g'`; do
x=`dirname $f`/$i
y=`dirname $f`/`echo $i | sed 's/[0-9]$/cat&/'`
echo `grog -Tascii $x` \> $y
`grog -Tascii $x` > $y
done
done
make_proto () {
(top=`pwd`
cd $1
b=`basename $1`
perl $top/cf/make-proto.pl -o $2 -p $3 `perl -e '
do {
$_ = <>;
} until(/'$b'_.*SOURCES/);
while(/\\\\\s*$/s){
$_ = $_ . <>;
}
s/\n//g;
s/\\\\//g;
s/.*=//;
s/\s+/ /g;
print;' Makefile.in`)
}
make_proto lib/krb5 krb5-protos.h krb5-private.h
make_proto lib/hdb hdb-protos.h hdb-private.h
make_proto appl/login login_protos.h /dev/null
rm fix-export make-release make-release.el
find . -name .cvsignore -print | xargs rm