Commit 8bb28edc authored by ellson's avatar ellson

Update old make configure and build process;

avoid including sys/time.h in lefty/common.h on Windows;
fix Windows build;
remove a couple of holes related to the new libgvc_dot_builtins.a;
fix several bugs in dotty and lefty related to sending output to
the printer and rendering output in postscript
parent 7c94ef4f
......@@ -24,7 +24,7 @@ dist-hook:
EXTRA_DIST = $(txt) $(html) graphviz.spec.in graphviz.spec \
autogen.sh config/depcomp config/config.rpath ast_common.h.in \
Makefile.old Config.mk configure.old INSTALL.old \
Makeargs config.h.old compat_getopt.h iffe \
Makeargs config.h.old compat_getopt.h iffe config.iffe \
m4/README m4/iconv.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 \
Doxyfile.in Doxyfile \
makearch features awk windows \
......
......@@ -596,15 +596,16 @@ dotty.message = function (level, text) {
dotty.protogt.printorsave = function (gt, vt, otype, name, mode, ptype) {
local pr, wrect, vsize, xy, psize, canvas, pscanvas, cid, cname, t;
local graph, edgehandles, fontmap, eid, edge, nid, node, gid, sgraph;
local did, draw, i;
if (~otype)
if (~(otype = ask ('print to', 'choice', 'file|printer')))
return;
if (otype == 'printer') {
if (~getenv ('TMPDIR'))
name = concat (getenv ('HOME'), '/.dottyout.ps');
else
name = concat (getenv ('TMPDIR'), '/.dottyout.ps', random (10000));
if (~getenv ('TMPDIR'))
name = concat (getenv ('HOME'), '/.dottyout.ps');
else
name = concat (getenv ('TMPDIR'), '/.dottyout.ps', random (10000));
if (getenv ('LEFTYWINSYS') ~= 'mswin' & ~pr)
if (~(pr = ask ('printer command', 'string', 'lpr')))
return;
......@@ -690,16 +691,40 @@ dotty.protogt.printorsave = function (gt, vt, otype, name, mode, ptype) {
for (eid in graph.edges) {
edge = graph.edges[eid];
edge.fontname = fontmap[edge.attr.fontname];
for (did in edge.draws) {
if (did == 'ep')
continue;
draw = edge.draws[did];
for (i = 0; draw[i]; i = i + 1)
if (draw[i].type == 'F')
draw[i].fn = fontmap[draw[i].ofn];
}
gt.drawedge (gt, [0 = vt;], edge);
}
for (nid in graph.nodes) {
node = graph.nodes[nid];
node.fontname = fontmap[node.attr.fontname];
for (did in node.draws) {
if (did == 'ep')
continue;
draw = node.draws[did];
for (i = 0; draw[i]; i = i + 1)
if (draw[i].type == 'F')
draw[i].fn = fontmap[draw[i].ofn];
}
gt.drawnode (gt, [0 = vt;], node);
}
for (gid in graph.graphs) {
sgraph = graph.graphs[gid];
sgraph.fontname = fontmap[sgraph.graphattr.fontname];
for (did in sgraph.draws) {
if (did == 'ep')
continue;
draw = sgraph.draws[did];
for (i = 0; draw[i]; i = i + 1)
if (draw[i].type == 'F')
draw[i].fn = fontmap[draw[i].ofn];
}
gt.drawsgraph (gt, [0 = vt;], sgraph);
}
graph.fontname = fontmap[graph.graphattr.fontname];
......@@ -708,5 +733,5 @@ dotty.protogt.printorsave = function (gt, vt, otype, name, mode, ptype) {
vt.canvas = canvas;
destroywidget (pscanvas);
if (otype == 'printer' & getenv ('LEFTYWINSYS') ~= 'mswin')
system (concat (pr, ' ', name, '; rm ',name));
system (concat (pr, ' ', name, '; rm ',name));
};
......@@ -402,6 +402,7 @@ dotty.protogt.unpackdraw = function (gt, attr) {
s = '';
for (j = 1; j < l; j = j + 1)
s = concat (s, tt[j]);
o.ofn = s;
o.fn = dotty.fontmap[s];
} else if (t[i] == 'S') {
o.type = t[i];
......
......@@ -47,8 +47,10 @@ extern "C" {
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifndef MSWIN32
#include <sys/time.h>
#endif
#endif
#include <math.h>
#include <stdio.h>
......
......@@ -754,6 +754,7 @@ int Igetenv (int argc, lvar_t *argv) {
if (!T_ISSTRING (argv[0].o))
return L_FAILURE;
rtno = NULL;
if (!(s = getenv (Tgetstring (argv[0].o))) || !*s)
return L_SUCCESS;
rtno = Tstring (s);
......
......@@ -12,9 +12,10 @@ for i in `find . -name Makefile.old`; do cp $i ${i%%.old}; done
# do the same for config.h plus insert VERSION and BUILDDATE
V=$(grep 'AC_INIT(graphviz' configure.ac | m4 '-DAC_INIT=$2')
D=$(date)
sed "s/VVVV/$V/" config.h.old | sed "s/DDDD/$D/" > config.h
./iffe - set cc cc : run configdata | sed "s/VVVV/$V/" | sed "s/DDDD/$D/" > config.h
# Append VERSION to Config.mk
mv Config.mk.old Config.mk
echo "VERSION=$V" >> Config.mk
# Remove cdt/ast_common.h if it came with the distribution
......
......@@ -135,13 +135,20 @@ Obviously you would change the pathnames to reflect your installation.
Note that the directory ${prefix}/include is automatically searched
for headers, and ${prefix}/lib for libraries.
<P>
2. (Recommend for other Unix platforms.) As above, you need
2. (Recommend for other Unix platforms.) As above, you need
the external packages to be installed somewhere.
Then use old make by editing Config.mk for your architecture
and installation directory. Check settings in makearch/$(ARCH).
<ul>
<li>
Run configure.old from the root graphviz directory.
<li>
Edit Config.mk for your architecture, tools, and installation directory.
In particular, set the ARCH make variable.
<li>
If desired, check settings in makearch/$(ARCH).
See below for further notes on individual platforms.
<P>
Do the usual:<br>
<li>
Run make.
</ul>
<pre>
make
make install
......@@ -149,7 +156,7 @@ make clean
</pre>
<P>
3. (Recommended for Dave Korn and Elefteris Koutsofios) Use AT&amp;T/Lucent
3. (Recommended for Dave Korn and Eleftheris Koutsofios) Use AT&amp;T/Lucent
<A HREF="http://www.research.att.com/sw/tools/reuse/packages/astkit.html">nmake</A>.
<P>
You have to install the AST tools first.
......
......@@ -37,4 +37,4 @@ libgvc_builtins_la_LIBADD = \
@GD_LIBS@ @EXPAT_LIBS@ @Z_LIBS@ @LIBGEN_LIBS@
libgvc_la_LIBADD = ${libgvc_builtins_la_LIBADD}
EXTRA_DIST = Makefile.old
EXTRA_DIST = Makefile.old dot_builtins.c
all: libgvc.a
all: libgvc.a libgvc_dot_builtins.a
ROOT=../..
include $(ROOT)/Config.mk
include $(ROOT)/makearch/$(ARCH)
......@@ -26,9 +26,9 @@ OBJS = gvrender.o gvlayout.o gvdevice.o gvcontext.o gvjobs.o \
EXTRA_OBJS = no_builtins.o dot_builtins.o
libgvc_dot_builtins.a : $(OBJS) dot_builtins.o
$(RM) libgvc_builtins.a
$(AR) cr libgvc_builtins.a $(OBJS) dot_builtins.o
$(RANLIB) libgvc_builtins.a
$(RM) libgvc_dot_builtins.a
$(AR) cr libgvc_dot_builtins.a $(OBJS) dot_builtins.o
$(RANLIB) libgvc_dot_builtins.a
libgvc.a : $(OBJS) no_builtins.o
$(RM) libgvc.a
......
......@@ -867,6 +867,21 @@ end
item: Include Script
Pathname=%_WISE_%\INCLUDE\uninstal.wse
end
item: Install File
Source=c:\graphvizCVS\builddaemon\package\source\lib\plugin.lib
Destination=%MAINDIR%\Graphviz\lib\plugin.lib
Flags=0000000010000010
end
item: Install File
Source=c:\graphvizCVS\builddaemon\package\source\include\logic.h
Destination=%MAINDIR%\Graphviz\include\logic.h
Flags=0000000010000010
end
item: Install File
Source=c:\graphvizCVS\builddaemon\package\source\include\arith.h
Destination=%MAINDIR%\Graphviz\include\arith.h
Flags=0000000010000010
end
item: Install File
Source=c:\graphvizCVS\builddaemon\package\source\include\utils.h
Destination=%MAINDIR%\Graphviz\include\utils.h
......
......@@ -9,8 +9,11 @@ INPKG=graphviz-win.tgz # input CVS package
#WISE=/C/wisein~1/wise32.exe # = /Wise InstallMaker
WISE=/C/progra~1/wisein~2/wise32.exe # = Wise InstallMaker
SOURCE=ellson@www.graphviz.org:www.graphviz.org/pub/graphviz
NSOURCE=www.graphviz.org:/home/ellson/www.graphviz.org/pub/graphviz
SOURCEFILE=$SOURCE/CURRENT/$INPKG
NSOURCEFILE=$NSOURCE/CURRENT/$INPKG
DESTDIR=$SOURCE/CURRENT
NDESTDIR=$NSOURCE/CURRENT
OPTION=Release
WISEFLAG=0
......@@ -41,7 +44,11 @@ function setVersion {
function getFile
{
# $TCLSH get.tcl $INPKG
scp -q $SOURCEFILE . >> $LFILE 2>&1
# scp -q $SOURCEFILE . >> $LFILE 2>&1
echo ssh soohan scp -q $NSOURCEFILE . >> $LFILE 2>&1
ssh soohan scp -q $NSOURCEFILE .
echo rcp raptor:graphviz-win.tgz . >> $LFILE 2>&1
rcp raptor:graphviz-win.tgz . >> $LFILE 2>&1
if [[ $? != 0 ]]
then
ErrorEx "failure to get source"
......@@ -52,10 +59,14 @@ function getFile
function putFile
{
# $TCLSH tclscript.tcl $1 >> $LFILE 2>&1
scp -q $1 $DESTDIR >> $LFILE 2>&1 &
PID=$(ps -e | grep scp | awk '{print $1 }')
sleep 10
kill $PID
# scp -q $1 $DESTDIR >> $LFILE 2>&1 &
# PID=$(ps -e | grep scp | awk '{print $1 }')
# sleep 10
# kill $PID
BASE=$(basename $1)
rcp $1 raptor:. >> $LFILE 2>&1
ssh raptor scp -q $BASE $NDESTDIR >> $LFILE 2>&1
ssh raptor rm $BASE >> $LFILE 2>&1
if [[ $? != 0 ]]
then
ErrorEx "failure to put $1"
......@@ -163,6 +174,7 @@ function Get
#gunzip < graphviz.tar.gz | tar xf -
echo "unpacking the package" >> $LFILE
#pax -rf $INPKG >> $LFILE 2>&1
echo "(gunzip < $INPKG | tar xf - )" >> $LFILE 2>&1
(gunzip < $INPKG | tar xf - ) >> $LFILE 2>&1
if [[ $? != 0 ]]
then
......@@ -251,7 +263,7 @@ function Install
# install libraries
echo "copying libraries" >> $LFILE
LIBS=(ingraphs agraph cdt circogen common dotgen fdpgen gd graph gvc neatogen pack pathplan twopigen)
LIBS=(ingraphs agraph cdt circogen common dotgen fdpgen gd graph gvc neatogen pack pathplan plugin twopigen)
if [[ ! -d $PACKAGE_HOME/source/lib ]]
then
mkdir $PACKAGE_HOME/source/lib
......@@ -309,12 +321,18 @@ function Package
SRCDIR=$GVIZ_HOME/lib/circogen
finstall circo.h
SRCDIR=$GVIZ_HOME/lib/common
finstall arith.h
finstall globals.h
finstall const.h
finstall logic.h
finstall macros.h
finstall render.h
finstall renderprocs.h
finstall types.h
finstall utils.h
finstall geom.h
finstall geomprocs.h
finstall color.h
finstall memory.h
SRCDIR=$GVIZ_HOME/lib/dotgen
finstall dot.h
finstall dotprocs.h
......@@ -322,8 +340,10 @@ function Package
finstall fdp.h
SRCDIR=$GVIZ_HOME/lib/gvc
finstall gvc.h
finstall gvcext.h
finstall gvcint.h
finstall gvcproc.h
finstall gvcjob.h
finstall gvplugin.h
finstall gvplugin_layout.h
finstall gvplugin_render.h
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment