[vsipl++] PATCH: Provide common installation rules for DocBook

Stefan Seefeld stefan at codesourcery.com
Thu Dec 29 02:42:36 UTC 2005


Mark Mitchell wrote:
> This patch updates csl-docbook's Makefile fragment so as to provide
> installation rule templates.  These honor the htmldir/pdfdir
> variables, as per the GNU Coding Standards.

[...]

> Index: GNUmakefile.inc

[...]

>   ########################################################################
>   # Implicit Rules
>   ########################################################################
>   
>   ifdef XSLTPROC
>   # Generate HTML from DocBook. 
>   %.html: %.xml \
>   	$(csldocbookdir)/xsl/html/csl.xsl \
>   	$(csldocbookdir)/css/cs.css
> ! 	mkdir -p $(@D)/html
> ! 	cp $(csldocbookdir)/css/cs.css $(@D)/html
>   	$(XSLTPROC) \
>   	    --xinclude \
>   	    --stringparam csl_docbook.root $(csldocbookdir) \
>   	    --stringparam html.stylesheet cs.css \
>   	    --stringparam keep.relative.image.uris 1 \
> ! 	    --output $(@D)/html/index.html \
>   	    $(csldocbookdir)/xsl/html/csl.xsl \
>   	    $<
>   	touch $@

vs.

> + ########################################################################
>   # Implicit Rules
>   ########################################################################
>   
>   ifdef XSLTPROC
>   # Generate HTML from DocBook. 
>   %.html: %.xml \
>   	$(csldocbookdir)/xsl/html/csl.xsl \
>   	$(csldocbookdir)/css/cs.css
> ! 	mkdir -p $@
> ! 	cp $(csldocbookdir)/css/cs.css $@
>   	$(XSLTPROC) \
>   	    --xinclude \
>   	    --stringparam csl_docbook.root $(csldocbookdir) \
>   	    --stringparam html.stylesheet cs.css \
>   	    --stringparam keep.relative.image.uris 1 \
> ! 	    --output $@/index.html \
>   	    $(csldocbookdir)/xsl/html/csl.xsl \
>   	    $<
>   	touch $@

The previous rule generated a directory 'html/' together with a dummy
'tutorial.html' file (for example). I now get a 'tutorial.html/' directory,
which I find slightly surprizing (a directory with a '.html' extension, that is).
Using the '$*' variable above instead of '$@' would allow the creation of a
'tutorial/' output directory (keeping the dummy 'tutorial.html' for convenience).

Regards,
		Stefan



More information about the vsipl++ mailing list