3 # This script makes a source distribution for compilation under
4 # Borland C++ 5.0. It also produces a .iwz file for use with
5 # InstallShield Express.
7 if test "$1" = ""; then
8 echo "usage: $0 \'DOS-path-to-PSPP-source\' \'DOS-path-to-Borland-C++-5.0-root\'"
11 test -f src/q2c.c || (echo "Not in PSPP source directory" && exit 1)
16 VERSION=`sed -ne 's/^.*\[//;s/].*$//;/^[0-9]*\.[0-9]*\.[0-9]*$/p' < configure.in`
17 BC5ROOT=`pwd`/pspp-$VERSION-bc5
21 cp -r pspp-$VERSION $BC5ROOT
22 rm -f $DISTROOT/manualfiles.tmp
23 rm -f $DISTROOT/testsfiles.tmp
26 texi2html -number -monolithic FAQ.texi
30 texi2html -menu -number -split_node ../doc/pspp.texi
31 cp pspp_toc.html index.html
35 n_manual=`expr $n_manual + 1`
36 echo "Group5File$n_manual=${DOSROOT}\\MANUAL\\$d" >> $DISTROOT/manualfiles.tmp
42 n_tests=`expr $n_tests + 1`
43 echo "Group3File$n_tests=${DOSROOT}\\TESTS\\$d" >> $DISTROOT/testsfiles.tmp
46 SEDDOSROOT=`echo "$1" | sed 's/\\\\/\\\\\\\\/'`
47 echo "s%@BASEDIR@%$SEDDOSROOT%g" > $DISTROOT/bc5.sed
48 SEDBC5BASEDIR=`echo "$2" | sed 's/\\\\/\\\\\\\\/'`
49 echo "s%@BC5BASEDIR@%$SEDBC5BASEDIR%g" >> $DISTROOT/bc5.sed
50 echo "s%@MANUALCOUNT@%$n_manual%g" >> $DISTROOT/bc5.sed
51 echo "s%@TESTSCOUNT@%$n_tests%g" >> $DISTROOT/bc5.sed
53 IN=$BC5ROOT/sysdeps/borlandc5.0/pspp.iwz.in
55 sed -n -f $DISTROOT/bc5.sed -e '1,/^Group3Dir/p' < $IN > $OUT
56 cat $DISTROOT/testsfiles.tmp >> $OUT
57 sed -n -f $DISTROOT/bc5.sed -e '/^Group4Size/,/^Group5Dir/p' < $IN >> $OUT
58 cat $DISTROOT/manualfiles.tmp < $IN >> $OUT
59 sed -n -f $DISTROOT/bc5.sed -e '/^Group5Size/,$p' < $IN >> $OUT
61 cp $BC5ROOT/sysdeps/borlandc5.0/pspp.ide $BC5ROOT/pspp.ide
62 cp $BC5ROOT/pref.h.orig $BC5ROOT/sysdeps/borlandc5.0/pref.h
64 rm $DISTROOT/manualfiles.tmp
65 rm $DISTROOT/testsfiles.tmp
68 find $BC5ROOT -type f | xargs perl $DISTROOT/sysdeps/borlandc5.0/unix2dos.pl
69 find $BC5ROOT -name \*.bak | xargs rm -f