diff --git a/en/events/Makefile b/en/events/Makefile index 47cf8e8e99..74bd329fc0 100644 --- a/en/events/Makefile +++ b/en/events/Makefile @@ -1,49 +1,53 @@ -# $FreeBSD: www/en/events/Makefile,v 1.5 2003/10/15 15:10:47 simon Exp $ +# $FreeBSD: www/en/events/Makefile,v 1.6 2004/04/06 00:05:46 phantom Exp $ .if exists(../Makefile.conf) .include "../Makefile.conf" .endif .if exists(../Makefile.inc) .include "../Makefile.inc" .endif -SUBDIR= 2002 2003 - -DATA= events.css +SUBDIR= 2002 +SUBDIR+= 2003 +DATA= events.css DATA+= events.html -CLEANFILES+= events.html curdate.xml + +CLEANFILES+= events.html +CLEANFILES+= curdate.xml INDEXLINK= events.html DATE?= /bin/date TR?= /usr/bin/tr XMLLINT?= /usr/local/bin/xmllint # Part of textproc/libxml2. events.html: events.xsl events.xml ../includes.xsl curdate.xml ${XSLTPROC} ${XSLTPROCOPTS} -o ${.TARGET} \ ${.CURDIR}/events.xsl ${.CURDIR}/events.xml .if !defined(NO_TIDY) -${TIDY} ${TIDYOPTS} ${.TARGET} .endif lint: ${XMLLINT} --valid -o /dev/null ${.CURDIR}/events.xml -# XXX TODO: Handle this better, so curdate.xml isn't rebuild on install. -curdate.xml! +.if !make(install) +.PHONY: curdate.xml +.endif +curdate.xml: @${ECHO} "Generating ${.TARGET}" @${ECHO_CMD} '' > ${.TARGET} @${ECHO_CMD} '' >> ${.TARGET} @${ECHO_CMD} -n ' ' >> ${.TARGET} @${DATE} +%Y | ${TR} -d "\n" >> ${.TARGET} @${ECHO_CMD} '' >> ${.TARGET} @${ECHO_CMD} -n ' ' >> ${.TARGET} @${DATE} +%m | ${TR} -d "\n" >> ${.TARGET} @${ECHO_CMD} '' >> ${.TARGET} @${ECHO_CMD} -n ' ' >> ${.TARGET} @${DATE} +%d | ${TR} -d "\n" >> ${.TARGET} @${ECHO_CMD} '' >> ${.TARGET} @${ECHO_CMD} '' >> ${.TARGET} .include "${WEB_PREFIX}/share/mk/web.site.mk"