#  20 Jul 05.  WJS
#	build-opt-env needs TEMPADDR stuff
#  16 Mar 05.  WJS
#	Only remaining thing that needs making is build-opt-env
#    Add ${CONFIG_FILE} to its dependencies so it will re-make if
#    a new opt-build-env.pl is being used

TOPLEVELDIR = ../..
OPTSERVERBIN= optbin
SCRIPTDIR = ${TOPLEVELDIR}/${OPTSERVERBIN}

TODO =  ${SCRIPTDIR}/build-opt-env 

all:${TODO}

${SCRIPTDIR}/build-opt-env: build-opt-env.tmp ${CONFIG_FILE}
	sed "s*jgofsdir*${JGOFSDIR}*g;\
		s*optionbin*${OPTSERVERBIN}*g;\
		s*myaddr*${MYADDR}*g;\
		s*portaddr*${PORT}*g;\
		s*urloftemporaryfiledir*${TEMPADDR}*g;\
		s*temporaryfiledir*${TEMPDIR}*g" < build-opt-env.tmp >$@
	chmod +x $@;


####################	
clean:
	-rm ${TODO}
