~ubuntu-branches/ubuntu/oneiric/seahorse/oneiric-proposed-201111150713

1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
1
# gnome-doc-utils.make - make magic for building documentation
2
# Copyright (C) 2004-2005 Shaun McCance <shaunm@gnome.org>
3
#
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; either version 2 of the License, or
7
# (at your option) any later version.
8
#
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
# GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License
15
# along with this program; if not, write to the Free Software Foundation,
16
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
#
18
# As a special exception to the GNU General Public License, if you
19
# distribute this file as part of a program that contains a
20
# configuration script generated by Autoconf, you may include it under
21
# the same distribution terms that you use for the rest of that program.
22
23
################################################################################
24
## @@ Generating Header Files
25
26
## @ DOC_H_FILE
27
## The name of the header file to generate
28
DOC_H_FILE ?=
29
30
## @ DOC_H_DOCS
31
## The input DocBook files for generating the header file
32
DOC_H_DOCS ?=
33
34
$(DOC_H_FILE): $(DOC_H_DOCS);
35
	@rm -f $@.tmp; touch $@.tmp;
36
	echo 'const gchar* documentation_credits[] = {' >> $@.tmp
1.2.6 by Sebastian Dröge
Import upstream version 0.9.2.1
37
	list='$(DOC_H_DOCS)'; for doc in $$list; do \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
38
	  xmlpath="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \
39
	  if ! test -f "$$doc"; then doc="$(srcdir)/$$doc"; fi; \
40
	  xsltproc --path "$$xmlpath" $(_credits) $$doc; \
41
	done | sort | uniq \
42
	  | awk 'BEGIN{s=""}{n=split($$0,w,"<");if(s!=""&&s!=substr(w[1],1,length(w[1])-1)){print s};if(n>1){print $$0;s=""}else{s=$$0}};END{if(s!=""){print s}}' \
43
	  | sed -e 's/\\/\\\\/' -e 's/"/\\"/' -e 's/\(.*\)/\t"\1",/' >> $@.tmp
44
	echo '	NULL' >> $@.tmp
45
	echo '};' >> $@.tmp
46
	echo >> $@.tmp
1.2.6 by Sebastian Dröge
Import upstream version 0.9.2.1
47
	list='$(DOC_H_DOCS)'; for doc in $$list; do \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
48
	  xmlpath="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \
49
	  if ! test -f "$$doc"; then doc="$(srcdir)/$$doc"; fi; \
50
	  docid=`echo "$$doc" | sed -e 's/.*\/\([^/]*\)\.xml/\1/' \
51
	    | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`; \
52
	  echo $$xmlpath; \
53
	  ids=`xsltproc --xinclude --path "$$xmlpath" $(_ids) $$doc`; \
54
	  for id in $$ids; do \
55
	    echo '#define HELP_'`echo $$docid`'_'`echo $$id \
56
	      | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`' "'$$id'"' >> $@.tmp; \
57
	  done; \
58
	  echo >> $@.tmp; \
59
	done;
60
	cp $@.tmp $@ && rm -f $@.tmp
61
1.2.17 by Sebastian Dröge
Import upstream version 1.0.1
62
dist-check-gdu:
63
if !HAVE_GNOME_DOC_UTILS
64
	@echo "*** GNOME Doc Utils must be installed in order to make dist"
65
	@false
66
endif
67
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
68
.PHONY: dist-doc-header
69
dist-doc-header: $(DOC_H_FILE)
70
	@if test -f "$(DOC_H_FILE)"; then d=; else d="$(srcdir)/"; fi; \
71
	echo "$(INSTALL_DATA) $${d}$(DOC_H_FILE) $(distdir)/$(DOC_H_FILE)"; \
72
	$(INSTALL_DATA) "$${d}$(DOC_H_FILE)" "$(distdir)/$(DOC_H_FILE)";
73
1.2.17 by Sebastian Dröge
Import upstream version 1.0.1
74
doc-dist-hook: dist-check-gdu $(if $(DOC_H_FILE),dist-doc-header)
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
75
76
.PHONY: clean-doc-header
77
_clean_doc_header = $(if $(DOC_H_FILE),clean-doc-header)
78
clean-local: $(_clean_doc_header)
79
distclean-local: $(_clean_doc_header)
80
mostlyclean-local: $(_clean_doc_header)
81
maintainer-clean-local: $(_clean_doc_header)
82
clean-doc-header:
83
	rm -f $(DOC_H_FILE)
84
85
all: $(DOC_H_FILE)
86
87
88
################################################################################
89
## @@ Generating Documentation Files
90
91
## @ DOC_MODULE
92
## The name of the document being built
93
DOC_MODULE ?=
94
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
95
## @ DOC_ID
96
## The unique identifier for a Mallard document
97
DOC_ID ?=
98
99
## @ DOC_PAGES
100
## Page files in a Mallard document
101
DOC_PAGES ?=
102
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
103
## @ DOC_ENTITIES
104
## Files included with a SYSTEM entity
105
DOC_ENTITIES ?=
106
107
## @ DOC_INCLUDES
108
## Files included with XInclude
109
DOC_INCLUDES ?=
110
111
## @ DOC_FIGURES
112
## Figures and other external data
113
DOC_FIGURES ?=
114
115
## @ DOC_FORMATS
116
## The default formats to be built and installed
117
DOC_FORMATS ?= docbook
118
_DOC_REAL_FORMATS = $(if $(DOC_USER_FORMATS),$(DOC_USER_FORMATS),$(DOC_FORMATS))
119
120
## @ DOC_LINGUAS
121
## The languages this document is translated into
122
DOC_LINGUAS ?=
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
123
_DOC_REAL_LINGUAS = $(if $(filter environment,$(origin LINGUAS)),		\
124
	$(filter $(LINGUAS),$(DOC_LINGUAS)),					\
125
	$(DOC_LINGUAS))
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
126
1.2.17 by Sebastian Dröge
Import upstream version 1.0.1
127
_DOC_ABS_SRCDIR = @abs_srcdir@
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
128
129
130
################################################################################
131
## Variables for Bootstrapping
132
133
_xml2po ?= `which xml2po`
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
134
_xml2po_mode = $(if $(DOC_ID),mallard,docbook)
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
135
136
_db2html ?= `$(PKG_CONFIG) --variable db2html gnome-doc-utils`
137
_db2omf  ?= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils`
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
138
_malrng  ?= `$(PKG_CONFIG) --variable malrng gnome-doc-utils`
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
139
_chunks  ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl
140
_credits ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl
1.4.4 by Jordi Mallach
Import upstream version 3.0.0
141
_ids ?= $(shell $(PKG_CONFIG) --variable xmldir gnome-doc-utils)/gnome/xslt/docbook/utils/ids.xsl
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
142
1.2.19 by Sebastian Dröge
Import upstream version 2.19.4
143
if ENABLE_SK
144
_ENABLE_SK = true
1.2.17 by Sebastian Dröge
Import upstream version 1.0.1
145
_skpkgdatadir ?= `scrollkeeper-config --pkgdatadir`
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
146
_sklocalstatedir ?= `scrollkeeper-config --pkglocalstatedir`
1.2.17 by Sebastian Dröge
Import upstream version 1.0.1
147
_skcontentslist ?= $(_skpkgdatadir)/Templates/C/scrollkeeper_cl.xml
1.2.19 by Sebastian Dröge
Import upstream version 2.19.4
148
endif
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
149
150
151
################################################################################
152
## @@ Rules for OMF Files
153
154
db2omf_args =									\
155
	--stringparam db2omf.basename $(DOC_MODULE)				\
156
	--stringparam db2omf.format $(3)					\
157
	--stringparam db2omf.dtd						\
158
	$(shell xmllint --format $(2) | grep -h PUBLIC | head -n 1 		\
159
		| sed -e 's/.*PUBLIC \(\"[^\"]*\"\).*/\1/')			\
160
	--stringparam db2omf.lang $(notdir $(patsubst %/$(notdir $(2)),%,$(2)))	\
161
	--stringparam db2omf.omf_dir "$(OMF_DIR)"				\
162
	--stringparam db2omf.help_dir "$(HELP_DIR)"				\
1.2.17 by Sebastian Dröge
Import upstream version 1.0.1
163
	--stringparam db2omf.omf_in "$(_DOC_OMF_IN)"				\
1.2.19 by Sebastian Dröge
Import upstream version 2.19.4
164
	$(if $(_ENABLE_SK),							\
165
	  --stringparam db2omf.scrollkeeper_cl "$(_skcontentslist)")		\
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
166
	$(_db2omf) $(2)
167
168
## @ _DOC_OMF_IN
169
## The OMF input file
1.2.17 by Sebastian Dröge
Import upstream version 1.0.1
170
_DOC_OMF_IN = $(if $(DOC_MODULE),$(wildcard $(_DOC_ABS_SRCDIR)/$(DOC_MODULE).omf.in))
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
171
172
## @ _DOC_OMF_DB
173
## The OMF files for DocBook output
174
_DOC_OMF_DB = $(if $(_DOC_OMF_IN),						\
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
175
	$(foreach lc,C $(_DOC_REAL_LINGUAS),$(DOC_MODULE)-$(lc).omf))
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
176
177
$(_DOC_OMF_DB) : $(_DOC_OMF_IN)
178
$(_DOC_OMF_DB) : $(DOC_MODULE)-%.omf : %/$(DOC_MODULE).xml
1.2.19 by Sebastian Dröge
Import upstream version 2.19.4
179
	@test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || {	\
1.2.17 by Sebastian Dröge
Import upstream version 1.0.1
180
	  echo "The file '$(_skcontentslist)' does not exist." >&2;		\
181
	  echo "Please check your ScrollKeeper installation." >&2;		\
182
	  exit 1; }
183
	xsltproc -o $@ $(call db2omf_args,$@,$<,'docbook') || { rm -f "$@"; exit 1; }
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
184
185
## @ _DOC_OMF_HTML
186
## The OMF files for HTML output
187
_DOC_OMF_HTML = $(if $(_DOC_OMF_IN),						\
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
188
	$(foreach lc,C $(_DOC_REAL_LINGUAS),$(DOC_MODULE)-html-$(lc).omf))
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
189
190
$(_DOC_OMF_HTML) : $(_DOC_OMF_IN)
191
$(_DOC_OMF_HTML) : $(DOC_MODULE)-html-%.omf : %/$(DOC_MODULE).xml
1.2.19 by Sebastian Dröge
Import upstream version 2.19.4
192
if ENABLE_SK
193
	@test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || {	\
1.2.17 by Sebastian Dröge
Import upstream version 1.0.1
194
	  echo "The file '$(_skcontentslist)' does not exist" >&2;		\
195
	  echo "Please check your ScrollKeeper installation." >&2;		\
196
	  exit 1; }
1.2.19 by Sebastian Dröge
Import upstream version 2.19.4
197
endif
1.2.17 by Sebastian Dröge
Import upstream version 1.0.1
198
	xsltproc -o $@ $(call db2omf_args,$@,$<,'xhtml') || { rm -f "$@"; exit 1; }
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
199
200
## @ _DOC_OMF_ALL
201
## All OMF output files to be built
202
# FIXME
203
_DOC_OMF_ALL =									\
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
204
	$(if $(filter docbook,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_DB))		\
205
	$(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_HTML))
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
206
207
.PHONY: omf
208
omf: $(_DOC_OMF_ALL)
209
210
211
################################################################################
212
## @@ C Locale Documents
213
214
## @ _DOC_C_MODULE
215
## The top-level documentation file in the C locale
216
_DOC_C_MODULE = $(if $(DOC_MODULE),C/$(DOC_MODULE).xml)
217
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
218
## @ _DOC_C_PAGES
219
## Page files in a Mallard document in the C locale
220
_DOC_C_PAGES = $(foreach page,$(DOC_PAGES),C/$(page))
221
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
222
## @ _DOC_C_ENTITIES
223
## Files included with a SYSTEM entity in the C locale
224
_DOC_C_ENTITIES = $(foreach ent,$(DOC_ENTITIES),C/$(ent))
225
226
## @ _DOC_C_XINCLUDES
227
## Files included with XInclude in the C locale
228
_DOC_C_INCLUDES = $(foreach inc,$(DOC_INCLUDES),C/$(inc))
229
230
## @ _DOC_C_DOCS
231
## All documentation files in the C locale
232
_DOC_C_DOCS =								\
233
	$(_DOC_C_ENTITIES)	$(_DOC_C_INCLUDES)			\
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
234
	$(_DOC_C_PAGES)		$(_DOC_C_MODULE)
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
235
236
## @ _DOC_C_DOCS_NOENT
237
## All documentation files in the C locale,
238
## except files included with a SYSTEM entity
239
_DOC_C_DOCS_NOENT =							\
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
240
	$(_DOC_C_MODULE)	$(_DOC_C_INCLUDES)			\
241
	$(_DOC_C_PAGES)
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
242
243
## @ _DOC_C_FIGURES
244
## All figures and other external data in the C locale
245
_DOC_C_FIGURES = $(if $(DOC_FIGURES),					\
246
	$(foreach fig,$(DOC_FIGURES),C/$(fig)),				\
247
	$(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/C/figures/*.png)))
248
249
## @ _DOC_C_HTML
250
## All HTML documentation in the C locale
251
# FIXME: probably have to shell escape to determine the file names
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
252
_DOC_C_HTML = $(foreach f,						\
253
	$(shell xsltproc --xinclude 					\
254
	  --stringparam db.chunk.basename "$(DOC_MODULE)"		\
255
	  $(_chunks) "C/$(DOC_MODULE).xml"),				\
256
	C/$(f).xhtml)
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
257
258
###############################################################################
259
## @@ Other Locale Documentation
260
261
## @ _DOC_POFILES
262
## The .po files used for translating the document
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
263
_DOC_POFILES = $(if $(DOC_MODULE)$(DOC_ID),					\
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
264
	$(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(lc).po))
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
265
266
.PHONY: po
267
po: $(_DOC_POFILES)
268
3.1.6 by Josselin Mouette
* Switch to 3.0 source format.
269
## @ _DOC_MOFILES
270
## The .mo files used for translating the document
271
_DOC_MOFILES = $(patsubst %.po,%.mo,$(_DOC_POFILES))
272
273
.PHONY: mo
274
mo: $(_DOC_MOFILES)
275
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
276
## @ _DOC_LC_MODULES
277
## The top-level documentation files in all other locales
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
278
_DOC_LC_MODULES = $(if $(DOC_MODULE),						\
279
	$(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xml))
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
280
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
281
## @ _DOC_LC_PAGES
282
## Page files in a Mallard document in all other locales
283
_DOC_LC_PAGES =									\
284
	$(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach page,$(_DOC_C_PAGES),	\
285
		$(lc)/$(notdir $(page)) ))
286
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
287
## @ _DOC_LC_XINCLUDES
288
## Files included with XInclude in all other locales
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
289
_DOC_LC_INCLUDES =								\
290
	$(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach inc,$(_DOC_C_INCLUDES),	\
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
291
		$(lc)/$(notdir $(inc)) ))
292
293
## @ _DOC_LC_HTML
294
## All HTML documentation in all other locales
295
# FIXME: probably have to shell escape to determine the file names
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
296
_DOC_LC_HTML =									\
297
	$(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach doc,$(_DOC_C_HTML),		\
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
298
		$(lc)/$(notdir $(doc)) ))
299
300
## @ _DOC_LC_DOCS
301
## All documentation files in all other locales
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
302
_DOC_LC_DOCS =									\
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
303
	$(_DOC_LC_MODULES)	$(_DOC_LC_INCLUDES)	$(_DOC_LC_PAGES)	\
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
304
	$(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_LC_HTML))
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
305
306
## @ _DOC_LC_FIGURES
307
## All figures and other external data in all other locales
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
308
_DOC_LC_FIGURES = $(foreach lc,$(_DOC_REAL_LINGUAS),				\
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
309
	$(patsubst C/%,$(lc)/%,$(_DOC_C_FIGURES)) )
310
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
311
_DOC_SRC_FIGURES =								\
312
	$(foreach fig,$(_DOC_C_FIGURES), $(foreach lc,C $(_DOC_REAL_LINGUAS),	\
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
313
		$(wildcard $(srcdir)/$(lc)/$(patsubst C/%,%,$(fig))) ))
314
1.2.6 by Sebastian Dröge
Import upstream version 0.9.2.1
315
$(_DOC_POFILES):
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
316
	@if ! test -d $(dir $@); then \
317
	  echo "mkdir $(dir $@)"; \
318
	  mkdir "$(dir $@)"; \
319
	fi
320
	@if test ! -f $@ -a -f $(srcdir)/$@; then \
321
	  echo "cp $(srcdir)/$@ $@"; \
322
	  cp "$(srcdir)/$@" "$@"; \
323
	fi;
324
	@docs=; \
1.2.6 by Sebastian Dröge
Import upstream version 0.9.2.1
325
	list='$(_DOC_C_DOCS_NOENT)'; for doc in $$list; do \
1.2.17 by Sebastian Dröge
Import upstream version 1.0.1
326
	  docs="$$docs $(_DOC_ABS_SRCDIR)/$$doc"; \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
327
	done; \
328
	if ! test -f $@; then \
329
	  echo "(cd $(dir $@) && \
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
330
	    $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
331
	    cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \
332
	  (cd $(dir $@) && \
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
333
	    $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
334
	    cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp); \
335
	else \
336
	  echo "(cd $(dir $@) && \
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
337
	    $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs)"; \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
338
	  (cd $(dir $@) && \
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
339
	    $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs); \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
340
	fi
341
3.1.6 by Josselin Mouette
* Switch to 3.0 source format.
342
$(_DOC_MOFILES): %.mo: %.po
343
	@if ! test -d $(dir $@); then \
344
	  echo "mkdir $(dir $@)"; \
345
	  mkdir "$(dir $@)"; \
346
	fi
347
	msgfmt -o $@ $<
348
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
349
# FIXME: fix the dependancy
350
# FIXME: hook xml2po up
3.1.6 by Josselin Mouette
* Switch to 3.0 source format.
351
$(_DOC_LC_DOCS) : $(_DOC_MOFILES)
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
352
$(_DOC_LC_DOCS) : $(_DOC_C_DOCS)
353
	if ! test -d $(dir $@); then mkdir $(dir $@); fi
1.2.17 by Sebastian Dröge
Import upstream version 1.0.1
354
	if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$(_DOC_ABS_SRCDIR)/"; fi; \
3.1.6 by Josselin Mouette
* Switch to 3.0 source format.
355
	mo="$(dir $@)$(patsubst %/$(notdir $@),%,$@).mo"; \
356
	if [ -f "$${mo}" ]; then mo="../$${mo}"; else mo="$(_DOC_ABS_SRCDIR)/$${mo}"; fi; \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
357
	(cd $(dir $@) && \
3.1.6 by Josselin Mouette
* Switch to 3.0 source format.
358
	  $(_xml2po) -m $(_xml2po_mode) -e -t "$${mo}" \
1.2.6 by Sebastian Dröge
Import upstream version 0.9.2.1
359
	    "$${d}C/$(notdir $@)" > $(notdir $@).tmp && \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
360
	    cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)
361
362
## @ _DOC_POT
363
## A pot file
364
_DOC_POT = $(if $(DOC_MODULE),$(DOC_MODULE).pot)
365
.PHONY: pot
366
pot: $(_DOC_POT)
367
$(_DOC_POT): $(_DOC_C_DOCS_NOENT)
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
368
	$(_xml2po) -m $(_xml2po_mode) -e -o $@ $^
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
369
370
371
################################################################################
372
## @@ All Documentation
373
374
## @ _DOC_HTML_ALL
375
## All HTML documentation, only if it's built
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
376
_DOC_HTML_ALL = $(if $(filter html HTML,$(_DOC_REAL_FORMATS)), \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
377
	$(_DOC_C_HTML) $(_DOC_LC_HTML))
378
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
379
_DOC_HTML_TOPS = $(foreach lc,C $(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xhtml)
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
380
381
$(_DOC_HTML_TOPS): $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
382
	xsltproc -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".xhtml" $(_db2html) $(patsubst %.xhtml,%.xml,$@)
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
383
384
385
################################################################################
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
386
## All
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
387
388
all:							\
389
	$(_DOC_C_DOCS)		$(_DOC_LC_DOCS)		\
390
	$(_DOC_OMF_ALL)		$(_DOC_DSK_ALL)		\
391
	$(_DOC_HTML_ALL)	$(_DOC_POFILES)
392
393
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
394
################################################################################
395
## Clean
396
1.2.17 by Sebastian Dröge
Import upstream version 1.0.1
397
.PHONY: clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
398
399
clean-doc-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML)
400
clean-doc-dsk: ; rm -f $(_DOC_DSK_DB) $(_DOC_DSK_HTML)
401
clean-doc-lc:
402
	rm -f $(_DOC_LC_DOCS)
3.1.6 by Josselin Mouette
* Switch to 3.0 source format.
403
	rm -f $(_DOC_MOFILES)
1.2.6 by Sebastian Dröge
Import upstream version 0.9.2.1
404
	@list='$(_DOC_POFILES)'; for po in $$list; do \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
405
	  if ! test "$$po" -ef "$(srcdir)/$$po"; then \
406
	    echo "rm -f $$po"; \
407
	    rm -f "$$po"; \
408
	  fi; \
409
	done
3.1.6 by Josselin Mouette
* Switch to 3.0 source format.
410
#	.xml2.po.mo cleaning is obsolete as of 0.18.1 and could be removed in 0.20.x
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
411
	@for lc in C $(_DOC_REAL_LINGUAS); do \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
412
	  if test -f "$$lc/.xml2po.mo"; then \
413
	    echo "rm -f $$lc/.xml2po.mo"; \
414
	    rm -f "$$lc/.xml2po.mo"; \
415
	  fi; \
416
	done
1.2.50 by Robert Ancell
Import upstream version 2.28.1
417
clean-doc-dir: clean-doc-lc
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
418
	@for lc in C $(_DOC_REAL_LINGUAS); do \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
419
	  for dir in `find $$lc -depth -type d`; do \
420
	    if ! test $$dir -ef $(srcdir)/$$dir; then \
421
	      echo "rmdir $$dir"; \
422
	      rmdir "$$dir"; \
423
	   fi; \
424
	  done; \
425
	done
426
427
_clean_omf = $(if $(_DOC_OMF_IN),clean-doc-omf)
428
_clean_dsk = $(if $(_DOC_DSK_IN),clean-doc-dsk)
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
429
_clean_lc  = $(if $(_DOC_REAL_LINGUAS),clean-doc-lc)
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
430
_clean_dir = $(if $(DOC_MODULE)$(DOC_ID),clean-doc-dir)
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
431
432
clean-local:						\
433
	$(_clean_omf)		$(_clean_dsk)		\
434
	$(_clean_lc)		$(_clean_dir)
435
distclean-local:					\
436
	$(_clean_omf)		$(_clean_dsk)		\
437
	$(_clean_lc)		$(_clean_dir)
438
mostlyclean-local:					\
439
	$(_clean_omf)		$(_clean_dsk)		\
440
	$(_clean_lc)		$(_clean_dir)
441
maintainer-clean-local:					\
442
	$(_clean_omf)		$(_clean_dsk)		\
443
	$(_clean_lc)		$(_clean_dir)
444
445
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
446
447
################################################################################
448
## Dist
449
450
.PHONY: dist-doc-docs dist-doc-pages dist-doc-figs dist-doc-omf dist-doc-dsk
451
doc-dist-hook: 						\
452
	$(if $(DOC_MODULE)$(DOC_ID),dist-doc-docs)	\
453
	$(if $(_DOC_C_FIGURES),dist-doc-figs)		\
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
454
	$(if $(_DOC_OMF_IN),dist-doc-omf)
455
#	$(if $(_DOC_DSK_IN),dist-doc-dsk)
456
457
dist-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
458
	@for lc in C $(_DOC_REAL_LINGUAS); do \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
459
	  echo " $(mkinstalldirs) $(distdir)/$$lc"; \
460
	  $(mkinstalldirs) "$(distdir)/$$lc"; \
461
	done
1.2.6 by Sebastian Dröge
Import upstream version 0.9.2.1
462
	@list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)'; \
463
	for doc in $$list; do \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
464
	  if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
1.2.27 by Pedro Fragoso
Import upstream version 2.21.91
465
	    docdir=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
466
	    if ! test -d "$(distdir)/$$docdir"; then \
467
	      echo "$(mkinstalldirs) $(distdir)/$$docdir"; \
468
	      $(mkinstalldirs) "$(distdir)/$$docdir"; \
469
	    fi; \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
470
	  echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \
471
	  $(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \
472
	done
473
474
dist-doc-figs: $(_DOC_SRC_FIGURES)
1.2.6 by Sebastian Dröge
Import upstream version 0.9.2.1
475
	@list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; \
476
	for fig in $$list; do \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
477
	  if test -f "$$fig"; then d=; else d="$(srcdir)/"; fi; \
478
	  if test -f "$$d$$fig"; then \
479
	    figdir=`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
480
	    if ! test -d "$(distdir)/$$figdir"; then \
481
	      echo "$(mkinstalldirs) $(distdir)/$$figdir"; \
482
	      $(mkinstalldirs) "$(distdir)/$$figdir"; \
483
	    fi; \
484
	    echo "$(INSTALL_DATA) $$d$$fig $(distdir)/$$fig"; \
485
	    $(INSTALL_DATA) "$$d$$fig" "$(distdir)/$$fig"; \
486
	  fi; \
487
	done;
488
489
dist-doc-omf:
490
	@if test -f "$(_DOC_OMF_IN)"; then d=; else d="$(srcdir)/"; fi; \
491
	echo "$(INSTALL_DATA) $$d$(_DOC_OMF_IN) $(distdir)/$(notdir $(_DOC_OMF_IN))"; \
492
	$(INSTALL_DATA) "$$d$(_DOC_OMF_IN)" "$(distdir)/$(notdir $(_DOC_OMF_IN))"
493
494
dist-doc-dsk:
495
	@if test -f "$(_DOC_DSK_IN)"; then d=; else d="$(srcdir)/"; fi; \
496
	echo "$(INSTALL_DATA) $$d$(_DOC_DSK_IN) $(distdir)/$(notdir $(_DOC_DSK_IN))"; \
497
	$(INSTALL_DATA) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))"
498
499
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
500
501
################################################################################
502
## Check
503
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
504
.PHONY: check-doc-docs check-doc-omf
505
check:							\
506
	$(if $(DOC_MODULE),check-doc-docs)		\
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
507
	$(if $(DOC_ID),check-doc-pages)			\
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
508
	$(if $(_DOC_OMF_IN),check-doc-omf)
509
510
check-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
511
	@for lc in C $(_DOC_REAL_LINGUAS); do \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
512
	  if test -f "$$lc"; \
513
	    then d=; \
514
	    xmlpath="$$lc"; \
515
	  else \
516
	    d="$(srcdir)/"; \
517
	    xmlpath="$$lc:$(srcdir)/$$lc"; \
518
	  fi; \
519
	  echo "xmllint --noout --noent --path $$xmlpath --xinclude --postvalid $$d$$lc/$(DOC_MODULE).xml"; \
520
	  xmllint --noout --noent --path "$$xmlpath" --xinclude --postvalid "$$d$$lc/$(DOC_MODULE).xml"; \
521
	done
522
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
523
check-doc-pages: $(_DOC_C_PAGES) $(_DOC_LC_PAGES)
524
	for lc in C $(_DOC_REAL_LINGUAS); do \
525
	  if test -f "$$lc"; \
526
	    then d=; \
527
	    xmlpath="$$lc"; \
528
	  else \
529
	    d="$(srcdir)/"; \
530
	    xmlpath="$$lc:$(srcdir)/$$lc"; \
531
	  fi; \
532
	  for page in $(DOC_PAGES); do \
533
	    echo "xmllint --noout --noent --path $$xmlpath --xinclude --relaxng $(_malrng) $$d$$lc/$$page"; \
534
	    xmllint --noout --noent --path "$$xmlpath" --xinclude --relaxng "$(_malrng)" "$$d$$lc/$$page"; \
535
	  done; \
536
	done
537
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
538
check-doc-omf: $(_DOC_OMF_ALL)
1.2.6 by Sebastian Dröge
Import upstream version 0.9.2.1
539
	@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
1.2.30 by Emilio Pozuelo Monfort
Import upstream version 2.22.1
540
	  echo "xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \
541
	  xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
542
	done
543
544
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
545
546
################################################################################
547
## Install
548
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
549
.PHONY: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
550
551
_doc_install_dir = $(if $(DOC_ID),$(DOC_ID),$(DOC_MODULE))
552
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
553
install-data-local:					\
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
554
	$(if $(DOC_MODULE)$(DOC_ID),install-doc-docs)	\
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
555
	$(if $(_DOC_HTML_ALL),install-doc-html)		\
556
	$(if $(_DOC_C_FIGURES),install-doc-figs)	\
557
	$(if $(_DOC_OMF_IN),install-doc-omf)
558
#	$(if $(_DOC_DSK_IN),install-doc-dsk)
559
560
install-doc-docs:
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
561
	@for lc in C $(_DOC_REAL_LINGUAS); do \
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
562
	  echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc"; \
563
	  $(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc; \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
564
	done
1.2.6 by Sebastian Dröge
Import upstream version 0.9.2.1
565
	@list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
566
	  if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
1.2.27 by Pedro Fragoso
Import upstream version 2.21.91
567
	  docdir="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
568
	  docdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$docdir"; \
1.2.27 by Pedro Fragoso
Import upstream version 2.21.91
569
	  if ! test -d "$$docdir"; then \
570
	    echo "$(mkinstalldirs) $$docdir"; \
571
	    $(mkinstalldirs) "$$docdir"; \
572
	  fi; \
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
573
	  echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
574
	  $(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc; \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
575
	done
576
577
install-doc-figs:
1.2.6 by Sebastian Dröge
Import upstream version 0.9.2.1
578
	@list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \
1.2.10 by Sebastian Dröge
Import upstream version 0.9.7
579
	  for lc in C $(_DOC_REAL_LINGUAS); do \
1.2.44 by Andreas Moog
Import upstream version 2.26.1
580
	    figsymlink=false; \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
581
	    if test -f "$$lc/$$fig"; then \
582
	      figfile="$$lc/$$fig"; \
583
	    elif test -f "$(srcdir)/$$lc/$$fig"; then \
584
	      figfile="$(srcdir)/$$lc/$$fig"; \
585
	    else \
1.2.44 by Andreas Moog
Import upstream version 2.26.1
586
	      figsymlink=true; \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
587
	    fi; \
588
	    figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
589
	    figdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$figdir"; \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
590
	    if ! test -d "$$figdir"; then \
591
	      echo "$(mkinstalldirs) $$figdir"; \
592
	      $(mkinstalldirs) "$$figdir"; \
593
	    fi; \
594
	    figbase=`echo $$fig | sed -e 's/^.*\///'`; \
1.2.44 by Andreas Moog
Import upstream version 2.26.1
595
	    if $$figsymlink; then \
596
	      echo "cd $$figdir && $(LN_S) -f ../../C/$$fig $$figbase"; \
597
	      ( cd "$$figdir" && $(LN_S) -f "../../C/$$fig" "$$figbase" ); \
598
	    else \
599
	      echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \
600
	      $(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \
601
	    fi; \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
602
	  done; \
603
	done
604
605
install-doc-html:
606
	echo install-html
607
608
install-doc-omf:
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
609
	$(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)
1.2.6 by Sebastian Dröge
Import upstream version 0.9.2.1
610
	@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
611
	  echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
612
	  $(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf; \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
613
	done
614
	@if test "x$(_ENABLE_SK)" = "xtrue"; then \
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
615
	  echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \
616
	  scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
617
	fi;
618
619
install-doc-dsk:
620
	echo install-dsk
621
622
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
623
624
################################################################################
625
## Uninstall
626
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
627
.PHONY: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk
628
uninstall-local:					\
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
629
	$(if $(DOC_MODULE)$(DOC_ID),uninstall-doc-docs)	\
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
630
	$(if $(_DOC_HTML_ALL),uninstall-doc-html)	\
1.2.6 by Sebastian Dröge
Import upstream version 0.9.2.1
631
	$(if $(_DOC_C_FIGURES),uninstall-doc-figs)	\
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
632
	$(if $(_DOC_OMF_IN),uninstall-doc-omf)
633
#	$(if $(_DOC_DSK_IN),uninstall-doc-dsk)
634
635
uninstall-doc-docs:
1.2.6 by Sebastian Dröge
Import upstream version 0.9.2.1
636
	@list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
637
	  echo " rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
638
	  rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
639
	done
640
641
uninstall-doc-figs:
1.2.6 by Sebastian Dröge
Import upstream version 0.9.2.1
642
	@list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in $$list; do \
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
643
	  echo "rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \
644
	  rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
645
	done;
646
647
uninstall-doc-omf:
1.2.6 by Sebastian Dröge
Import upstream version 0.9.2.1
648
	@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
1.2.27 by Pedro Fragoso
Import upstream version 2.21.91
649
	  if test "x$(_ENABLE_SK)" = "xtrue"; then \
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
650
	    echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
651
	    scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
652
	  fi; \
1.2.48 by Sebastien Bacher
Import upstream version 2.27.92
653
	  echo "rm -f $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
654
	  rm -f "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
1.2.5 by Sebastian Dröge
Import upstream version 0.9.1
655
	done