Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/src/cmd/graphviz/dotneato/mkfile

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


</$objtype/mkfile

BIN=/$objtype/bin
MAN=/sys/man/1
TARG=dot neato twopi 
DIRS=common pack dotgen neatogen twopigen
TESTS=dotmemtest neatomemtest twopimemtest

LIB=twopigen/libtwopi.a \
	neatogen/libneato.a \
	dotgen/libdot.a \
	pack/libpack.a \
	common/libcommon.a \
	../pathplan/libpathplan.a \
	../graph/libgraph.a \
	../cdt/libcdt.a \
	../gd/libgd.a
HFILES=dotneato.h

CFLAGS=-c -DVERSION="1.10" -DBUILDDATE="`{date -n}" \
	-Icommon -Ipack -Idotgen -Ineatogen -Itwopigen -I../graph -I../cdt -I../pathplan\
	-D_POSIX_SOURCE -D_BSD_EXTENSION

none:VQ:
	echo usage: mk cmds, dirs, all, install, installall, '$O'.cmd, cmd.install, or cmd.installall

cmds:V:	$TARG

dirs:V:
	for(i in $DIRS) @{
		cd $i
		echo mk $i
		mk $MKFLAGS all
	}

all:V: dirs $PROGS

^([$OS])\.(.*):R:	\2.\1
	pcc $LDFLAGS -o $target $stem2.$stem1 $LIB

.*\.[$OS]:R:	$HFILES

(.*)\.([$OS])'$':R:	\1.c
	pcc $CFLAGS $stem1.c

&:n:	$O.&
	mv $O.$stem $stem

%.install:V: $BIN/% $MAN/%

%.safeinstall:	$O.% $cpuobjtype._cp
	test -e $BIN/$stem && mv $BIN/$stem $BIN/_$stem
	$cpuobjtype._cp $O.$stem $BIN/$stem

%.safeinstallall:
	for(objtype in $CPUS)
		mk $stem.safeinstall
	mk $stem.clean

$BIN/%:	$O.%
	cp $O.$stem $BIN/$stem

$MAN/%:	%.man
	cp $stem.man $MAN/$stem

%.directories:V:
	for(i in $DIRS) @{
		cd $i
		echo mk $i
		mk $MKFLAGS $stem
	}

clean:V:	cleanfiles clean.directories

nuke:V:		cleanfiles nuke.directories

directories:V:	install.directories

cleanfiles:V:
	rm -f [$OS].out *.[$OS] y.tab.? y.debug y.output [$OS].$TARG 

%.clean:V:
	rm -f [$OS].$stem $stem.[$OS]

install:V:
	mk $MKFLAGS directories
	mk $MKFLAGS $TARG.install

installall:V:
	for(objtype in $CPUS)
		mk $MKFLAGS install

%.installall:	%.c
	for (objtype in $CPUS) {
		rfork e
		mk $stem.install &
	}
	wait
	rm -f $stem.[$OS] y.tab.? $stem.tab.?



Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.