X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/bfec9cc7ab5a396f7662090b208691ec59a69f1b..2f1753cc3e240fa497a87873ed19fe3f11e22331:/doc/xslt/tools/make/Makefile.combine diff --git a/doc/xslt/tools/make/Makefile.combine b/doc/xslt/tools/make/Makefile.combine new file mode 100644 index 00000000..28a5e184 --- /dev/null +++ b/doc/xslt/tools/make/Makefile.combine @@ -0,0 +1,182 @@ +# $Source$ +# $Author: xmldoc $ +# $Date: 2007-03-04 22:28:18 -0800 (Sun, 04 Mar 2007) $ +# $Revision: 6666 $ +# vim: number +# +# ----------------------------------------------------------------- +# ** Makefile.combine -- combine source files ** +# ----------------------------------------------------------------- +# +# This file is part of the DocBook Project XSL Stylesheet +# distribution. +# +# See http://docbook.sourceforge.net/release/xsl/current/ +# for copyright and other information. +# +# This makefile creates "wrapper" files that combine sets of +# individual DocBook source files. The purpose of combining the +# files is to speed up processing time. By default it puts 20 +# files into each wrapper. Use CHUNKSIZE to configure the number +# of files per wrapper. +# +# Currently, this makefile has only a "man" target and is mainly +# intended to speed up processing of large numbers of individual +# refentry instances. + +# What file extension do you use for DocBook source files? +DOCBOOK_FILE_EXTENSION = .xml +SOURCE_FILES_DBK = $(wildcard *$(DOCBOOK_FILE_EXTENSION)) + +MAKEFILE_DOCBOOK = Makefile.DocBook + +XSLTPROC=xsltproc +XSLTPROC_FLAGS= + +SED=sed +SED_FLAGS=-i + +CHUNKSIZE ?= 20 + +WRAPPER_ELEMENT = reference +WRAPPER_TITLE=Combined contents + +COMBINE_XSL = \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + <$(WRAPPER_ELEMENT)> \ + $(WRAPPER_TITLE) \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + + +all: man + +man: build/man + +build/Makefile: + if [ ! -d build ]; then mkdir build; fi + cp $(MAKEFILE_DOCBOOK) $@ + +combine.xsl: Makefile + @echo '$(COMBINE_XSL)' > $@ + $(SED) $(SED_FLAGS) "s/\^\^/'/g" $@ + +build/1.xml: combine.xsl + $(XSLTPROC) $(XSLTPROC_FLAGS) \ + --stringparam files "$(SOURCE_FILES_DBK)" \ + --stringparam chunk.size $(CHUNKSIZE) \ + $< $< + +build/man: build/Makefile build/1.xml + time $(MAKE) -C build man \ + MAN_PARAMS="--stringparam man.output.quietly 1 \ + --stringparam refentry.meta.get.quietly 1 \ + --stringparam man.charmap.enabled 0" + +debug: + +clean: + $(RM) -r build