summaryrefslogtreecommitdiff
path: root/source4/heimdal/fix-export
diff options
context:
space:
mode:
Diffstat (limited to 'source4/heimdal/fix-export')
-rwxr-xr-xsource4/heimdal/fix-export82
1 files changed, 82 insertions, 0 deletions
diff --git a/source4/heimdal/fix-export b/source4/heimdal/fix-export
new file mode 100755
index 0000000000..4f25ea0b74
--- /dev/null
+++ b/source4/heimdal/fix-export
@@ -0,0 +1,82 @@
+#! /bin/sh
+# $Id: fix-export,v 1.38 2005/07/05 14:00:51 lha Exp $
+
+echo "fixing distribution in $1..."
+
+test -d "$1" || { echo not a dir in \$1 ; exit 1 ; }
+cd $1
+
+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'
+
+ed -s configure.in << END
+/test -z/s,^,#,
+w
+q
+END
+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 fix-export make-release make-release.el
+find . -name .cvsignore -print | xargs rm
+find . -name .__afs\* -print | xargs rm
+rm -fr autom4te*.cache