aboutsummaryrefslogtreecommitdiff
path: root/fr/events/Makefile
blob: e39fd9416c79f819518116d7165d91a4953ab81e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# $FreeBSD: www/fr/events/Makefile,v 1.1 2004/03/06 17:33:18 stephane Exp $

# The FreeBSD French Documentation Project
# Original revision: 1.11

.if exists(../Makefile.conf)
.include "../Makefile.conf"
.endif
.if exists(../Makefile.inc)
.include "../Makefile.inc"
.endif

# SUBDIR= 2002 2003
DATE?= /bin/date
TR?= /usr/bin/tr

DATA=	events.css

CLEANFILES+= curdate.xml

XMLLINT?= /usr/local/bin/xmllint # Part of textproc/libxml2.

XMLDOCS+=	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"