User Tools

Site Tools


linuxbog:dokumentation:x1373
Linux - Friheden til at skrive dokumentation: Version 2.7.20040524 - 2020-12-31
forrige Kapitel 3. DocBook i XML : Ett konkret exempel næste

3.9. Komplett Makefile

Vi lägger till ett clean kommando:

#A list over source files
SRC=datamodel.xml docbook_tables.xml tables.xml to_docbook_table.xsl
DB=/usr/share/sgml/docbook/xsl-stylesheets
SAXON=/home/bnl/distributions/java/saxon.jar
TARGET=/home/bnl/public_html/sslug/docbook_xml/target

OPTIONS=paper.type=A4 \
        admon.graphics=1 \
        admon.graphics.path=$(DB)/images/ \
        use.extensions=1 \
        fop.extensions=1 \
        section.autolabel=1 \
        callout.graphics.path=$(DB)/images/callouts/ \
        tablecolumns.extension=0

#What to do when just 'make' is run
all: docbook_tables.xml html html_one pdf

html_one: $(SRC)
        java -jar $(SAXON) datamodel.xml  $(DB)/html/docbook.xsl \
        $(OPTIONS) > $(TARGET)/html_one/datamodel.html
        touch html_one

html: $(SRC)
        java -jar $(SAXON) datamodel.xml  $(DB)/html/chunk.xsl \
        $(OPTIONS)
        cp *.html $(TARGET)/html
        rm -f *.html
        touch html

pdf: $(SRC)
        java -jar $(SAXON) datamodel.xml  $(DB)/fo/docbook.xsl \
        $(OPTIONS) > datamodel.fo
        $$FOP_HOME/fop.sh -fo datamodel.fo -pdf $(TARGET)/pdf/datamodel.pdf
        rm -f datamodel.fo
        touch pdf

docbook_tables.xml: tables.xml
        java -jar $(SAXON) tables.xml  to_docbook_table.xsl \
        $(OPTIONS) > docbook_tables.xml

.PHONY: clean
clean:
        rm -f docbook_tables.xml pdf html_one html
        rm -f $(TARGET)/pdf/*
        rm -f $(TARGET)/html/*
        rm -f $(TARGET)/html_one/*

forrige hjem næste
XML - SGML op Problem/Fördelar/Nackdelar
linuxbog/dokumentation/x1373.txt · Last modified: by 127.0.0.1

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

Brug af AI : Al tekst kán være uddrag af AI genereret tekst og kan være fejlbehæftet.
AI kan lave fejl og det kan mennesker også, men al tekst er gennemgået af et menneske for fejl, og personlig bias kan være tilføjet.