Makefile
4.59 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# $Id: Makefile,v 1.27 2006/09/11 14:12:32 connolly Exp $
###
# stuff outside this directory
PYTHON=python
PERL=perl
# root of working copy of http://www.w3.org/
W=../../..
# swap directory containing cwm
SWAP=$(W)/2000/10/swap
CWM=$(SWAP)/cwm.py
# The RDF Calendar schema is generated using sniffSchema.n3 using these
# three .rdf files for data. The .rdf files are generated from their
# respective .ics versions using ical2rdf.pl.
DATA_FOR_SCHEMA=test/mtg.rdf test/cal01.rdf test/gkexample.rdf
# per debian evolution-data-server package
TZICAL=/usr/share/evolution-data-server-1.0/zoneinfo/
FIND=find
# VERBOSE=-v
# IGNORE=-i
# START=-s 20
.SUFFIXES: .xml .rdf .n3
.n3.rdf:
$(PYTHON) $(CWM) $< --rdf >$@
all: schema tzdata retest
################
#
# building the schema
#
schema: icaltz
icaltz: icaltzd.rdf
# hmm... how to connect to test data? $(SWAP)/util/validate?
XSLTPROC=xsltproc
ical.n3: ical.rdf
$(PYTHON) $(CWM) --rdf rfc2445-formal.rdf --n3 >$@
icaltzd.rdf: webize2445.xsl rfc2445.html
$(XSLTPROC) -o $@ webize2445.xsl rfc2445.html
rfc2445.html: rfc2445.txt slurpIcalSpec.py
$(PYTHON) slurpIcalSpec.py 2445 <rfc2445.txt >$@
rfc2425.html: rfc2426.txt slurpIcalSpec.py
$(PYTHON) slurpIcalSpec.py 2425 <rfc2425.txt >$@
rfc2426.html: rfc2426.txt slurpIcalSpec.py
$(PYTHON) slurpIcalSpec.py 2426 <rfc2426.txt >$@
,decls.py: compDecls.py icaltzd.rdf
PYTHONPATH=$(SWAP) $(PYTHON) compDecls.py icaltzd.rdf >$@
WGET=wget -q
rfc2445.txt:
$(WGET) http://www.ietf.org/rfc/rfc2445.txt
#########
#
# timezone data
#
tzdata:
$(PYTHON) tzgrok.py $(TZICAL) tzd
#########
#
# Test harnesses
#
from-test: fromIcalTest.py
$(PYTHON) fromIcalTest.py $(SWAP)
retest: test/cal-retest.py test/cal-regression.n3
(cd test; PYTHONPATH=../$(SWAP) $(PYTHON) cal-retest.py $(IGNORE) $(VERBOSE) $(START) -f cal-regression.n3)
spec-tests: test/cal-retest.py test/cal-spec-examples.n3
(cd test; PYTHONPATH=../$(SWAP) $(PYTHON) cal-retest.py $(IGNORE) $(VERBOSE) $(START) -f cal-spec-examples.n3)
######
#
# pellet consistency check
JAVA=java
PELLET=~/src/pellet-1.3-beta
check1: ,p
,p: ,caldata.rdf
$(JAVA) -jar $(PELLET)/lib/pellet.jar -inputFile ,caldata.rdf -unsat >$@
,caldata.rdf: icaltzd.rdf test/cal01.rdf
$(PYTHON) $(SWAP)/cwm.py icaltzd.rdf test/cal01.rdf test/bus-hrs.rdf test/Todos1.rdf test/MovieInfo.rdf --rdf >$@
#########
# hCalendar tests
DEVCVS=$(HOME)/devcvs
PALMAGENT=$(DEVCVS)/2001/palmagent
hcal-test: event-test.ics
event-test.ics: event-test.rdf
PYTHONPATH=.:$(SWAP) $(PYTHON) $(SWAP)/pim/toIcal.py event-test.rdf >$@
event-test.rdf: glean-hcal.xsl $(PALMAGENT)/event-test.html
$(XSLTPROC) --output $@ glean-hcal.xsl $(PALMAGENT)/event-test.html
###########
#
# hCalendar/RDF/OWL/pellet mash-up
#
check-mash: ,check-mash ,check-mash-xfn
,check-mash-xfn: ,mash-xfn.rdf
$(JAVA) -jar $(PELLET)/lib/pellet.jar -inputFile ,mash-xfn.rdf -unsat >$@ 2>,jena-diags
,mash-xfn.rdf: ,e1.rdf ,e2x.rdf icaltzd.rdf mash/calbg.n3
$(PYTHON) $(SWAP)/cwm.py ,e1.rdf ,e2x.rdf mash/calbg.n3 mash/fam_ev.n3 --think icaltzd.rdf --base=abs: --data --rdf >$@
,check-mash: ,mash.rdf
$(JAVA) -jar $(PELLET)/lib/pellet.jar -inputFile ,mash.rdf -unsat >$@ 2>,jena-diags
,mash.rdf: ,e1.rdf ,e2.rdf icaltzd.rdf mash/calbg.n3
$(PYTHON) $(SWAP)/cwm.py ,e1.rdf ,e2.rdf mash/calbg.n3 --think icaltzd.rdf --base=abs: --data --rdf >$@
,mash.txt: ,mash-pf.n3
PYTHONPATH=$(SWAP)/.. $(PYTHON) $(SWAP)/check.py ,mash-pf.n3 >,mash.txt
,mash-pf.n3: ,e1.rdf ,e2.rdf icaltzd.rdf mash/calbg.n3 mash/rdfs.n3 mash/owlAx.n3 $(SWAP)/util/owlth.n3 mash/xnex.n3
$(PYTHON) $(SWAP)/cwm.py ,e1.rdf ,e2.rdf mash/calbg.n3 mash/rdfs.n3 mash/owlAx.n3 $(SWAP)/util/owlth.n3 --solve=mash/xnex.n3 --base=abs: --why >$@
# cheap grddl implementation...
,e1.rdf: mash/e1.html glean-hcal.xsl
$(XSLTPROC) --output $@ glean-hcal.xsl mash/e1.html
,e2.rdf: mash/e2.html glean-hcal.xsl
$(XSLTPROC) --output $@ glean-hcal.xsl mash/e2.html
,e2x.rdf: ,e2x1.rdf ,e2x2.rdf ,e2x3.rdf mash/fam_ev.n3
$(PYTHON) $(SWAP)/cwm.py ,e2x1.rdf ,e2x2.rdf ,e2x3.rdf mash/fam_ev.n3 --closure=e --think --data --rdf >$@
#Source is a KLUDGE
,e2x1.rdf: mash/e2x.html glean-hcal.xsl
$(XSLTPROC) --output $@ --stringparam Source ,e2x3.rdf glean-hcal.xsl mash/e2x.html
,e2x2.rdf: mash/e2x.html $(W)/2003/12/rdf-in-xhtml-xslts/grokXFN.xsl
$(XSLTPROC) --output $@ $(W)/2003/12/rdf-in-xhtml-xslts/grokXFN.xsl mash/e2x.html
,e2x3.rdf: mash/e2x.html
$(XSLTPROC) --output ,e2x3.rdf ,cache/extract-rdf.xsl mash/e2x.html
###########
clean:
-rm -f icaltzd.n3 icaltzd.rdf
-rm -f rfc2445.html rfc2445-formal.rdf rfc2445-formal.n3
-rm -f *.pyc
-rm -f test/,temp/*.rdf
-rm -f test/,temp/*.ics
-rm -f test/,compare/*.n3