#
# $Id: Makefile,v 1.14 2014/07/08 07:23:59 he Exp $
#

SCRIPTS=addup.pl date.pl newtimelocal.pl \
	new-read-raw-log.pl new-read-hr-log.pl \
	plot.pl perc.pl perc-5m.pl read-5m-sum.pl \
	read-day-report.pl read-hr-log.pl read-raw-log.pl \
	read-week-report.pl reverse.pl \
	scaling.pl search.pl timelocal.pl tmpfiles.pl utils.pl \
	conn-common.pl

MODULES=conn.pm

SUBST=	${.CURDIR}/../../subst

all:

install:
	@for s in ${SCRIPTS}; do \
		dst=${LIBDIR}/$$s; \
		tmp=/tmp/comtmp.$$$$; \
		echo sed -f ${SUBST} '<' $$s '>' $$tmp; \
		sed -f ${SUBST} < $$s > $$tmp; \
		echo install -c -m 444 $$tmp $$dst; \
		install -c -m 444 $$tmp $$dst; \
		echo rm -f $$tmp; \
		rm -f $$tmp; \
	done
	@if [ ! -d ${LIBDIR}/Zino ]; then \
		echo mkdir -p ${LIBDIR}/Zino; \
		mkdir -p ${LIBDIR}/Zino; \
	fi
	@for m in ${MODULES}; do \
		dst=${LIBDIR}/Zino/$$m; \
		tmp=/tmp/comtmp.$$$$; \
		echo sed -f ${SUBST} '<' $$m '>' $$tmp; \
		sed -f ${SUBST} <$$m >$$tmp; \
		echo install -c -m 444 $$tmp $$dst; \
		install -c -m 444 $$tmp $$dst; \
		echo rm -f $$tmp; \
		rm -f $$tmp; \
	done

obj:
clean:
cleandir:

.include "../../Makefile.inc"
