All Downloads are FREE. Search and download functionalities are using the official Maven repository.

olink.docbook-xsl.tools.make.Makefile.combine Maven / Gradle / Ivy

There is a newer version: 1.2.6
Show newest version
# $Source$
# $Author: xmldoc $
# $Date: 2007-03-05 06:28:18 +0000 (Mon, 05 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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy