distrib: let automake add missing files
[nvi.git] / dist / distrib
blob8e84199329fe9ce840d3434315ae5026e62a9bcb
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 "Building aclocal.m4"
5 rm -f aclocal.m4
6 aclocal
8 # Build autoconf structure.
9 echo "Running autoheader"
10 autoheader 2>&1 | sed '/warning: AC_TRY_RUN called without default/d'
11 chmod 444 config.h.in
12 rm -f configure
13 echo "Running autoconf"
14 autoconf 2>&1 | sed '/warning: AC_TRY_RUN called without default/d'
15 chmod 555 configure config.guess config.sub install-sh
16 echo "Running automake"
17 automake -a -c --foreign $@
19 msg="/* Do not edit: automatically built by build/distrib. */"
20 # Build automatically generated header files.
21 f=../ipc/ipc_def.h
22 echo "Building $f"
23 rm -f $f
24 (echo "$msg" && \
25 awk -f ../ipc/ipc.awk ../ipc/ipc_cmd.c &&
26 awk -f ../ipc/vipc.awk ../ip/ip_read.c) > $f
27 chmod 444 $f
29 f=../ipc/ipc_gen.c
30 echo "Building $f"
31 rm -f $f
32 (echo "$msg" && \
33 perl -n ../ip/vipc.pl ../ip/ip_read.c) > $f
34 chmod 444 $f
36 f=../ex/ex_def.h
37 echo "Building $f"
38 rm -f $f
39 (echo "$msg" && \
40 awk -f ../ex/ex.awk ../ex/ex_cmd.c) > $f
41 chmod 444 $f
43 f=../common/options_def.h
44 echo "Building $f"
45 rm -f $f
46 (echo "$msg" && \
47 awk -f ../common/options.awk ../common/options.c) > $f
48 chmod 444 $f
50 # Build the automatically generated function prototype files.
51 for i in cl common ex gtk ip ipc motif motif_l tcl_api vi; do
52 f=../$i/extern.h
53 rm -f $f
54 echo "Building $f"
55 (echo "$msg" && \
56 sed -n "s/^ \* PUBLIC: \(.*\)/\1/p" ../$i/*.c) > $f
57 chmod 444 $f
58 done
60 # Build the automatically generated function prototype files.
61 for i in perl_api ; do
62 f=../$i/extern.h
63 rm -f $f
64 echo "Building $f"
65 (echo "$msg" && \
66 sed -n "s/^ \* PUBLIC: \(.*\)/\1/p" ../$i/*.c ../$i/*.xs) > $f
67 chmod 444 $f
68 done
70 # Build tags files.
71 echo "Building tags files"
72 f=tags
73 rm -f $f
74 if test $USER = 'bostic'; then ctagsopt = '-d'; fi
75 ctags $ctagsopt -w \
76 ../cl/*.[ch] ../common/*.[ch] ../ex/*.[ch] ../gtk/*.[ch] ../ip/*.[ch] \
77 ../ipc/*.[ch] ../motif/*.[ch] ../motif_l/*.[ch] ../perl_api/*.[ch] \
78 ../tcl_api/*.[ch] ../vi/*.[ch]
79 chmod 444 $f
81 touch stamp-h.in