# makefile.info
# jgofs software v1.5
# Edited April 2, 1997 to copy new info to INFO for testing
#
# Purpose:
#   builds info, from PERL version, if PERL environment variable exists
#   else builds the csh version.
#
# NOTE:  env $PERL contains location of perl interpreter on this machine.
#
##############
# Values used to replace variables in template (*.tmp) file are:
#
#  (PERL version only) PERL:  which, if any, perl to use
#                      Example:       /usr/local/bin/perl
#
#  (if any) DMONAME:  name of program for which this is DMO
#                      Example:     US BIO-PROJ
#
#  INFOSERVER:  by default, machine used to serve documentation files
#                      Example:     //www.jgofs.org:80
#
##############
#
SHELL=/usr/bin/sh
# Where to place the custom 'info'
HTMLBINDIR  = ../htmlbin/

info: info_pl.tmp info_csh.tmp
	if [ "$(PERL)" ]; \
	then \
		sed "s*perllocation*${PERL}*g" < $@_pl.tmp | \
		sed "s*dmoname*${DMONAME}*g" | \
		sed "s*informationserver*${INFOSERVER}*"g > $@; \
	else \
		sed "s*objectdir*${OBJDIR}*g" < $@_csh.tmp | \
		sed "s*myaddr*${MYADDR}*g" | \
		sed "s*dmoname*${DMONAME}*g" | \
		sed "s*jgofsdir*${JGOFSDIR}*g" | \
		sed "s*informationserver*${INFOSERVER}*"g > $@; \
	fi
	chmod +x $@;
##	cp $@ ${HTMLBINDIR}$@;
	cp $@ ${HTMLBINDIR}INFO;
	echo "New infor copied to ${HTMLBINDIR}INFO";
