|
|
|
@ -1,10 +1,12 @@
|
|
|
|
|
### Programme ###
|
|
|
|
|
# XSLT-Prozessor:
|
|
|
|
|
PROCESSOR=xsltproc
|
|
|
|
|
PFLAGS=
|
|
|
|
|
PFLAGS=--catalogs
|
|
|
|
|
# XML-Validator
|
|
|
|
|
VALIDATOR=xmllint
|
|
|
|
|
VFLAGS=--noout --valid
|
|
|
|
|
VFLAGS=--noout --valid --catalogs
|
|
|
|
|
SGML_CATALOG_FILES=$(XML_CATALOG)
|
|
|
|
|
export SGML_CATALOG_FILES
|
|
|
|
|
# Downloadmanager (Alternativ: curl, fetch):
|
|
|
|
|
WGET=wget --timestamping
|
|
|
|
|
# rsync
|
|
|
|
@ -21,6 +23,8 @@ STYLE=xsl/xhtml.xsl
|
|
|
|
|
DS_STYLE=xsl/datenspuren/xhtml.xsl
|
|
|
|
|
# Document-Type-Definition:
|
|
|
|
|
DTD:=dtd/c3d2web.dtd
|
|
|
|
|
# XML-Katalog (Pfad zu den DTDs) - wird benötigt vom Validator
|
|
|
|
|
XML_CATALOG:=dtd/catalog.xml
|
|
|
|
|
# Navigationsleiste:
|
|
|
|
|
NAVIGATION=content/navigation.xml
|
|
|
|
|
# Chaosupdates:
|
|
|
|
@ -35,20 +39,19 @@ PAGES:=$(patsubst content/pages/%.xml, build/%.html, $(wildcard content/pages/*.
|
|
|
|
|
# Seiten zu einzelnen News-Items:
|
|
|
|
|
NEWS_PAGES:=$(patsubst content/news/%.xml, build/news/%.html, $(wildcard content/news/*.xml))
|
|
|
|
|
# News-Index und Feeds:
|
|
|
|
|
NEWSFILES:=www/news.html www/news-rss.xml www/news-atom.xml
|
|
|
|
|
NEWSFILES:=build/news.html build/news-rss.xml build/news-atom.xml
|
|
|
|
|
# Datenspuren-Seiten:
|
|
|
|
|
DS_PAGES:=$(patsubst content/datenspuren/%.xml, www/datenspuren/%.html, $(wildcard content/datenspuren/*.xml)) www/datenspuren/schedule.html
|
|
|
|
|
DS_PAGES:=$(patsubst content/datenspuren/%.xml, build/datenspuren/%.html, $(wildcard content/datenspuren/*.xml)) build/datenspuren/schedule.html
|
|
|
|
|
|
|
|
|
|
# Quellen
|
|
|
|
|
|
|
|
|
|
NEWSITEMS:=$(wildcard content/news/*.xml))
|
|
|
|
|
CLEAN=$(CONTENT) $(NEWSFILES) $(WWW_CCC_DE_UPDATES)
|
|
|
|
|
NEWSITEMS:=$(wildcard content/news/*.xml)
|
|
|
|
|
CLEAN=$(CONTENT) $(NEWSFILES) $(WWW_CCC_DE_UPDATES) $(DS_PAGES)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Defaults ###
|
|
|
|
|
|
|
|
|
|
www: $(CONTENT) $(DTD)
|
|
|
|
|
$(RSYNC) $(RSYNC_FLAGS) content/static build/ $@
|
|
|
|
|
www: $(XML_CATALOG) $(CONTENT)
|
|
|
|
|
$(RSYNC) $(RSYNC_FLAGS) content/static/ build/ $@
|
|
|
|
|
|
|
|
|
|
.SILENT: check
|
|
|
|
|
.PHONY: check
|
|
|
|
@ -58,37 +61,40 @@ check: $(PAGES)
|
|
|
|
|
echo "Checking $${page}..." ; \
|
|
|
|
|
$(VALIDATOR) $(VFLAGS) $${page} ; \
|
|
|
|
|
done
|
|
|
|
|
rm -f www/DTD
|
|
|
|
|
|
|
|
|
|
### Regeln für den XSLT-Prozess ###
|
|
|
|
|
www/news.html: $(STYLE)
|
|
|
|
|
www/news-rss.xml: xsl/rss.xsl
|
|
|
|
|
www/news-atom.xml: xsl/atom.xsl
|
|
|
|
|
|
|
|
|
|
www/news.html www/news-rss.xml www/news-atom.xml: $(NAVIGATION) $(NEWSITEMS)
|
|
|
|
|
build/news.html: $(STYLE)
|
|
|
|
|
build/news-rss.xml: xsl/rss.xsl
|
|
|
|
|
build/news-atom.xml: xsl/atom.xsl
|
|
|
|
|
|
|
|
|
|
$(NEWSFILES) : STYLE=$(filter-out $(NEWSITEMS) $(NAVIGATION),$^)
|
|
|
|
|
$(NEWSFILES): $(NAVIGATION) $(NEWSITEMS)
|
|
|
|
|
for item in $(NEWSITEMS) ; do \
|
|
|
|
|
$(VALIDATOR) $(VFLAGS) $${item} || exit 1 ; \
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
sh scripts/gen_news.xml.sh $(NEWS_ITEMS) | $(PROCESSOR) $(PFLAGS) -o $@ -
|
|
|
|
|
sh scripts/gen_news.xml.sh $(NEWSITEMS) | $(PROCESSOR) $(PFLAGS) -o $@ $(STYLE) -
|
|
|
|
|
|
|
|
|
|
content/datenspuren/schedule.xml: www/datenspuren/fahrplan/days.de.html
|
|
|
|
|
content/datenspuren/schedule.xml: content/static/datenspuren/fahrplan/days.de.html
|
|
|
|
|
cp $< $@
|
|
|
|
|
|
|
|
|
|
build/%.html: content/pages/%.xml $(STYLE) $(NAVIGATION) $(WWW_CCC_DE_UPDATES)
|
|
|
|
|
$(VALIDATOR) $(VFLAGS) $<
|
|
|
|
|
$(PROCESSOR) $(PFLAGS) -o $@ $(STYLE) $<
|
|
|
|
|
|
|
|
|
|
www/datenspuren/%.html: content/datenspuren/%.xml $(DS_STYLE)
|
|
|
|
|
build/datenspuren/%.html: content/datenspuren/%.xml $(DS_STYLE)
|
|
|
|
|
# -- MNE-20060421: Lt. Astro geht Validierung noch nicht mit dem Fahrplan,
|
|
|
|
|
# daher fuer Datenspuren auskommentiert
|
|
|
|
|
$(VALIDATOR) $(VFLAGS) $<
|
|
|
|
|
$(PROCESSOR) $(PFLAGS) -o $@ $(DS_STYLE) $<
|
|
|
|
|
|
|
|
|
|
build/news/%.html: content/news/%.xml $(STYLE) $(NAVIGATION) $(WWW_CCC_DE_UPDATES)
|
|
|
|
|
$(VALIDATOR) $(VFLAGS) $<
|
|
|
|
|
$(PROCESSOR) $(PFLAGS) -o $@ $(STYLE) $<
|
|
|
|
|
|
|
|
|
|
#www/news/%.html: content/news/%.xml $(STYLE) $(NAVIGATION) $(WWW_CCC_DE_UPDATES)
|
|
|
|
|
# $(VALIDATOR) $(VFLAGS) $<
|
|
|
|
|
# $(PROCESSOR) $(PFLAGS) -o $@ $(STYLE) $<
|
|
|
|
|
dtd/catalog.xml:
|
|
|
|
|
sh scripts/gen_catalog.xml.sh > $@
|
|
|
|
|
|
|
|
|
|
### Die neuesten Chaosupdates holen ###
|
|
|
|
|
$(WWW_CCC_DE_UPDATES):
|
|
|
|
@ -96,10 +102,6 @@ $(WWW_CCC_DE_UPDATES):
|
|
|
|
|
cp chaosupdates-2006-01-02.rdf $@
|
|
|
|
|
|
|
|
|
|
### Mr. Propper ###
|
|
|
|
|
.PHONY: clean
|
|
|
|
|
clean:
|
|
|
|
|
rm -f $(CLEAN)
|
|
|
|
|
|
|
|
|
|
mrproper: clean
|
|
|
|
|
rm -f $(WWW_CCC_DE_UPDATES)
|
|
|
|
|
rm -f $(XHTML_DTD_FILES)
|
|
|
|
|
rm -rf www-export
|
|
|
|
|