6 date="`date +'%d %h %Y'`"
11 m4 -P -I "$config" -DDB_DATE="$date" \
12 common/init.m4 config.m4 common/main.m4 - common/final.m4
18 echo " generating $dst from $src ..."
19 rm -f html/txt/$dst.html html/txt/$dst.out
20 perl -ne 'print unless m/^Other pages:$/ .. /^\<hr\>/' \
21 html/$src.out >html/txt/$dst.html
22 HOME=/dev/null lynx -nolist -dump -cfg=html/lynx-cfg \
23 file://localhost/$cwd/html/txt/$dst.html >html/txt/$dst.out
28 if [ $# != 0 ]; then config="$1"; shift; fi
29 if [ $# != 0 ]; then echo >&2 'usage: ./build [<config>]'; false; fi
31 if [ ! -f config/$config/config.m4 ]; then echo >&2 "no such config: $config"; false; fi
33 errs="`echo 'm4_undivert(1)' | process | sed -ne '/[^ \t]/ s/^/ /p'`"
36 echo >&2 'unexpected residues:'
41 echo "macro substitutions ..."
42 for f in `find -name '*.in'`
44 h="`echo $f | sed -e 's/\.in$//'`"
45 process <"$f" >"$h.out"
46 mv config/trace "$h.trace"
47 if egrep 'DBC?U?_' /dev/null "$h.out"
49 echo >&2 'undefined macros'
52 [ ! -x "$f" ] || chmod +x "$h.out"
55 echo "documentation conversion ..."
56 txtconvert Reporting.html bug-reporting.txt
57 txtconvert Access.html bug-log-access.txt
58 txtconvert server-request.html bug-log-mailserver.txt
59 txtconvert Developer.html bug-maint-info.txt
60 txtconvert server-control.html bug-maint-mailcontrol.txt
61 txtconvert server-refcard.html bug-mailserver-refcard.txt
63 cgilibexist=`echo 'test -f DBC_CGILIB_PATH && echo true || echo false' | process`
64 htaccesspath=`echo DBC_HTACCESS_PATH | process`
66 rm -f install install.new
67 process <<'END' >install.new
70 test -d DBC_BASE || mkdir DBC_BASE
72 echo "installing $1 ..."
73 test -d "$2" || mkdir "$2"
77 h="`echo $f | sed -e 's/\.out$//'`"
84 bugsid scripts DBC_SCRIPT_PATH ..
85 bugsid html DBC_HTML_PATH ..
86 bugsid html/txt DBC_DOCDIR_PATH ../..
87 bugsid cgi DBC_CGI_PATH ..
89 if [ "x$htaccesspath" != x ]; then
90 process <<END >>install.new
91 cat <<'END2' >$htaccesspath.new
94 mv -f $htaccesspath.new $htaccesspath
100 cgiii='cgi-lib already exists in DBC_CGILIB_PATH'
102 cgiii=' DBC_CGILIB_PATH'
103 process <<'END' >>install.new
104 echo "installing cgi-lib.pl ..."
105 cp cgi/cgi-lib.pl DBC_CGILIB_PATH.new
106 mv -f DBC_CGILIB_PATH.new DBC_CGILIB_PATH
109 process >>install.new <<'END'
110 echo "setting up bugs database ..."
111 DBC_SCRIPT_PATH/initialise
113 echo "You will have to intall the crontab (misc/crontab.out) yourself."
117 mv -f install.new install
119 cgi="`cd cgi && echo *.out | sed -e 's/\.out//g'`"
122 built for $config date DB_DATE ...
123 will install unchanging files into:
131 will expect CGI scripts to be available in:
135 echo "run ./install to install"