You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
169 lines
4.6 KiB
169 lines
4.6 KiB
# $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
|
|
|