summaryrefslogtreecommitdiff
path: root/source4/heimdal/fix-export
blob: b49c0de1d3f0ee4e8367f20ba3337945ac86445b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#! /bin/sh
# $Id: fix-export,v 1.39 2005/08/11 08:57:52 lha Exp $

distdir="$1"
echo "fixing distribution in $distdir..."

test -d "$distdir" || { echo not a dir in \$distdir ; exit 1 ; }
cd $distdir

if test "$DATEDVERSION"; then
	ed -s configure.in << END
/AC_INIT/s/AC_INIT(\([^,]*\), [^,]*, \(.*\))/AC_INIT(\1, $DATEDVERSION, \2)/
w
q
END

	error=WARN
	exitcmd=:
else
    	error=ERROR
	exitcmd=exit
fi

ver=`sed -n 's/AC_INIT([^,]*,\([^,]*\),.*/\1/p' configure.in`
M="*   This is version $ver.   *"
echo "$M" | sed -e 's/./*/g'
echo "$M"
echo "$M" | sed -e 's/./*/g'

autoreconf --force --install
(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
		perl -p -e 'exit 1 if (/NetBSD|FreeBSD|OpenBSD|Linux|OSF|Solaris/); exit 0;' $y
		if [ $? != 0 ] ; then
		    echo "$error: catfile $y contains operating system"
		    head -1 $y
		    $exitcmd
		fi
	done
done

make_proto () {
	(top=`pwd`
	cd $1
	b=`basename $1`
        if test X"$5" != X ; then
	    e="-E $5";
	else
	    e=
	fi
	perl $top/cf/make-proto.pl $e -o $2 -p $3 `(perl -p -e 's/^(include|if|else|endif)\b/##$1/' Makefile.am; 
		echo 'print-sources:; @if test "$(proto_opts)"; then echo $(proto_opts); else echo -q -P comment; fi; echo '$4 | sort -u ) | make -f - print-sources `)
}

make_proto lib/krb5 krb5-protos.h krb5-private.h '$(libkrb5_la_SOURCES)' KRB5_LIB_FUNCTION
make_proto lib/kadm5 kadm5-protos.h kadm5-private.h '$(libkadm5srv_la_SOURCES) $(libkadm5clnt_la_SOURCES)'
make_proto lib/hdb hdb-protos.h hdb-private.h '$(libhdb_la_SOURCES)'
make_proto appl/login login_protos.h /dev/null '$(login_SOURCES)'
make_proto kcm kcm_protos.h /dev/null '$(kcm_SOURCES)'
make_proto kdc kdc-protos.h /dev/null '$(libkdc_la_SOURCES)'

rm -fr autom4te*.cache

echo "tar cf - ${distdir} \| gzip -9 > ${distdir}.tar.gz"
echo "gpg -ba -u 0x45D901D8 ${distdir}.tar.gz"