Commit 5634c39e authored by claes's avatar claes

Docbook related stuff

parent 28d6e467
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -46,6 +46,33 @@ sv_se_sources := $(sort \ ...@@ -46,6 +46,33 @@ sv_se_sources := $(sort \
) \ ) \
) )
htmlsources := $(sort \
$(foreach file, \
$(foreach dir, \
$(source_dirs), \
$(wildcard $(dir)/*.html) \
), $(notdir $(file)) \
) \
)
htmlen_us_sources := $(sort \
$(foreach file, \
$(foreach dir, \
$(pwre_sroot)/doc/man/en_us, \
$(wildcard $(dir)/*.html) \
), $(notdir $(file)) \
) \
)
htmlsv_se_sources := $(sort \
$(foreach file, \
$(foreach dir, \
$(pwre_sroot)/doc/man/sv_se, \
$(wildcard $(dir)/*.html) \
), $(notdir $(file)) \
) \
)
gsources := $(sort \ gsources := $(sort \
$(foreach file, \ $(foreach file, \
$(foreach dir, \ $(foreach dir, \
...@@ -58,11 +85,17 @@ gsources := $(sort \ ...@@ -58,11 +85,17 @@ gsources := $(sort \
pdf_sources := $(filter %.pdf,$(sources)) pdf_sources := $(filter %.pdf,$(sources))
pdf_sv_se_sources := $(filter %.pdf,$(sv_se_sources)) pdf_sv_se_sources := $(filter %.pdf,$(sv_se_sources))
pdf_en_us_sources := $(filter %.pdf,$(en_us_sources)) pdf_en_us_sources := $(filter %.pdf,$(en_us_sources))
html_sources := $(filter %.html,$(htmlsources))
html_sv_se_sources := $(filter %.html,$(htmlsv_se_sources))
html_en_us_sources := $(filter %.html,$(htmlen_us_sources))
gif_sources := $(filter %.gif,$(gsources)) gif_sources := $(filter %.gif,$(gsources))
export_pdf := $(patsubst %.pdf,$(doc_dir)/%.pdf,$(pdf_sources)) export_pdf := $(patsubst %.pdf,$(doc_dir)/%.pdf,$(pdf_sources))
export_pdf_sv_se := $(patsubst %.pdf,$(doc_dir)/sv_se/%.pdf,$(pdf_sv_se_sources)) export_pdf_sv_se := $(patsubst %.pdf,$(doc_dir)/sv_se/%.pdf,$(pdf_sv_se_sources))
export_pdf_en_us := $(patsubst %.pdf,$(doc_dir)/en_us/%.pdf,$(pdf_en_us_sources)) export_pdf_en_us := $(patsubst %.pdf,$(doc_dir)/en_us/%.pdf,$(pdf_en_us_sources))
export_html := $(patsubst %.html,$(doc_dir)/%.html,$(html_sources))
export_html_sv_se := $(patsubst %.html,$(doc_dir)/sv_se/%.html,$(html_sv_se_sources))
export_html_en_us := $(patsubst %.html,$(doc_dir)/en_us/%.html,$(html_en_us_sources))
export_gif_sv_se := $(patsubst %.gif,$(doc_dir)/sv_se/%.gif,$(gif_sources)) export_gif_sv_se := $(patsubst %.gif,$(doc_dir)/sv_se/%.gif,$(gif_sources))
export_gif_en_us := $(patsubst %.gif,$(doc_dir)/en_us/%.gif,$(gif_sources)) export_gif_en_us := $(patsubst %.gif,$(doc_dir)/en_us/%.gif,$(gif_sources))
export_gif_exe := $(patsubst %.gif,$(exe_dir)/%.gif,$(gif_sources)) export_gif_exe := $(patsubst %.gif,$(exe_dir)/%.gif,$(gif_sources))
...@@ -71,17 +104,22 @@ clean_pdf := $(patsubst %.pdf,clean_%.pdf,$(pdf_sources)) ...@@ -71,17 +104,22 @@ clean_pdf := $(patsubst %.pdf,clean_%.pdf,$(pdf_sources))
#docbook-related, added by jonas_h 2006-04-nn #docbook-related, added by jonas_h 2006-04-nn
targetsuffixes := _single.html _index.html .pdf #targetsuffixes := _single.html _index.html .pdf
targetsuffixes := _single.html .pdf
sv_se_xmlsources := dbpwr.xml upgrade42.xml sv_se_xmlsources := dbpwr.xml upgrade42.xml
en_us_xmlsources := pwrgsg.xml upgrade42.xml changelog.xml en_us_xmlsources := pwrgsg.xml upgrade42.xml changelog.xml
sv_se_xmltargets := $(addprefix $(doc_dir)/sv_se/, \ #add on the following line master files that include their parts / chapters by means of xinclude
#also add an explicit rule for each master file below
xi_dependents := $(pwre_sroot)/doc/man/sv_se/dbpwr.xml
sv_se_xmltargets := $(addprefix $(pwre_sroot)/doc/man/sv_se/, \
$(foreach targetsuffix, $(targetsuffixes), \ $(foreach targetsuffix, $(targetsuffixes), \
$(foreach basefile, $(basename $(sv_se_xmlsources)), \ $(foreach basefile, $(basename $(sv_se_xmlsources)), \
$(addsuffix $(targetsuffix), $(basefile))))) $(addsuffix $(targetsuffix), $(basefile)))))
en_us_xmltargets := $(addprefix $(doc_dir)/en_us/, \ en_us_xmltargets := $(addprefix $(pwre_sroot)/doc/man/en_us/, \
$(foreach targetsuffix, $(targetsuffixes), \ $(foreach targetsuffix, $(targetsuffixes), \
$(foreach basefile, $(basename $(en_us_xmlsources)), \ $(foreach basefile, $(basename $(en_us_xmlsources)), \
$(addsuffix $(targetsuffix), $(basefile))))) $(addsuffix $(targetsuffix), $(basefile)))))
...@@ -116,6 +154,18 @@ $(doc_dir)/en_us/%.pdf : $(pwre_sroot)/doc/man/en_us/%.pdf ...@@ -116,6 +154,18 @@ $(doc_dir)/en_us/%.pdf : $(pwre_sroot)/doc/man/en_us/%.pdf
@ $(log_h_h) @ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target) @ $(cp) $(cpflags) $(source) $(target)
$(doc_dir)/%.html : ../../%.html
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
$(doc_dir)/sv_se/%.html : $(pwre_sroot)/doc/man/sv_se/%.html
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
$(doc_dir)/en_us/%.html : $(pwre_sroot)/doc/man/en_us/%.html
@ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target)
$(exe_dir)/%.gif : ../../%.gif $(exe_dir)/%.gif : ../../%.gif
@ $(log_h_h) @ $(log_h_h)
@ $(cp) $(cpflags) $(source) $(target) @ $(cp) $(cpflags) $(source) $(target)
...@@ -136,6 +186,7 @@ all : init copy lib exe ...@@ -136,6 +186,7 @@ all : init copy lib exe
init : init :
copy : $(export_pdf) $(export_pdf_en_us) $(export_pdf_sv_se) \ copy : $(export_pdf) $(export_pdf_en_us) $(export_pdf_sv_se) \
$(export_html) $(export_html_en_us) $(export_html_sv_se) \
$(export_gif_exe) $(export_gif_en_us) $(export_gif_sv_se) \ $(export_gif_exe) $(export_gif_en_us) $(export_gif_sv_se) \
$(exe_dir)/en_us/wtt_help.dat $(exe_dir)/sv_se/wtt_help.dat \ $(exe_dir)/en_us/wtt_help.dat $(exe_dir)/sv_se/wtt_help.dat \
$(exe_dir)/en_us/man_dg.dat $(exe_dir)/sv_se/man_dg.dat \ $(exe_dir)/en_us/man_dg.dat $(exe_dir)/sv_se/man_dg.dat \
...@@ -145,8 +196,8 @@ copy : $(export_pdf) $(export_pdf_en_us) $(export_pdf_sv_se) \ ...@@ -145,8 +196,8 @@ copy : $(export_pdf) $(export_pdf_en_us) $(export_pdf_sv_se) \
$(exe_dir)/en_us/man_geref.dat $(exe_dir)/sv_se/man_geref.dat \ $(exe_dir)/en_us/man_geref.dat $(exe_dir)/sv_se/man_geref.dat \
$(doc_dir)/en_us/man_geref_index.html $(doc_dir)/sv_se/man_geref_index.html \ $(doc_dir)/en_us/man_geref_index.html $(doc_dir)/sv_se/man_geref_index.html \
$(doc_dir)/en_us/man_geref.pdf $(doc_dir)/sv_se/man_geref.pdf \ $(doc_dir)/en_us/man_geref.pdf $(doc_dir)/sv_se/man_geref.pdf \
$(doc_dir)/en_us/man_geref.ps $(doc_dir)/sv_se/man_geref.ps $(doc_dir)/en_us/man_geref.ps $(doc_dir)/sv_se/man_geref.ps \
$(mediatargets) $(csstargets)
lib : lib :
exe : exe :
...@@ -157,7 +208,7 @@ realclean : clean $(clean_pdf) $(clean_c) ...@@ -157,7 +208,7 @@ realclean : clean $(clean_pdf) $(clean_c)
# added by jonas_h 2006-04-nn # added by jonas_h 2006-04-nn
docbook : $(sv_se_xmltargets) $(en_us_xmltargets) $(mediatargets) $(csstargets) docbook : $(xi_dependents) $(sv_se_xmltargets) $(en_us_xmltargets)
# end of # end of
...@@ -244,11 +295,11 @@ $(doc_dir)/sv_se/man_geref.ps : $(pwre_sroot)/doc/man/sv_se/man_geref.dat ...@@ -244,11 +295,11 @@ $(doc_dir)/sv_se/man_geref.ps : $(pwre_sroot)/doc/man/sv_se/man_geref.dat
%.fo :: %.xml %.fo :: %.xml
$(xsltproc) $(xsltproc_args) $(fo_xsl) $(source) > $(target) $(xsltproc) $(xsltproc_args) $(fo_xsl) $(source) > $(target)
$(doc_dir)/%.pdf : $(pwre_sroot)/doc/man/%.fo $(pwre_sroot)/doc/man/src/pwrtitlepages.xsl $(pwre_sroot)/doc/man/%.pdf : $(pwre_sroot)/doc/man/%.fo $(pwre_sroot)/doc/man/src/pwrtitlepages.xsl
$(fop) $(source) -pdf $(target) $(fop) $(source) -pdf $(target)
rm -f $(source) rm -f $(source)
$(doc_dir)/%_single.html :: $(pwre_sroot)/doc/man/%.xml $(pwre_sroot)/doc/man/%_single.html :: $(pwre_sroot)/doc/man/%.xml
$(xsltproc) $(xsltproc_args) -o $(target) $(html_xsl) $(source) $(xsltproc) $(xsltproc_args) -o $(target) $(html_xsl) $(source)
$(doc_dir)/en_us/%_index.html :: $(pwre_sroot)/doc/man/en_us/%.xml $(doc_dir)/en_us/%_index.html :: $(pwre_sroot)/doc/man/en_us/%.xml
...@@ -268,4 +319,8 @@ $(doc_dir)/% :: $(pwre_sroot)/doc/man/src/% ...@@ -268,4 +319,8 @@ $(doc_dir)/% :: $(pwre_sroot)/doc/man/src/%
$(pwre_sroot)/doc/man/src/pwrtitlepages.xsl :: $(pwre_sroot)/doc/man/src/pwrtitlepage.spec.xml $(pwre_sroot)/doc/man/src/pwrtitlepages.xsl :: $(pwre_sroot)/doc/man/src/pwrtitlepage.spec.xml
$(xsltproc) -o $(target) $(docbook_stylesheetdir)/template/titlepage.xsl $(source) $(xsltproc) -o $(target) $(docbook_stylesheetdir)/template/titlepage.xsl $(source)
# explicit rules updating dependent master files if their includes have been changed.
%/dbpwr.xml :: %/dbpwr_intro.xml %/dbpwr_editering.xml %/dbpwr_exempel.xml %/dbpwr_utdata.xml %/dbpwr_omdocbook.xml
touch $(target)
#end of #end of
...@@ -2,8 +2,11 @@ ...@@ -2,8 +2,11 @@
<xsl:stylesheet <xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- Import basic html stylesheet --> <!-- Import basic html stylesheet
<xsl:import href="/usr/local/share/xml/docbook/stylesheet/snapshot/html/chunk.xsl"/> This URI is not a web location, but is directed to the local stylesheet directory
(e.g /usr/local/share/xml/docbook/stylesheet/docbook-xsl-1.70.1)
by means of the catalog.xml defined in the user's XML_CATALOG_FILES environment variable. -->
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
<!-- Include common-customization stylesheet --> <!-- Include common-customization stylesheet -->
<xsl:include href="pwrxsl-common.xsl" /> <xsl:include href="pwrxsl-common.xsl" />
......
...@@ -4,8 +4,11 @@ ...@@ -4,8 +4,11 @@
xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0"> version="1.0">
<!-- Import basic fo stylesheet--> <!-- Import basic fo stylesheet.
<xsl:import href="/usr/local/share/xml/docbook/stylesheet/snapshot/fo/docbook.xsl"/> This URI is not a web location, but is directed to the local stylesheet directory
(e.g /usr/local/share/xml/docbook/stylesheet/docbook-xsl-1.70.1)
by means of the catalog.xml defined in the user's XML_CATALOG_FILES environment variable. -->
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
<!-- Import customized titlepage stylesheet--> <!-- Import customized titlepage stylesheet-->
<xsl:include href="pwrtitlepages.xsl"/> <xsl:include href="pwrtitlepages.xsl"/>
......
...@@ -2,9 +2,12 @@ ...@@ -2,9 +2,12 @@
<xsl:stylesheet <xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- Import basic html stylesheet --> <!-- Import basic html stylesheet
This URI is not a web location, but is directed to the local stylesheet directory
(e.g /usr/local/share/xml/docbook/stylesheet/docbook-xsl-1.70.1)
by means of the catalog.xml defined in the user's XML_CATALOG_FILES environment variable. -->
<xsl:import href="/usr/local/share/xml/docbook/stylesheet/snapshot/html/docbook.xsl"/> <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
<!-- Include common-customization stylesheet --> <!-- Include common-customization stylesheet -->
<xsl:include href="pwrxsl-common.xsl" /> <xsl:include href="pwrxsl-common.xsl" />
......
This diff is collapsed.
...@@ -43,8 +43,11 @@ ...@@ -43,8 +43,11 @@
<itemizedlist> <itemizedlist>
<listitem><para>Xsltproc. Standardkomponent i de flesta linuxdistributioner.</para></listitem> <listitem><para>Xsltproc. Standardkomponent i de flesta linuxdistributioner.</para></listitem>
<listitem><para>DocBook-xsl-stylesheets. Går att hämta med apt-get, eller från sourceforge. <listitem><para>DocBook-xsl-stylesheets. Går att hämta med apt-get, eller från sourceforge.
Finns på pwr42 i <filename class="directory">/usr/local/share/xml/docbook/stylesheet/snapshot/</filename>. Den senaste versionen finns på pwr42 i
Om man byter stylesheets, eller har dem någon annanstans måste man (tyvärr) ändra i inställningslagren (se nedan).</para></listitem> <filename class="directory">/usr/local/share/xml/docbook/stylesheet/docbook-xsl-1.70.1/</filename>.
När man uppdaterar till en ny release av dessa måste man köra installationsscriptet <filename>install.sh</filename>
i distributionen.
Detta uppdaterar användarens <envar>XML_CATALOG_FILES</envar> att länka till den nya distributionen.</para></listitem>
<listitem><para>Fop. Version 0.92b av Apaches fo-processor är installerad på pwr42 i <listitem><para>Fop. Version 0.92b av Apaches fo-processor är installerad på pwr42 i
<filename class="directory">/usr/local/fop-0.92beta/</filename>. <filename class="directory">/usr/local/fop-0.92beta/</filename>.
En symlänk finns i <filename class="directory">/usr/local/bin</filename>.</para></listitem> En symlänk finns i <filename class="directory">/usr/local/bin</filename>.</para></listitem>
...@@ -71,7 +74,7 @@ ...@@ -71,7 +74,7 @@
<varlistentry><term><filename>pwrxsl-html.xsl</filename></term> <varlistentry><term><filename>pwrxsl-html.xsl</filename></term>
<listitem> <listitem>
<orderedlist> <orderedlist>
<listitem><para>Importerar <filename>...stylesheet/snapshot/html/docbook.xsl</filename> <listitem><para>Importerar <filename>/docbook-xsl-n.nn.n/html/docbook.xsl</filename>
som är grundmallen för html-processning - en utfil.</para></listitem> som är grundmallen för html-processning - en utfil.</para></listitem>
<listitem><para>Hämtar från <filename>pwrxsl-common.xsl</filename></para></listitem> <listitem><para>Hämtar från <filename>pwrxsl-common.xsl</filename></para></listitem>
<listitem><para>Hämtar från <filename>pwrxsl-html-common.xsl</filename></para></listitem> <listitem><para>Hämtar från <filename>pwrxsl-html-common.xsl</filename></para></listitem>
...@@ -80,7 +83,7 @@ ...@@ -80,7 +83,7 @@
<varlistentry><term><filename>pwrxsl-chunk.xsl</filename></term> <varlistentry><term><filename>pwrxsl-chunk.xsl</filename></term>
<listitem> <listitem>
<orderedlist> <orderedlist>
<listitem><para>Importerar <filename>...stylesheet/snapshot/html/chunk.xsl</filename> <listitem><para>Importerar <filename>/docbook-xsl-n.nn.n/html/chunk.xsl</filename>
som är grundmallen för html-processning - flera utfiler.</para></listitem> som är grundmallen för html-processning - flera utfiler.</para></listitem>
<listitem><para>Hämtar från <filename>pwrxsl-common.xsl</filename></para></listitem> <listitem><para>Hämtar från <filename>pwrxsl-common.xsl</filename></para></listitem>
<listitem><para>Hämtar från <filename>pwrxsl-html-common.xsl</filename></para></listitem> <listitem><para>Hämtar från <filename>pwrxsl-html-common.xsl</filename></para></listitem>
...@@ -89,7 +92,7 @@ ...@@ -89,7 +92,7 @@
<varlistentry><term><filename>pwrxsl-fo.xsl</filename></term> <varlistentry><term><filename>pwrxsl-fo.xsl</filename></term>
<listitem> <listitem>
<orderedlist> <orderedlist>
<listitem><para>Importerar <filename>...stylesheet/snapshot/fo/docbook.xsl</filename> som är grundmallen för fo-processning.</para></listitem> <listitem><para>Importerar <filename>/docbook-xsl-n.nn.n/fo/docbook.xsl</filename> som är grundmallen för fo-processning.</para></listitem>
<listitem><para>Hämtar från <filename>pwrxsl-common.xsl</filename></para></listitem> <listitem><para>Hämtar från <filename>pwrxsl-common.xsl</filename></para></listitem>
<listitem><para>Sätter parametrar och templates specifika för fo.</para></listitem> <listitem><para>Sätter parametrar och templates specifika för fo.</para></listitem>
</orderedlist></listitem></varlistentry> </orderedlist></listitem></varlistentry>
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment