###############################################################################
# TclRobots 
# Makefile
# Tom Poindexter
#

###############################################################################
# Only the following three defines need to be customized
#

#
# the full path of your wish interpreter

WISH_EXEC = /usr/local/bin/wish

#
# the full path where you would like tclrobots installed

BIN_DIR   = /usr/local/bin

#
# the full path where you would like tclrobots man page installed

MAN_DIR   = /usr/local/man/man6


###############################################################################
#

install:	
	sed -e '1,2p' \
	    -e '3s%^.*$$%exec $(WISH_EXEC) "$$0" $${1+"$$@"}%p' \
	    -e '4p' \
	    -e '5s%^.*$$%set wishexec $(WISH_EXEC)%p' \
	    -e '6,$$p' \
	    -n <tclrobots.tcl >$(BIN_DIR)/tclrobots
	chmod 755 $(BIN_DIR)/tclrobots

install-man:
	cp tclrobots.man  $(MAN_DIR)/tclrobots.6

ascii-man:
	tbl tclrobots.man | nroff -man | col -bx > tclrobots.txt

post-man:
	groff -Tps -t -man tclrobots.man         > tclrobots.ps

mktar:
	cd ..; tar cvf tclrobots-2.0.tar tclrobots-2.0/*
	gzip -f ../tclrobots-2.0.tar

