# first time : touch depends.tabular depends.textonly ; make depends ; make # clean and start over : make distclean ; make TEXTONLY=1 distclean DOCBOOK_SRC=docbook-xml-src XML_CATALOG_FILES=catalog.xml PROC=XML_CATALOG_FILES=$(XML_CATALOG_FILES) xsltproc #XMLTO=XML_CATALOG_FILES=$(XML_CATALOG_FILES) xmlto XMLTO=xmlto PROCOPT= WEBSITEDIR=/usr/share/xml/docbook/custom/website/2.6.0 #WEBSITEDIR=docbook-website-2.6.0 STYLEDIR=$(WEBSITEDIR)/xsl #TABSTYLE=$(STYLEDIR)/tabular.xsl TABSTYLE=my-tabular.xsl #WEBSTYLE=$(STYLEDIR)/website.xsl WEBSTYLE=my-website.xsl #BIBLIOSTYLE=Eur.J.Pharmacol. BIBLIOSTYLE=obergix. #VALIDATE=--skip-validation VALIDATE= MONOBLOC_XMLTO_PARAMS=-v $(VALIDATE) -x mystylesheet.xsl STYLEOPT= #DESTPATH=. HTML_DESTPATH=. TEXT_DESTPATH=text DESTPATH=$(HTML_DESTPATH) # Produce text-only instead of HTML ? TEXTONLY=0 # Produce tablular (TAB) or website (WEB) ? WHICHSTYLE=TAB USETIDY=0 #GRAPHICSDIR=$(WEBSITEDIR)/graphics GRAPHICSDIR=/usr/share/doc/docbook-website/examples/graphics MONOBLOC_PUBLICATIONS=publications_monobloc/lelogiciellibreen2003_monobloc.html publications_monobloc/contribllanneetic2004_monobloc.html publications_monobloc/whyhowtocontribute_monobloc.html publications_monobloc/contribllanneetic2004_monobloc.ps publications_monobloc/jres-en_monobloc.html publications_monobloc/jres-en_monobloc-en.html # publications_monobloc/jres-en_monobloc.ps publications_monobloc/jres-en_monobloc-en.ps .PHONY : clean graphics all: # publications $(MAKE) -C docbook-xml-src stylename=$(BIBLIOSTYLE) basename=publications_bib contentsname=publications_contents publications_bib.bib.xml $(MAKE) -C docbook-xml-src stylename=$(BIBLIOSTYLE) basename=publications_bib bib # integrationapplibres $(MAKE) -C docbook-xml-src stylename=$(BIBLIOSTYLE) basename=integrationapplibres_bib contentsname=integrationapplibres_contents publications_bib.bib.xml $(MAKE) -C docbook-xml-src stylename=$(BIBLIOSTYLE) basename=integrationapplibres_bib bib # integrationlibresoft $(MAKE) -C docbook-xml-src stylename=$(BIBLIOSTYLE) basename=integrationlibresoft_bib bib # whyhowtocontribute $(MAKE) -C docbook-xml-src stylename=$(BIBLIOSTYLE) basename=whyhowtocontribute_bib contentsname=whyhowtocontribute_contents whyhowtocontribute_bib.bib.xml $(MAKE) -C docbook-xml-src stylename=$(BIBLIOSTYLE) basename=whyhowtocontribute_bib bib $(MAKE) website $(MAKE) textonly $(MAKE) $(MONOBLOC_PUBLICATIONS) $(MAKE) desc-proget cd en; make ifeq ($(TEXTONLY),0) ifeq ($(WHICHSTYLE),TAB) STYLESHEET=$(TABSTYLE) else STYLESHEET=$(WEBSTYLE) endif TEXTOPT= include depends.tabular else STYLESHEET=$(WEBSTYLE) TEXTOPT= DESTPATH=$(TEXT_DESTPATH) include depends.textonly endif autolayout.xml: layout.xml $(PROC) $(PROCOPT) -o $@ $(STYLEDIR)/autolayout.xsl $< $(MAKE) depends $(DOCBOOK_SRC)/website.database.xml: autolayout.xml $(PROC) $(PROCOPT) -o $@ --stringparam output-root $(DESTPATH) $(STYLEDIR)/website-targets.xsl $< depends: autolayout.xml $(PROC) $(PROCOPT) -o depends.tabular --stringparam output-root $(HTML_DESTPATH) $(STYLEDIR)/$(MAKE)file-dep.xsl $< # $(PROC) $(PROCOPT) -o depends.textonly --stringparam output-root $(DESTPATH) --stringparam filename-prefix txt $(STYLEDIR)/$(MAKE)file-dep.xsl $< $(PROC) $(PROCOPT) -o depends.textonly --stringparam output-root $(TEXT_DESTPATH) $(STYLEDIR)/$(MAKE)file-dep.xsl $< sed -i.bak "s/depends.tabular/depends.textonly/g" depends.textonly $(MAKE) $(DOCBOOK_SRC)/website.database.xml %.html: $(DOCBOOK_SRC)/website.database.xml $(STYLESHEET) $(PROC) $(PROCOPT) -o $@ --stringparam website.database.document website.database.xml --stringparam autolayout-file $$(pwd)/autolayout.xml --stringparam output-root $(DESTPATH) $(STYLESHEET) $(firstword $(filter-out $(STYLESHEET),$(filter-out $(DOCBOOK_SRC)/website.database.xml,$^))) ifeq ($(USETIDY),1) -tidy -iq -latin1 -mn $@ endif ## RDDL gets its own rule because we never want to call tidy on it #rddl.html: autolayout.xml ## xjparse $(filter-out autolayout.xml,$^) # $(PROC) $(PROCOPT) $(filter-out autolayout.xml,$^) $(STYLESHEET) $@ $(TEXTOPT) $(STYLEOPT) graphics: cp -i -r $(GRAPHICSDIR)/. graphics index.html: $(DOCBOOK_SRC)/website.xml $(DOCBOOK_SRC)/productions.xml $(DOCBOOK_SRC)/publications_contents.xml $(DOCBOOK_SRC)/publications_bibli.xml $(DOCBOOK_SRC)/projects_contents.xml text/index.html: $(DOCBOOK_SRC)/website.xml $(DOCBOOK_SRC)/productions.xml $(DOCBOOK_SRC)/publications_contents.xml $(DOCBOOK_SRC)/publications_bibli.xml $(DOCBOOK_SRC)/projects_contents.xml presentations.html: $(DOCBOOK_SRC)/presentations.xml $(DOCBOOK_SRC)/productions.xml text/presentations.html: $(DOCBOOK_SRC)/presentations.xml $(DOCBOOK_SRC)/productions.xml publications/publications.html: $(DOCBOOK_SRC)/publications.xml $(DOCBOOK_SRC)/publications_contents.xml $(DOCBOOK_SRC)/publications_bib.bib.xml text/publications/publications.html: $(DOCBOOK_SRC)/publications.xml $(DOCBOOK_SRC)/publications_contents.xml $(DOCBOOK_SRC)/publications_bib.bib.xml publications/lelogiciellibreen2003.html: $(DOCBOOK_SRC)/lelogiciellibreen2003.xml $(DOCBOOK_SRC)/lelogiciellibreen2003_contents.xml text/publications/lelogiciellibreen2003.html: $(DOCBOOK_SRC)/lelogiciellibreen2003.xml $(DOCBOOK_SRC)/lelogiciellibreen2003_contents.xml publications/contrib-ll-annee-tic-2004.html: $(DOCBOOK_SRC)/contrib-ll-annee-tic-2004.xml $(DOCBOOK_SRC)/contrib-ll-annee-tic-2004_contents.xml text/publications/contrib-ll-annee-tic-2004.html: $(DOCBOOK_SRC)/contrib-ll-annee-tic-2004.xml $(DOCBOOK_SRC)/contrib-ll-annee-tic-2004_contents.xml publications/projects.html: $(DOCBOOK_SRC)/projects.xml $(DOCBOOK_SRC)/projects_contents.xml $(DOCBOOK_SRC)/devprojects_contents.xml text/publications/projects.html: $(DOCBOOK_SRC)/projects.xml $(DOCBOOK_SRC)/projects_contents.xml $(DOCBOOK_SRC)/devprojects_contents.xml publications/devprojects.html: $(DOCBOOK_SRC)/devprojects.xml $(DOCBOOK_SRC)/devprojects_contents.xml text/publications/devprojects.html: $(DOCBOOK_SRC)/devprojects.xml $(DOCBOOK_SRC)/devprojects_contents.xml publications/whyhowtocontribute.html: $(DOCBOOK_SRC)/whyhowtocontribute.xml $(DOCBOOK_SRC)/whyhowtocontribute_contents.xml text/publications/whyhowtocontribute.html: $(DOCBOOK_SRC)/whyhowtocontribute.xml $(DOCBOOK_SRC)/whyhowtocontribute_contents.xml publications/integrationapplibres.html: $(DOCBOOK_SRC)/integrationapplibres.xml $(DOCBOOK_SRC)/integrationapplibres_contents.xml $(DOCBOOK_SRC)/integrationapplibres_bib.bib.xml text/publications/integrationapplibres.html: $(DOCBOOK_SRC)/integrationapplibres.xml $(DOCBOOK_SRC)/integrationapplibres_contents.xml $(DOCBOOK_SRC)/integrationapplibres_bib.bib.xml publications/integrationlibresoft.html: $(DOCBOOK_SRC)/integrationlibresoft.xml $(DOCBOOK_SRC)/integrationlibresoft_contents.xml $(DOCBOOK_SRC)/integrationlibresoft_bib.bib.xml text/publications/integrationlibresoft.html: $(DOCBOOK_SRC)/integrationlibresoft.xml $(DOCBOOK_SRC)/integrationlibresoft_contents.xml $(DOCBOOK_SRC)/integrationlibresoft_bib.bib.xml coin_monobloc.html: coin_monobloc.xml coin_contents.xml $(XMLTO) html-nochunks $< publications_monobloc/jres-en_monobloc-en.html: $(DOCBOOK_SRC)/jres-en_monobloc-en.xml $(DOCBOOK_SRC)/jres-en_contents.xml $(XMLTO) -o publications_monobloc/ $(MONOBLOC_XMLTO_PARAMS) html-nochunks $< publications_monobloc/jres-en_monobloc.html: $(DOCBOOK_SRC)/jres-en_monobloc.xml $(DOCBOOK_SRC)/jres-en_contents.xml $(XMLTO) -o publications_monobloc/ $(MONOBLOC_XMLTO_PARAMS) html-nochunks $< publications_monobloc/whyhowtocontribute_monobloc.html: $(DOCBOOK_SRC)/whyhowtocontribute_monobloc.xml $(DOCBOOK_SRC)/whyhowtocontribute_contents.xml $(XMLTO) -o publications_monobloc/ $(MONOBLOC_XMLTO_PARAMS) html-nochunks $< publications_monobloc/lelogiciellibreen2003_monobloc.html: $(DOCBOOK_SRC)/lelogiciellibreen2003_monobloc.xml $(DOCBOOK_SRC)/lelogiciellibreen2003_contents.xml $(XMLTO) -o publications_monobloc/ $(MONOBLOC_XMLTO_PARAMS) html-nochunks $< publications_monobloc/contribllanneetic2004_monobloc.html: $(DOCBOOK_SRC)/contribllanneetic2004_monobloc.xml $(DOCBOOK_SRC)/contrib-ll-annee-tic-2004_contents.xml $(XMLTO) -o publications_monobloc/ $(MONOBLOC_XMLTO_PARAMS) html-nochunks $< publications_monobloc/contribllanneetic2004_monobloc.ps: $(DOCBOOK_SRC)/contribllanneetic2004_monobloc.xml $(DOCBOOK_SRC)/contrib-ll-annee-tic-2004_contents.xml # docbook2ps -o publications_monobloc/ $< $(XMLTO) -o publications_monobloc/ -x mypdfstylesheet.xml fo $< fop publications_monobloc/contribllanneetic2004_monobloc.fo publications_monobloc/contribllanneetic2004_monobloc.ps publications_monobloc/jres-en_monobloc.ps: $(DOCBOOK_SRC)/jres-en_monobloc.xml $(DOCBOOK_SRC)/contrib-ll-annee-tic-2004_contents.xml # docbook2ps -o publications_monobloc/ $< $(XMLTO) -o publications_monobloc/ -x mypdfstylesheet.xml fo $< fop publications_monobloc/jres-en_monobloc.fo publications_monobloc/jres-en_monobloc.ps publications_monobloc/jres-en_monobloc-en.ps: $(DOCBOOK_SRC)/jres-en_monobloc-en.xml $(DOCBOOK_SRC)/contrib-ll-annee-tic-2004_contents.xml # docbook2ps -o publications_monobloc/ $< $(XMLTO) -o publications_monobloc/ pdf $< pdf2ps publications_monobloc/jres-en_monobloc-en.pdf $@ # $(XMLTO) -o publications_monobloc/ -x mypdfstylesheet.xml fo $< # fop publications_monobloc/jres-en_monobloc-en.fo publications_monobloc/jres-en_monobloc-en.ps monobloc_clean: $(RM) -f publications_monobloc/whyhowtocontribute_monobloc.html publications_monobloc/lelogiciellibreen2003_monobloc.html publications_monobloc/contribllanneetic2004_monobloc.html publications_monobloc/contribllanneetic2004_monobloc.ps desc-proget: cd docbook-xml-src && $(XMLTO) -x desc-proget.xsl -o desc-proget html desc-proget.xml docbook-xml-src_clean: $(MAKE) -C docbook-xml-src stylename=$(BIBLIOSTYLE) basename=publications_bib clean $(MAKE) -C docbook-xml-src stylename=$(BIBLIOSTYLE) basename=integrationlibresoft_bib clean linkchecker: linkchecker -r 3 --ignore-url=^mailto: -Ftext/linkchecker.log index.html textonly: $(MAKE) TEXTONLY=1 website all_clean: $(MAKE) clean $(MAKE) TEXTONLY=1 clean $(MAKE) docbook-xml-src_clean