Fix events creation by properly generating curdate.xml file which the
XSLT script needs to reason about which events are in the future and which have already occurred. It's not clear to me how Emily broke this in the first place, but this fixes it at least.
This commit is contained in:
parent
76380a98fe
commit
a28c4d1ff1
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=25862
1 changed files with 23 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
# $FreeBSD: www/en/events/Makefile,v 1.9 2005/09/18 04:33:45 hrs Exp $
|
||||
# $FreeBSD: www/en/events/Makefile,v 1.10 2005/10/04 18:28:28 hrs Exp $
|
||||
|
||||
.if exists(../Makefile.conf)
|
||||
.include "../Makefile.conf"
|
||||
|
@ -9,6 +9,8 @@
|
|||
|
||||
SUBDIR= 2002
|
||||
SUBDIR+= 2003
|
||||
DATE?= /bin/date
|
||||
TR?= /usr/bin/tr
|
||||
|
||||
DATA= events.css
|
||||
|
||||
|
@ -17,11 +19,30 @@ CLEANFILES+= curdate.xml
|
|||
XMLLINT?= /usr/local/bin/xmllint # Part of textproc/libxml2.
|
||||
|
||||
XMLDOCS+= events
|
||||
DEPENDSET.events= events
|
||||
DEPENDSET.events= events curdate.xml
|
||||
SRCS.events= ../includes.xsl curdate.xml
|
||||
|
||||
XMLDOCS+= events_ics:${WEB_PREFIX}/share/sgml/events2ics.xsl:events.xml:events.ics
|
||||
|
||||
lint:
|
||||
${XMLLINT} ${XMLLINTOPTS} --valid -o /dev/null ${.CURDIR}/events.xml
|
||||
|
||||
.if !make(install)
|
||||
.PHONY: curdate.xml
|
||||
.endif
|
||||
curdate.xml:
|
||||
@${ECHO} "Generating ${.TARGET}"
|
||||
@${ECHO_CMD} '<?xml version="1.0"?>' > ${.TARGET}
|
||||
@${ECHO_CMD} '<curdate>' >> ${.TARGET}
|
||||
@${ECHO_CMD} -n ' <year>' >> ${.TARGET}
|
||||
@${DATE} +%Y | ${TR} -d "\n" >> ${.TARGET}
|
||||
@${ECHO_CMD} '</year>' >> ${.TARGET}
|
||||
@${ECHO_CMD} -n ' <month>' >> ${.TARGET}
|
||||
@${DATE} +%m | ${TR} -d "\n" >> ${.TARGET}
|
||||
@${ECHO_CMD} '</month>' >> ${.TARGET}
|
||||
@${ECHO_CMD} -n ' <day>' >> ${.TARGET}
|
||||
@${DATE} +%d | ${TR} -d "\n" >> ${.TARGET}
|
||||
@${ECHO_CMD} '</day>' >> ${.TARGET}
|
||||
@${ECHO_CMD} '</curdate>' >> ${.TARGET}
|
||||
|
||||
.include "${WEB_PREFIX}/share/mk/web.site.mk"
|
||||
|
|
Loading…
Reference in a new issue