#+ # # module # ====== # # generation of documentations from XML files in HTML and wiki forms # # FILES # ===== # # original location # ~~~~~~~~~~~~~~~~~ # # /usr/home/fplod/incas/ircaam/ircaam_ws/adm/guides/makefile sur aedon.locean-ipsl.upmc.fr # # EVOLUTIONS # ========== # # $Id$ # # - fplod 2008-12-03T18:05:28Z aedon.locean-ipsl.upmc.fr (Darwin) # # * creation # #- PRODUCT = \ ircaam DIRSRC = \ ./ DIRTMP = \ ./ DIRWWW = \ ../../doc/guides/ DIRWIKI = \ $(DIRWWW)/wiki/ LIST_XML = \ LIST_XML_en \ LIST_XML_fr LIST_XML_en = \ $(DIRSRC)/svnbasiccommands.xml LIST_XML_fr = \ $(DIRSRC)/web.xml .PHONY : \ all \ clean \ before \ dbkcheck \ spellcheck \ help \ html \ tracwiki help : @echo "\$$ make clean" @echo "\$$ make before" @echo "\$$ make all" @echo "\$$ make dbkcheck" @echo "++ check link" @echo "++ depot html et wiki" before : @mkdir -p ${DIRWWW}/html/ @cp -p $(DIRSRC)/style.css ${DIRWWW}/html/ @cp -p $(DIRSRC)/$(PRODUCT).css ${DIRWWW}/html/ @mkdir -p ${DIRWWW}/wiki clean : \ cleantmp -@rm -rf ${DIRWWW}/html/ -@rm -rf ${DIRWWW}/wiki/ cleantmp : -@rm -f $(DIRTMP)/*_full.xml -@rm -f $(DIRTMP)/err_xmlstarlet_xsd -@rm -f $(DIRTMP)/get_sed.xml -@rm -f $(DIRTMP)/firststeps_sed.xml spellcheck : @for file in $(LIST_XML_fr); do \ aspell --mode=sgml --master=french -c $${file}; done @for file in $(LIST_XML_en); do \ aspell --mode=sgml --master=english -c $${file}; done dbkcheck : @-rm $(DIRTMP)/err_xmlstarlet_xsd 2> /dev/null @for file in $(DIRTMP)/*_full.xml; do \ xml val --err \ --xsd http://www.docbook.org/xml/5.0/xsd/docbook.xsd \ $${file} 1>> $(DIRTMP)/err_xmlstarlet_xsd 2>&1; done @echo "check for valid diag for each file in $(DIRTMP)/err_xmlstarlet_xsd" all : \ html \ tracwiki html : \ $(DIRWWW)/html/index.html \ $(DIRWWW)/html/svnbasiccommands.html tracwiki : \ $(DIRWIKI)/WikiStart \ $(DIRWIKI)/SvnBasicCommands @echo "Do not forget to import wiki pages" @echo "\$$ ssh $(PRODUCT)@forge.ipsl.jussieu.fr mkdir -p /tmp/$(PRODUCT)/" @echo "\$$ rsync -av --exclude=".DS_Store" --exclude=".svn" $(DIRWIKI) $(PRODUCT)@forge.ipsl.jussieu.fr:/tmp/$(PRODUCT)/" @echo "\$$ ssh $(PRODUCT)@forge.ipsl.jussieu.fr trac-admin /ipsl/forge/projets/$(PRODUCT)/trac wiki load /tmp/$(PRODUCT)/" @echo "\$$ ssh $(PRODUCT)@forge.ipsl.jussieu.fr rmdir -f /tmp/$(PRODUCT)/" $(DIRWIKI)/WikiStart : \ $(DIRSRC)/tracwiki.xsl \ $(DIRTMP)/web_full.xml @xsltproc \ $(DIRSRC)/tracwiki.xsl \ $(DIRTMP)/web_full.xml | \ awk 'sub(/ @star@ $$/,""){printf(" * %s", $$0);next};1' | \ sed -e "s+@star@+ *+" \ > $@ $(DIRWWW)/html/index.html : \ $(DIRTMP)/web_full.xml \ $(DIRSRC)/html.xsl \ $(DIRSRC)/style.css \ $(DIRSRC)/$(PRODUCT).css @xsltproc \ --param html.stylesheet "'style.css $(PRODUCT).css'" \ --param css.decoration 1 \ --param section.autolabel 1 \ --output $@ \ $(DIRSRC)/html.xsl \ $(DIRTMP)/web_full.xml $(DIRTMP)/web_full.xml : \ $(DIRSRC)/web.xml @xmllint \ --xinclude \ --encode utf-8 \ --noent \ --output $@ \ $(DIRSRC)/web.xml $(DIRWIKI)/SvnBasicCommands : \ $(DIRSRC)/tracwiki.xsl \ $(DIRTMP)/svnbasiccommands_full.xml @xsltproc \ $(DIRSRC)/tracwiki.xsl \ $(DIRTMP)/svnbasiccommands_full.xml | \ awk 'sub(/ @star@ $$/,""){printf(" * %s", $$0);next};1' | \ sed -e "s+@star@+*+" \ > $@ $(DIRWWW)/html/svnbasiccommands.html : \ $(DIRTMP)/svnbasiccommands_full.xml \ $(DIRSRC)/html.xsl \ $(DIRSRC)/style.css \ $(DIRSRC)/$(PRODUCT).css @xsltproc \ --param html.stylesheet "'style.css $(PRODUCT).css'" \ --param css.decoration 1 \ --param section.autolabel 1 \ --output $@ \ $(DIRSRC)/html.xsl \ $(DIRTMP)/svnbasiccommands_full.xml $(DIRTMP)/svnbasiccommands_full.xml : \ $(DIRSRC)/svnbasiccommands.xml @xmllint \ --xinclude \ --encode utf-8 \ --noent \ --output $@ \ $(DIRSRC)/svnbasiccommands.xml $(DIRWIKI)/Faq : \ $(DIRSRC)/tracwiki.xsl \ $(DIRTMP)/faq_full.xml @xsltproc \ $(DIRSRC)/tracwiki.xsl \ $(DIRTMP)/faq_full.xml | \ awk 'sub(/ @star@ $$/,""){printf(" * %s", $$0);next};1' | \ sed -e "s+@star@+*+" \ > $@ $(DIRWWW)/html/faq.html : \ $(DIRTMP)/faq_full.xml \ $(DIRSRC)/html.xsl \ $(DIRSRC)/style.css \ $(DIRSRC)/$(PRODUCT).css @xsltproc \ --param html.stylesheet "'style.css $(PRODUCT).css'" \ --param css.decoration 1 \ --param section.autolabel 1 \ --output $@ \ $(DIRSRC)/html.xsl \ $(DIRTMP)/faq_full.xml $(DIRTMP)/faq_full.xml : \ $(DIRSRC)/faq.xml @xmllint \ --xinclude \ --encode utf-8 \ --noent \ --output $@ \ $(DIRSRC)/faq.xml $(DIRWIKI)/Get : \ $(DIRSRC)/tracwiki.xsl \ $(DIRTMP)/get_full.xml @xsltproc \ $(DIRSRC)/tracwiki.xsl \ $(DIRTMP)/get_full.xml | \ awk 'sub(/ @star@ $$/,""){printf(" * %s", $$0);next};1' | \ sed -e "s+@star@+*+" \ > $@ $(DIRWWW)/html/get.html : \ $(DIRTMP)/get_full.xml \ $(DIRSRC)/html.xsl \ $(DIRSRC)/style.css \ $(DIRSRC)/$(PRODUCT).css @xsltproc \ --param html.stylesheet "'style.css $(PRODUCT).css'" \ --param css.decoration 1 \ --param section.autolabel 1 \ --output $@ \ $(DIRSRC)/html.xsl \ $(DIRTMP)/get_full.xml $(DIRTMP)/get_full.xml : \ $(DIRSRC)/get.xml \ $(DIRSRC)/get_pre.sh @$(DIRSRC)/get_pre.sh @xmllint \ --xinclude \ --encode utf-8 \ --noent \ --output $@ \ $(DIRTMP)/get_sed.xml $(DIRWIKI)/FirstSteps : \ $(DIRSRC)/tracwiki.xsl \ $(DIRTMP)/firststeps_full.xml @xsltproc \ $(DIRSRC)/tracwiki.xsl \ $(DIRTMP)/firststeps_full.xml | \ awk 'sub(/ @star@ $$/,""){printf(" * %s", $$0);next};1' | \ sed -e "s+@star@+*+" \ > $@ $(DIRWWW)/html/firststeps.html : \ $(DIRTMP)/firststeps_full.xml \ $(DIRSRC)/html.xsl \ $(DIRSRC)/style.css \ $(DIRSRC)/$(PRODUCT).css @xsltproc \ --param html.stylesheet "'style.css $(PRODUCT).css'" \ --param css.decoration 1 \ --param section.autolabel 1 \ --output $@ \ $(DIRSRC)/html.xsl \ $(DIRTMP)/firststeps_full.xml $(DIRTMP)/firststeps_full.xml : \ $(DIRSRC)/firststeps.xml @xmllint \ --xinclude \ --encode utf-8 \ --noent \ --output $@ \ $(DIRSRC)/firststeps.xml $(DIRWIKI)/Mailing : \ $(DIRSRC)/tracwiki.xsl \ $(DIRTMP)/mailing_full.xml @xsltproc \ $(DIRSRC)/tracwiki.xsl \ $(DIRTMP)/mailing_full.xml | \ awk 'sub(/ @star@ $$/,""){printf(" * %s", $$0);next};1' | \ sed -e "s+@star@+*+" \ > $@ $(DIRWWW)/html/mailing.html : \ $(DIRTMP)/mailing_full.xml \ $(DIRSRC)/html.xsl \ $(DIRSRC)/style.css \ $(DIRSRC)/$(PRODUCT).css @xsltproc \ --param html.stylesheet "'style.css $(PRODUCT).css'" \ --param css.decoration 1 \ --param section.autolabel 1 \ --output $@ \ $(DIRSRC)/html.xsl \ $(DIRTMP)/mailing_full.xml $(DIRTMP)/mailing_full.xml : \ $(DIRSRC)/mailing.xml @xmllint \ --xinclude \ --encode utf-8 \ --noent \ --output $@ \ $(DIRSRC)/mailing.xml $(DIRWIKI)/TipLink : \ $(DIRSRC)/tracwiki.xsl \ $(DIRTMP)/tiplink_full.xml @xsltproc \ $(DIRSRC)/tracwiki.xsl \ $(DIRTMP)/tiplink_full.xml | \ awk 'sub(/ @star@ $$/,""){printf(" * %s", $$0);next};1' | \ sed -e "s+@star@+*+" \ > $@ $(DIRWWW)/html/tiplink.html : \ $(DIRTMP)/tiplink_full.xml \ $(DIRSRC)/html.xsl \ $(DIRSRC)/style.css \ $(DIRSRC)/$(PRODUCT).css @xsltproc \ --param html.stylesheet "'style.css $(PRODUCT).css'" \ --param css.decoration 1 \ --param section.autolabel 1 \ --output $@ \ $(DIRSRC)/html.xsl \ $(DIRTMP)/tiplink_full.xml $(DIRTMP)/tiplink_full.xml : \ $(DIRSRC)/tiplink.xml @xmllint \ --xinclude \ --encode utf-8 \ --noent \ --output $@ \ $(DIRSRC)/tiplink.xml $(DIRWIKI)/Whatis : \ $(DIRSRC)/tracwiki.xsl \ $(DIRTMP)/whatis_full.xml @xsltproc \ $(DIRSRC)/tracwiki.xsl \ $(DIRTMP)/whatis_full.xml | \ awk 'sub(/ @star@ $$/,""){printf(" * %s", $$0);next};1' | \ sed -e "s+@star@+*+" \ > $@ $(DIRWWW)/html/whatis.html : \ $(DIRTMP)/whatis_full.xml \ $(DIRSRC)/html.xsl \ $(DIRSRC)/style.css \ $(DIRSRC)/$(PRODUCT).css @xsltproc \ --param html.stylesheet "'style.css $(PRODUCT).css'" \ --param css.decoration 1 \ --param section.autolabel 1 \ --output $@ \ $(DIRSRC)/html.xsl \ $(DIRTMP)/whatis_full.xml $(DIRTMP)/whatis_full.xml : \ $(DIRSRC)/whatis.xml @xmllint \ --xinclude \ --encode utf-8 \ --noent \ --output $@ \ $(DIRSRC)/whatis.xml $(DIRWIKI)/WhatsNew : \ $(DIRSRC)/tracwiki.xsl \ $(DIRTMP)/whatsnew_full.xml @xsltproc \ $(DIRSRC)/tracwiki.xsl \ $(DIRTMP)/whatsnew_full.xml | \ awk 'sub(/ @star@ $$/,""){printf(" * %s", $$0);next};1' | \ sed -e "s+@star@+*+" \ > $@ $(DIRWWW)/html/whatsnew.html : \ $(DIRTMP)/whatsnew_full.xml \ $(DIRSRC)/html.xsl \ $(DIRSRC)/style.css \ $(DIRSRC)/$(PRODUCT).css @xsltproc \ --param html.stylesheet "'style.css $(PRODUCT).css'" \ --param css.decoration 1 \ --param section.autolabel 1 \ --output $@ \ $(DIRSRC)/html.xsl \ $(DIRTMP)/whatsnew_full.xml $(DIRTMP)/whatsnew_full.xml : \ $(DIRSRC)/whatsnew.xml @xmllint \ --xinclude \ --encode utf-8 \ --noent \ --output $@ \ $(DIRSRC)/whatsnew.xml $(DIRWIKI)/Update : \ $(DIRSRC)/tracwiki.xsl \ $(DIRTMP)/update_full.xml @xsltproc \ $(DIRSRC)/tracwiki.xsl \ $(DIRTMP)/update_full.xml | \ awk 'sub(/ @star@ $$/,""){printf(" * %s", $$0);next};1' | \ sed -e "s+@star@+*+" \ > $@ $(DIRWWW)/html/update.html : \ $(DIRTMP)/update_full.xml \ $(DIRSRC)/html.xsl \ $(DIRSRC)/style.css \ $(DIRSRC)/$(PRODUCT).css @xsltproc \ --param html.stylesheet "'style.css $(PRODUCT).css'" \ --param css.decoration 1 \ --param section.autolabel 1 \ --output $@ \ $(DIRSRC)/html.xsl \ $(DIRTMP)/update_full.xml $(DIRTMP)/update_full.xml : \ $(DIRSRC)/update.xml @xmllint \ --xinclude \ --encode utf-8 \ --noent \ --output $@ \ $(DIRSRC)/update.xml