1# ksh script for building graphviz
2#
3# Set the following variable to the root location of MS VC++ on your machine
4# = Program Files/Microsoft Visual Studio
5
6export PATH=/msdev/VC98/bin:/msdev/Common/MsDev98/bin:$PATH
7export LIB='C:\progra~1\micros~3\vc98\lib'
8export INCLUDE='C:\progra~1\micros~3\vc98\include'
9
10ROOT=/C/graphvizCVS/builddaemon
11GVIZ=$ROOT/graphviz-win
12LFILE=$ROOT/LOG
13VERSION=Release
14typeset -i RV=0
15
16while [[ $# > 0 ]]
17do
18  case $1 in
19  -d )
20    VERSION=Debug
21    ;;
22  -* )
23    echo "wmake: unknown flag $1 - ignored"
24    ;;
25  * )
26    LFILE=$1
27    ;;
28  esac
29  shift
30done
31
32# libs to be built
33LIBS=(cdt graph agraph gd pathplan common gvc pack neatogen dotgen twopigen circogen fdpgen ingraphs)
34
35# commands to be built
36CMDS=(dot lefty/gfx lefty dotty lneato)
37
38# gui's to be built
39GUIS=(cmd/lefty/gfx cmd/lefty dotty lneato)
40
41# tools to be built
42TOOLS=(Acyclic ccomps gvcolor gc nop sccmap tred unflatten gxl2dot dijkstra bcomps gvpack)
43
44function doComp
45{
46  f=$1
47  echo "###################" >> $LFILE
48  echo "compiling $f" >> $LFILE
49  nmake -nologo -f $f.mak CFG="$f - Win32 $VERSION" >> $LFILE 2>&1
50  RV=$((RV | $?))
51}
52
53function mkDir
54{
55  if [[ ! -d $1 ]]
56  then
57    mkdir $1
58  fi
59}
60
61cd $GVIZ
62
63# process libs
64cd lib
65mkDir lib
66mkDir lib/Release
67mkDir lib/Debug
68for d in ${LIBS[@]}
69do
70  cd $d
71  doComp $d
72  cd ..
73done
74cd ..
75
76# process plugins
77cd plugin
78doComp plugin
79cd ..
80
81# process commands
82cd cmd
83for d in ${CMDS[@]}
84do
85  cd $d
86  p=${d##*/}
87  doComp $p
88  cd $GVIZ/cmd
89done
90cd ..
91
92# process tools
93cd cmd/tools
94for d in ${TOOLS[@]}
95do
96  doComp $d
97done
98cd $GVIZ
99
100exit $RV
101