dist: update distrib and export to switch to git repo
[nvi.git] / dist / distrib
blob953eceb84fd5b677960ef8c7d1d09bb2ba8188e7
1 #! /bin/sh
2 # $Id: distrib,v 8.24 2001/06/25 11:20:24 skimo Exp $ (Berkeley) $Date: 2001/06/25 11:20:24 $
4 echo "Running libtoolize"
5 libtoolize -c --force
7 echo "Building aclocal.m4"
8 rm -f aclocal.m4
9 aclocal -I m4
11 # Build autoconf structure.
12 echo "Running autoheader"
13 autoheader 2>&1 | sed '/warning: AC_TRY_RUN called without default/d'
14 chmod 444 config.h.in
15 echo "Running automake"
16 automake -a -c --foreign $@
17 rm -f configure
18 echo "Running autoconf"
19 autoconf 2>&1 | sed '/warning: AC_TRY_RUN called without default/d'
20 chmod 555 configure config.guess config.sub install-sh
22 msg="/* Do not edit: automatically built by build/distrib. */"
23 # Build automatically generated header files.
24 f=../ipc/ipc_def.h
25 echo "Building $f"
26 rm -f $f
27 (echo "$msg" && \
28 awk -f ../ipc/ipc.awk ../ipc/ipc_cmd.c &&
29 awk -f ../ipc/vipc.awk ../ip/ip_read.c) > $f
30 chmod 444 $f
32 f=../ipc/ipc_gen.c
33 echo "Building $f"
34 rm -f $f
35 (echo "$msg" && \
36 perl -n ../ip/vipc.pl ../ip/ip_read.c) > $f
37 chmod 444 $f
39 f=../ex/ex_def.h
40 echo "Building $f"
41 rm -f $f
42 (echo "$msg" && \
43 awk -f ../ex/ex.awk ../ex/ex_cmd.c) > $f
44 chmod 444 $f
46 f=../common/options_def.h
47 echo "Building $f"
48 rm -f $f
49 (echo "$msg" && \
50 awk -f ../common/options.awk ../common/options.c) > $f
51 chmod 444 $f
53 # Build the automatically generated function prototype files.
54 for i in cl common ex gtk ip ipc motif motif_l tcl_api vi; do
55 f=../$i/extern.h
56 rm -f $f
57 echo "Building $f"
58 (echo "$msg" && \
59 sed -n "s/^ \* PUBLIC: \(.*\)/\1/p" ../$i/*.c) > $f
60 chmod 444 $f
61 done
63 # Build the automatically generated function prototype files.
64 for i in perl_api ; do
65 f=../$i/extern.h
66 rm -f $f
67 echo "Building $f"
68 (echo "$msg" && \
69 sed -n "s/^ \* PUBLIC: \(.*\)/\1/p" ../$i/*.c ../$i/*.xs) > $f
70 chmod 444 $f
71 done
73 # Build tags files.
74 echo "Building tags files"
75 f=tags
76 rm -f $f
77 if test $USER = 'bostic'; then ctagsopt = '-d'; fi
78 ctags $ctagsopt -w \
79 ../cl/*.[ch] ../common/*.[ch] ../ex/*.[ch] ../gtk/*.[ch] ../ip/*.[ch] \
80 ../ipc/*.[ch] ../motif/*.[ch] ../motif_l/*.[ch] ../perl_api/*.[ch] \
81 ../tcl_api/*.[ch] ../vi/*.[ch]
82 chmod 444 $f
84 date=`date +%Y-%m-%d`
85 echo "Building ../ex/version.h"
86 echo '#define VI_VERSION "'`git-describe` '('$date')"' > ../ex/version.h
88 touch stamp-h.in