I hate code duplication. :-)

git-svn-id: svn://svn.c3d2.de/c3d2-web/branches/toidinamais_coole_scheisse@78 31f61c52-7bfb-0310-b897-fc00f8a278f0
This commit is contained in:
toidinamai 2005-12-29 11:19:01 +00:00
parent dd1e5e2d9f
commit d2a78ef251
1 changed files with 6 additions and 12 deletions

View File

@ -33,25 +33,19 @@ CLEAN:=$(CONTENT) www/news.html www/news-rss.xml chaosupdates.rdf
contents: $(CONTENT)
### Regeln für den XSLT-Prozess ###
www/news.html: $(NEWSITEMS) $(STYLE) $(NAVIGATION)
{ echo '<?xml version="1.0" encoding="UTF-8"?>' ; \
echo "<page>"; \
echo " <news>"; \
for item in $^ ; do \
echo " <newsfile>$${item}</newsfile>"; \
done; \
echo " </news>"; \
echo "</page>"; } | $(PROCESSOR) -o $@ $(STYLE) -
www/news.html: $(STYLE)
www/news-rss.xml: $(STYLE_RSS)
www/news-rss.xml: $(NEWSITEMS) $(STYLE_RSS) $(NAVIGATION)
www/news.html www/news-rss.xml: $(NEWSITEMS) $(NAVIGATION)
{ echo '<?xml version="1.0" encoding="UTF-8"?>' ; \
echo "<page>"; \
echo " <news>"; \
for item in $^ ; do \
for item in $(NEWSITEMS) ; do \
echo " <newsfile>$${item}</newsfile>"; \
done; \
echo " </news>"; \
echo "</page>"; } | $(PROCESSOR) -o $@ $(STYLE_RSS) -
echo "</page>"; } | \
$(PROCESSOR) -o $@ $(filter-out $(NEWSITEMS) $(NAVIGATION),$^) -
www/%.html: content/%.xml $(STYLE) $(NAVIGATION) chaosupdates.rdf
$(PROCESSOR) -o $@ $(STYLE) $<