Update of /cvsroot/fink/web/xml/news
In directory vz-cvs-3.sog:/tmp/cvs-serv19555/news

Modified Files:
        Makefile 
Log Message:
Have one Make rule per language instead of one monolithic rule for all

Thus now builds parallelize better, and if only one xml file changes
than only that one file needs to be reprocessed.


Index: Makefile
===================================================================
RCS file: /cvsroot/fink/web/xml/news/Makefile,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- Makefile    25 Oct 2011 02:12:33 -0000      1.11
+++ Makefile    27 Oct 2011 12:08:29 -0000      1.12
@@ -22,13 +22,20 @@
 include $(basedir)/Makefile.common
 
 # Custom rendering
-%.inc.tmp: $(SOURCE) $(STYLESHEET_WEBSITE)
-       xmllint --noout --valid $(SOURCE)
-       $(foreach LANGUAGE, $(LANGUAGES), xsltproc -o index.$(LANGUAGE).php.tmp 
$(STYLESHEET_WEBSITE) news.$(LANGUAGE).xml; )
+define NEWS_TEMPLATE
+#%.inc.tmp: $(SOURCE) $(STYLESHEET_WEBSITE)
+%.$(1).inc.tmp: news.$(1).xml $(STYLESHEET_WEBSITE)
+       xmllint --noout --valid $$<
+       xsltproc -o index.$(1).php.tmp $(STYLESHEET_WEBSITE) $$<
+
+#%.rdf: $(SOURCE) $(STYLESHEET_RDF)
+%.$(1).rdf: $(BASE_SOURCE).$(1).xml $(STYLESHEET_RDF)
+       xmllint --noout --valid $$<
+       xsltproc --stringparam currdate "$(W3CDTFDATE)" -o $$@ 
$(STYLESHEET_RDF) $$<
+endef
+
+$(foreach LANG,$(LANGUAGES_AVAILABLE),$(eval $(call NEWS_TEMPLATE,$(LANG))))
 
-%.rdf: $(SOURCE) $(STYLESHEET_RDF)
-       xmllint --noout --valid $(SOURCE)
-       $(foreach XMLFILE, $(SOURCE), xsltproc --stringparam currdate 
"$(W3CDTFDATE)" -o $(subst .xml,.rdf,$(XMLFILE)) $(STYLESHEET_RDF) $(XMLFILE); )
 
 %.inc: %.inc.tmp $(PROCESS_WEBSITE)
        $(PROCESS_WEBSITE) <$< >$@


------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to