#
# $Id: Makefile,v 1.4 1999/08/16 11:54:23 alex Exp $
#
DIR=/p/stat
BIN=/p/stat/bin
WWW=/p/stat/WWW
LINKS=${WWW}/LINKS
RTE=../bin/RUS-to-ENG
L=
#L=.e for english version
#
SED=sed 's+/p/stat/WWW/LINKS+${LINKS}+;s+/p/stat/bin+${BIN}+;s+/v/stat/WWW+${WWW}+g;s+/v/noc/MON+${WWW}+g;s+/p/stat/STAT+${STAT}+g;s+/p/stat/ifsum+${STAT}/ifsum+g;s+/p/stat/TICKETS+${TICKETS}+g;s+/p/stat+${DIR}+g'
#
all:
	@ echo 'Nothing to translate. Can: make install / make binclean'
EFILES=\
index.html.e\
bin/FIN.cgi.e\
bin/OP.cgi.e\
bin/links.pll.e\
bin/l7.cgi.e\
bin/l0.cgi.e

ALL=    dirs\
	${LINKS}/index.html\
	${LINKS}/SRC/channel\
	${LINKS}/SRC/router.links.lck\
	${LINKS}/SRC/router.links\
	${LINKS}/SRC/router.lck\
	${LINKS}/SRC/router\
	${LINKS}/SRC/channel.links.lck\
	${LINKS}/SRC/channel.links\
	${LINKS}/SRC/channel.lck\
	${LINKS}/bin/FIN.cgi\
	${LINKS}/bin/nu\
	${LINKS}/bin/links.pll\
	${LINKS}/bin/l7.cgi\
	${LINKS}/bin/l0.cgi\
	${LINKS}/bin/daily\
	${LINKS}/bin/OP.cgi\
	${LINKS}/bin/ping.cgi\
	${LINKS}/bin/links.cron\
	${LINKS}/html/macnet.html\
	${LINKS}/html/m9-spb-2m.html\
	${LINKS}/provider/Rostelecom\
	${LINKS}/provider/Macomnet

install: ${ALL}

binclean:
	rm -f ${ALL}
dirs:
	-mkdir ${LINKS}
	-mkdir ${LINKS}/SRC
	-mkdir ${LINKS}/html
	-mkdir ${LINKS}/provider
	-mkdir ${LINKS}/bin
efiles: ${EFILES}

${LINKS}/index.html:index.html$L
	  ${SED} $? > $@
	  chmod ug+r $@

${LINKS}/SRC/channel:SRC/channel
	  ${SED} $? > $@
	  chmod ug+r $@

${LINKS}/SRC/router.links.lck:SRC/router.links.lck
	  ${SED} $? > $@
	  chmod ug+r $@

${LINKS}/SRC/router.links:SRC/router.links
	  ${SED} $? > $@
	  chmod ug+r $@

${LINKS}/SRC/router.lck:SRC/router.lck
	  ${SED} $? > $@
	  chmod ug+r $@

${LINKS}/SRC/router:SRC/router
	  ${SED} $? > $@
	  chmod ug+r $@

${LINKS}/SRC/channel.links.lck:SRC/channel.links.lck
	  ${SED} $? > $@
	  chmod ug+r $@

${LINKS}/SRC/channel.links:SRC/channel.links
	  ${SED} $? > $@
	  chmod ug+r $@

${LINKS}/SRC/channel.lck:SRC/channel.lck
	  ${SED} $? > $@
	  chmod ug+r $@

bin/FIN.cgi.e: bin/FIN.cgi
	${RTE} bin/FIN.cgi > bin/FIN.cgi.e

bin/OP.cgi.e: bin/OP.cgi
	${RTE} bin/OP.cgi > bin/OP.cgi.e

bin/links.pll.e: bin/links.pll
	${RTE} bin/links.pll > bin/links.pll.e

bin/l7.cgi.e: bin/l7.cgi
	${RTE} bin/l7.cgi > bin/l7.cgi.e

bin/l0.cgi.e: bin/l0.cgi
	${RTE} bin/l0.cgi > bin/l0.cgi.e

index.html.e: index.html
	${RTE} index.html > index.html.e



${LINKS}/bin/FIN.cgi:bin/FIN.cgi$L
	  ${SED} $? > $@
	  chmod ug+rx $@
${LINKS}/bin/links.pll:bin/links.pll$L
	  ${SED} $? > $@
	  chmod ug+rx $@
${LINKS}/bin/OP.cgi:bin/OP.cgi$L
	  ${SED} $? > $@
	  chmod ug+rx $@
${LINKS}/bin/l7.cgi:bin/l7.cgi$L
	  ${SED} $? > $@
	  chmod ug+rx $@
${LINKS}/bin/l0.cgi:bin/l0.cgi$L
	  ${SED} $? > $@
	  chmod ug+rx $@
${LINKS}/bin/daily:bin/daily
	  ${SED} $? > $@
	  chmod ug+rx $@
${LINKS}/bin/ping.cgi:bin/ping.cgi
	  ${SED} $? > $@
	  chmod ug+rx $@
${LINKS}/bin/links.cron:bin/links.cron
	  ${SED} $? > $@
	  chmod ug+rx $@
${LINKS}/bin/nu:bin/nu
	  ${SED} $? > $@
	  chmod ug+rx $@
${LINKS}/html/macnet.html:html/macnet.html
	  ${SED} $? > $@
	  chmod ug+r $@
${LINKS}/html/m9-spb-2m.html:html/m9-spb-2m.html
	  ${SED} $? > $@
	  chmod ug+r $@
${LINKS}/provider/Rostelecom:provider/Rostelecom
	  ${SED} $? > $@
	  chmod ug+r $@
${LINKS}/provider/Macomnet:provider/Macomnet
	  ${SED} $? > $@
	  chmod ug+r $@

