########################################################################
# This is makefile for installing htmltotex and imgtops                #
# See the README file for details                                      #
# Last modified: June 3 1997                                           #
########################################################################
SHELL = /bin/sh

# Fix installation directories
BIN_DIR  = /usr/local/bin
MAN_DIR  = /usr/man/man1
LIB_DIR  = /usr/local/lib/htmltotex
# LIB_DIR  = /usr/local/htmltotex
# LIB_DIR  = ~/.htmltotex
HTML_DIR = /usr/local/etc/httpd/htdocs/htmltotex

# Fix path and name of your Perl compiler
PERL_PROGRAM = /usr/bin/perl5

# Fix the global resource values
HTTPD_HOME       = /usr/local/etc/httpd/htdocs/
PUBLIC_HTML_DIR  = public_html/
LOCAL_HOST       = agastya:agastya.csa:agastya.csa.iisc:agastya.csa.iisc.ernet.in:144.16.67.96


all: htmltotex imgtops htmltotex.rc

htmltotex: ./bin/htmltotex
	-rm -f htmltotex
	echo "#!$(PERL_PROGRAM)" > htmltotex
	cat ./bin/htmltotex >> htmltotex
	chmod 755 htmltotex

imgtops: ./bin/imgtops
	-rm -f imgtops
	echo "#!$(PERL_PROGRAM)" > imgtops
	cat ./bin/imgtops >> imgtops
	chmod 755 imgtops

htmltotex.rc:
	-rm -f htmltotex.rc
	echo "HTTPD_HOME=$(HTTPD_HOME)" > htmltotex.rc
	echo "PUBLIC_HTML_DIR=$(PUBLIC_HTML_DIR)" >> htmltotex.rc
	echo "LOCAL_HOST=$(LOCAL_HOST)" >> htmltotex.rc

install: all
	cp htmltotex imgtops $(BIN_DIR)
	-mkdir $(LIB_DIR)
	cp ./lib/* $(LIB_DIR)
	cp htmltotex.rc $(LIB_DIR)

installman:
	cp htmltotex.1 imgtops.1 $(MAN_DIR)

installhtml:
	-mkdir $(HTML_DIR)
	cp ./*.html $(HTML_DIR)
	-mkdir $(HTML_DIR)/images
	cp images/* $(HTML_DIR)/images

clean:
	-rm -f htmltotex htmltotex.rc imgtops

