Mercurial > hgbook
comparison en/Makefile @ 657:8631da51309b
Slow progress on XML conversion
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon, 09 Feb 2009 23:25:40 -0800 |
parents | 5cd47f721686 |
children | b90b024729f1 |
comparison
equal
deleted
inserted
replaced
656:23dc79421e06 | 657:8631da51309b |
---|---|
28 wdir.svg \ | 28 wdir.svg \ |
29 wdir-after-commit.svg \ | 29 wdir-after-commit.svg \ |
30 wdir-branch.svg \ | 30 wdir-branch.svg \ |
31 wdir-merge.svg \ | 31 wdir-merge.svg \ |
32 wdir-pre-branch.svg | 32 wdir-pre-branch.svg |
33 | |
34 xml-src-files := \ | |
35 00book.xml \ | |
36 ch01-intro.xml \ | |
37 ch02-tour-basic.xml \ | |
38 ch12-mq.xml | |
33 | 39 |
34 image-dot := $(filter %.dot,$(image-sources)) | 40 image-dot := $(filter %.dot,$(image-sources)) |
35 image-svg := $(filter %.svg,$(image-sources)) | 41 image-svg := $(filter %.svg,$(image-sources)) |
36 image-png := $(filter %.png,$(image-sources)) | 42 image-png := $(filter %.png,$(image-sources)) |
37 | 43 |
68 template.simple \ | 74 template.simple \ |
69 template.svnstyle \ | 75 template.svnstyle \ |
70 tour \ | 76 tour \ |
71 tour-merge-conflict | 77 tour-merge-conflict |
72 | 78 |
79 xsltproc := xsltproc | |
80 xsltproc-opts := --nonet --xinclude --path '$(xml-path)' | |
81 | |
82 xmllint := xmllint | |
83 xmllint-opts := --noout --nonet --valid | |
84 | |
85 system-xsl-dir := $(firstword $(wildcard \ | |
86 /usr/share/sgml/docbook/xsl-stylesheets \ | |
87 /usr/share/xml/docbook/stylesheet/nwalsh \ | |
88 )) | |
89 | |
90 # Bletcherousness. | |
91 | |
92 ifneq ($(wildcard /usr/share/sgml/docbook/xml-dtd-4.4-*),) | |
93 dtd-dir := $(wildcard /usr/share/sgml/docbook/xml-dtd-4.4-*) | |
94 else | |
95 ifneq ($(wildcard /usr/share/xml/docbook/schema/dtd/4.4),) | |
96 dtd-dir := $(wildcard /usr/share/xml/docbook/schema/dtd/4.4) | |
97 else | |
98 $(error Do not know where to look for DocBook XML 4.4 DTD) | |
99 endif | |
100 endif | |
101 | |
102 ifeq ($(system-xsl-dir),) | |
103 $(error add a suitable directory to system-xsl-dir) | |
104 endif | |
105 | |
73 example-prereqs := \ | 106 example-prereqs := \ |
74 /usr/bin/merge | 107 /usr/bin/merge |
75 | 108 |
76 dist-sources := \ | 109 dist-sources := \ |
77 ../html/hgicon.png \ | 110 ../html/hgicon.png \ |
108 pdf/hgbook.pdf: $(sources) examples $(image-pdf) | 141 pdf/hgbook.pdf: $(sources) examples $(image-pdf) |
109 $(call pdf) | 142 $(call pdf) |
110 | 143 |
111 html: onepage split | 144 html: onepage split |
112 | 145 |
146 ../xsl/system-xsl: $(system-xsl-dir) | |
147 ln -s $< $@ | |
148 | |
149 dbhtml: ../xsl/system-xsl $(xml-src-files) valid | |
150 xsltproc $(xsltproc-opts) ../xsl/chunk-stylesheet.xsl 00book.xml | |
151 | |
152 valid: .validated-00book.xml | |
153 | |
154 .validated-00book.xml: $(xml-src-files) | |
155 $(xmllint) --path '$(dtd-dir):$(xml-path)' $(xmllint-opts) $< | |
156 touch $@ | |
157 | |
113 onepage: $(htlatex) html/onepage/hgbook.html html/onepage/hgbook.css $(image-html:%=html/onepage/%) | 158 onepage: $(htlatex) html/onepage/hgbook.html html/onepage/hgbook.css $(image-html:%=html/onepage/%) |
114 | 159 |
115 html/onepage/%: % | 160 html/onepage/%: % |
116 cp $< $@ | 161 cp $< $@ |
117 | 162 |