1
# gnome-doc-utils.make - make magic for building documentation
2
# Copyright (C) 2004-2005 Shaun McCance <shaunm@gnome.org>
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.
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.
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.
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.
23
################################################################################
24
## @@ Generating Header Files
27
## The name of the header file to generate
31
## The input DocBook files for generating the header file
34
$(DOC_H_FILE): $(DOC_H_DOCS);
35
@rm -f $@.tmp; touch $@.tmp;
36
echo 'const gchar* documentation_credits[] = {' >> $@.tmp
37
list='$(DOC_H_DOCS)'; for doc in $$list; do \
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; \
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
47
list='$(DOC_H_DOCS)'; for doc in $$list; do \
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'`; \
53
ids=`xsltproc --xinclude --path "$$xmlpath" $(_ids) $$doc`; \
55
echo '#define HELP_'`echo $$docid`'_'`echo $$id \
56
| sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`' "'$$id'"' >> $@.tmp; \
60
cp $@.tmp $@ && rm -f $@.tmp
63
if !HAVE_GNOME_DOC_UTILS
64
@echo "*** GNOME Doc Utils must be installed in order to make dist"
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)";
74
doc-dist-hook: dist-check-gdu $(if $(DOC_H_FILE),dist-doc-header)
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)
88
################################################################################
89
## @@ Generating Documentation Files
92
## The name of the document being built
96
## The unique identifier for a Mallard document
100
## Page files in a Mallard document
104
## Files included with a SYSTEM entity
108
## Files included with XInclude
112
## Figures and other external data
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))
121
## The languages this document is translated into
123
_DOC_REAL_LINGUAS = $(if $(filter environment,$(origin LINGUAS)), \
124
$(filter $(LINGUAS),$(DOC_LINGUAS)), \
127
_DOC_ABS_SRCDIR = @abs_srcdir@
130
################################################################################
131
## Variables for Bootstrapping
133
_xml2po ?= `which xml2po`
134
_xml2po_mode = $(if $(DOC_ID),mallard,docbook)
136
_db2html ?= `$(PKG_CONFIG) --variable db2html gnome-doc-utils`
137
_db2omf ?= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils`
138
_malrng ?= `$(PKG_CONFIG) --variable malrng gnome-doc-utils`
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
141
_ids ?= $(shell $(PKG_CONFIG) --variable xmldir gnome-doc-utils)/gnome/xslt/docbook/utils/ids.xsl
145
_skpkgdatadir ?= `scrollkeeper-config --pkgdatadir`
146
_sklocalstatedir ?= `scrollkeeper-config --pkglocalstatedir`
147
_skcontentslist ?= $(_skpkgdatadir)/Templates/C/scrollkeeper_cl.xml
151
################################################################################
152
## @@ Rules for OMF Files
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)" \
163
--stringparam db2omf.omf_in "$(_DOC_OMF_IN)" \
164
$(if $(_ENABLE_SK), \
165
--stringparam db2omf.scrollkeeper_cl "$(_skcontentslist)") \
169
## The OMF input file
170
_DOC_OMF_IN = $(if $(DOC_MODULE),$(wildcard $(_DOC_ABS_SRCDIR)/$(DOC_MODULE).omf.in))
173
## The OMF files for DocBook output
174
_DOC_OMF_DB = $(if $(_DOC_OMF_IN), \
175
$(foreach lc,C $(_DOC_REAL_LINGUAS),$(DOC_MODULE)-$(lc).omf))
177
$(_DOC_OMF_DB) : $(_DOC_OMF_IN)
178
$(_DOC_OMF_DB) : $(DOC_MODULE)-%.omf : %/$(DOC_MODULE).xml
179
@test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || { \
180
echo "The file '$(_skcontentslist)' does not exist." >&2; \
181
echo "Please check your ScrollKeeper installation." >&2; \
183
xsltproc -o $@ $(call db2omf_args,$@,$<,'docbook') || { rm -f "$@"; exit 1; }
186
## The OMF files for HTML output
187
_DOC_OMF_HTML = $(if $(_DOC_OMF_IN), \
188
$(foreach lc,C $(_DOC_REAL_LINGUAS),$(DOC_MODULE)-html-$(lc).omf))
190
$(_DOC_OMF_HTML) : $(_DOC_OMF_IN)
191
$(_DOC_OMF_HTML) : $(DOC_MODULE)-html-%.omf : %/$(DOC_MODULE).xml
193
@test "x$(_ENABLE_SK)" != "xtrue" -o -f "$(_skcontentslist)" || { \
194
echo "The file '$(_skcontentslist)' does not exist" >&2; \
195
echo "Please check your ScrollKeeper installation." >&2; \
198
xsltproc -o $@ $(call db2omf_args,$@,$<,'xhtml') || { rm -f "$@"; exit 1; }
201
## All OMF output files to be built
204
$(if $(filter docbook,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_DB)) \
205
$(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_HTML))
211
################################################################################
212
## @@ C Locale Documents
215
## The top-level documentation file in the C locale
216
_DOC_C_MODULE = $(if $(DOC_MODULE),C/$(DOC_MODULE).xml)
219
## Page files in a Mallard document in the C locale
220
_DOC_C_PAGES = $(foreach page,$(DOC_PAGES),C/$(page))
223
## Files included with a SYSTEM entity in the C locale
224
_DOC_C_ENTITIES = $(foreach ent,$(DOC_ENTITIES),C/$(ent))
226
## @ _DOC_C_XINCLUDES
227
## Files included with XInclude in the C locale
228
_DOC_C_INCLUDES = $(foreach inc,$(DOC_INCLUDES),C/$(inc))
231
## All documentation files in the C locale
233
$(_DOC_C_ENTITIES) $(_DOC_C_INCLUDES) \
234
$(_DOC_C_PAGES) $(_DOC_C_MODULE)
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 = \
240
$(_DOC_C_MODULE) $(_DOC_C_INCLUDES) \
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)))
250
## All HTML documentation in the C locale
251
# FIXME: probably have to shell escape to determine the file names
252
_DOC_C_HTML = $(foreach f, \
253
$(shell xsltproc --xinclude \
254
--stringparam db.chunk.basename "$(DOC_MODULE)" \
255
$(_chunks) "C/$(DOC_MODULE).xml"), \
258
###############################################################################
259
## @@ Other Locale Documentation
262
## The .po files used for translating the document
263
_DOC_POFILES = $(if $(DOC_MODULE)$(DOC_ID), \
264
$(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(lc).po))
270
## The .mo files used for translating the document
271
_DOC_MOFILES = $(patsubst %.po,%.mo,$(_DOC_POFILES))
277
## The top-level documentation files in all other locales
278
_DOC_LC_MODULES = $(if $(DOC_MODULE), \
279
$(foreach lc,$(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xml))
282
## Page files in a Mallard document in all other locales
284
$(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach page,$(_DOC_C_PAGES), \
285
$(lc)/$(notdir $(page)) ))
287
## @ _DOC_LC_XINCLUDES
288
## Files included with XInclude in all other locales
290
$(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach inc,$(_DOC_C_INCLUDES), \
291
$(lc)/$(notdir $(inc)) ))
294
## All HTML documentation in all other locales
295
# FIXME: probably have to shell escape to determine the file names
297
$(foreach lc,$(_DOC_REAL_LINGUAS),$(foreach doc,$(_DOC_C_HTML), \
298
$(lc)/$(notdir $(doc)) ))
301
## All documentation files in all other locales
303
$(_DOC_LC_MODULES) $(_DOC_LC_INCLUDES) $(_DOC_LC_PAGES) \
304
$(if $(filter html HTML,$(_DOC_REAL_FORMATS)),$(_DOC_LC_HTML))
307
## All figures and other external data in all other locales
308
_DOC_LC_FIGURES = $(foreach lc,$(_DOC_REAL_LINGUAS), \
309
$(patsubst C/%,$(lc)/%,$(_DOC_C_FIGURES)) )
312
$(foreach fig,$(_DOC_C_FIGURES), $(foreach lc,C $(_DOC_REAL_LINGUAS), \
313
$(wildcard $(srcdir)/$(lc)/$(patsubst C/%,%,$(fig))) ))
316
@if ! test -d $(dir $@); then \
317
echo "mkdir $(dir $@)"; \
320
@if test ! -f $@ -a -f $(srcdir)/$@; then \
321
echo "cp $(srcdir)/$@ $@"; \
322
cp "$(srcdir)/$@" "$@"; \
325
list='$(_DOC_C_DOCS_NOENT)'; for doc in $$list; do \
326
docs="$$docs $(_DOC_ABS_SRCDIR)/$$doc"; \
328
if ! test -f $@; then \
329
echo "(cd $(dir $@) && \
330
$(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \
331
cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \
333
$(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \
334
cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp); \
336
echo "(cd $(dir $@) && \
337
$(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs)"; \
339
$(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs); \
342
$(_DOC_MOFILES): %.mo: %.po
343
@if ! test -d $(dir $@); then \
344
echo "mkdir $(dir $@)"; \
349
# FIXME: fix the dependancy
350
# FIXME: hook xml2po up
351
$(_DOC_LC_DOCS) : $(_DOC_MOFILES)
352
$(_DOC_LC_DOCS) : $(_DOC_C_DOCS)
353
if ! test -d $(dir $@); then mkdir $(dir $@); fi
354
if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$(_DOC_ABS_SRCDIR)/"; fi; \
355
mo="$(dir $@)$(patsubst %/$(notdir $@),%,$@).mo"; \
356
if [ -f "$${mo}" ]; then mo="../$${mo}"; else mo="$(_DOC_ABS_SRCDIR)/$${mo}"; fi; \
358
$(_xml2po) -m $(_xml2po_mode) -e -t "$${mo}" \
359
"$${d}C/$(notdir $@)" > $(notdir $@).tmp && \
360
cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)
364
_DOC_POT = $(if $(DOC_MODULE),$(DOC_MODULE).pot,\
365
$(if $(DOC_ID),$(DOC_ID).pot))
368
$(_DOC_POT): $(_DOC_C_DOCS_NOENT)
369
$(_xml2po) -m $(_xml2po_mode) -e -o $@ $^
372
################################################################################
373
## @@ All Documentation
376
## All HTML documentation, only if it's built
377
_DOC_HTML_ALL = $(if $(filter html HTML,$(_DOC_REAL_FORMATS)), \
378
$(_DOC_C_HTML) $(_DOC_LC_HTML))
380
_DOC_HTML_TOPS = $(foreach lc,C $(_DOC_REAL_LINGUAS),$(lc)/$(DOC_MODULE).xhtml)
382
$(_DOC_HTML_TOPS): $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
383
xsltproc -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".xhtml" $(_db2html) $(patsubst %.xhtml,%.xml,$@)
386
################################################################################
390
$(_DOC_C_DOCS) $(_DOC_LC_DOCS) \
391
$(_DOC_OMF_ALL) $(_DOC_DSK_ALL) \
392
$(_DOC_HTML_ALL) $(_DOC_POFILES)
395
################################################################################
398
.PHONY: clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir
400
clean-doc-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML)
401
clean-doc-dsk: ; rm -f $(_DOC_DSK_DB) $(_DOC_DSK_HTML)
403
rm -f $(_DOC_LC_DOCS)
404
rm -f $(_DOC_MOFILES)
405
@list='$(_DOC_POFILES)'; for po in $$list; do \
406
if ! test "$$po" -ef "$(srcdir)/$$po"; then \
411
# .xml2.po.mo cleaning is obsolete as of 0.18.1 and could be removed in 0.20.x
412
@for lc in C $(_DOC_REAL_LINGUAS); do \
413
if test -f "$$lc/.xml2po.mo"; then \
414
echo "rm -f $$lc/.xml2po.mo"; \
415
rm -f "$$lc/.xml2po.mo"; \
418
clean-doc-dir: clean-doc-lc
419
@for lc in C $(_DOC_REAL_LINGUAS); do \
420
for dir in `find $$lc -depth -type d`; do \
421
if ! test $$dir -ef $(srcdir)/$$dir; then \
422
echo "rmdir $$dir"; \
428
_clean_omf = $(if $(_DOC_OMF_IN),clean-doc-omf)
429
_clean_dsk = $(if $(_DOC_DSK_IN),clean-doc-dsk)
430
_clean_lc = $(if $(_DOC_REAL_LINGUAS),clean-doc-lc)
431
_clean_dir = $(if $(DOC_MODULE)$(DOC_ID),clean-doc-dir)
434
$(_clean_omf) $(_clean_dsk) \
435
$(_clean_lc) $(_clean_dir)
437
$(_clean_omf) $(_clean_dsk) \
438
$(_clean_lc) $(_clean_dir)
440
$(_clean_omf) $(_clean_dsk) \
441
$(_clean_lc) $(_clean_dir)
442
maintainer-clean-local: \
443
$(_clean_omf) $(_clean_dsk) \
444
$(_clean_lc) $(_clean_dir)
448
################################################################################
451
.PHONY: dist-doc-docs dist-doc-pages dist-doc-figs dist-doc-omf dist-doc-dsk
453
$(if $(DOC_MODULE)$(DOC_ID),dist-doc-docs) \
454
$(if $(_DOC_C_FIGURES),dist-doc-figs) \
455
$(if $(_DOC_OMF_IN),dist-doc-omf)
456
# $(if $(_DOC_DSK_IN),dist-doc-dsk)
458
dist-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)
459
@for lc in C $(_DOC_REAL_LINGUAS); do \
460
echo " $(mkinstalldirs) $(distdir)/$$lc"; \
461
$(mkinstalldirs) "$(distdir)/$$lc"; \
463
@list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)'; \
464
for doc in $$list; do \
465
if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
466
docdir=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
467
if ! test -d "$(distdir)/$$docdir"; then \
468
echo "$(mkinstalldirs) $(distdir)/$$docdir"; \
469
$(mkinstalldirs) "$(distdir)/$$docdir"; \
471
echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \
472
$(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \
475
dist-doc-figs: $(_DOC_SRC_FIGURES)
476
@list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; \
477
for fig in $$list; do \
478
if test -f "$$fig"; then d=; else d="$(srcdir)/"; fi; \
479
if test -f "$$d$$fig"; then \
480
figdir=`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
481
if ! test -d "$(distdir)/$$figdir"; then \
482
echo "$(mkinstalldirs) $(distdir)/$$figdir"; \
483
$(mkinstalldirs) "$(distdir)/$$figdir"; \
485
echo "$(INSTALL_DATA) $$d$$fig $(distdir)/$$fig"; \
486
$(INSTALL_DATA) "$$d$$fig" "$(distdir)/$$fig"; \
491
@if test -f "$(_DOC_OMF_IN)"; then d=; else d="$(srcdir)/"; fi; \
492
echo "$(INSTALL_DATA) $$d$(_DOC_OMF_IN) $(distdir)/$(notdir $(_DOC_OMF_IN))"; \
493
$(INSTALL_DATA) "$$d$(_DOC_OMF_IN)" "$(distdir)/$(notdir $(_DOC_OMF_IN))"
496
@if test -f "$(_DOC_DSK_IN)"; then d=; else d="$(srcdir)/"; fi; \
497
echo "$(INSTALL_DATA) $$d$(_DOC_DSK_IN) $(distdir)/$(notdir $(_DOC_DSK_IN))"; \
498
$(INSTALL_DATA) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))"
502
################################################################################
505
.PHONY: check-doc-docs check-doc-omf
507
$(if $(DOC_MODULE),check-doc-docs) \
508
$(if $(DOC_ID),check-doc-pages) \
509
$(if $(_DOC_OMF_IN),check-doc-omf)
511
check-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
512
@for lc in C $(_DOC_REAL_LINGUAS); do \
518
xmlpath="$$lc:$(srcdir)/$$lc"; \
520
echo "xmllint --noout --noent --path $$xmlpath --xinclude --postvalid $$d$$lc/$(DOC_MODULE).xml"; \
521
xmllint --noout --noent --path "$$xmlpath" --xinclude --postvalid "$$d$$lc/$(DOC_MODULE).xml"; \
524
check-doc-pages: $(_DOC_C_PAGES) $(_DOC_LC_PAGES)
525
for lc in C $(_DOC_REAL_LINGUAS); do \
531
xmlpath="$$lc:$(srcdir)/$$lc"; \
533
for page in $(DOC_PAGES); do \
534
echo "xmllint --noout --noent --path $$xmlpath --xinclude --relaxng $(_malrng) $$d$$lc/$$page"; \
535
xmllint --noout --noent --path "$$xmlpath" --xinclude --relaxng "$(_malrng)" "$$d$$lc/$$page"; \
539
check-doc-omf: $(_DOC_OMF_ALL)
540
@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
541
echo "xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \
542
xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \
547
################################################################################
550
.PHONY: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk
552
_doc_install_dir = $(if $(DOC_ID),$(DOC_ID),$(DOC_MODULE))
554
install-data-local: \
555
$(if $(DOC_MODULE)$(DOC_ID),install-doc-docs) \
556
$(if $(_DOC_HTML_ALL),install-doc-html) \
557
$(if $(_DOC_C_FIGURES),install-doc-figs) \
558
$(if $(_DOC_OMF_IN),install-doc-omf)
559
# $(if $(_DOC_DSK_IN),install-doc-dsk)
562
@for lc in C $(_DOC_REAL_LINGUAS); do \
563
echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc"; \
564
$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc; \
566
@list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \
567
if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
568
docdir="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
569
docdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$docdir"; \
570
if ! test -d "$$docdir"; then \
571
echo "$(mkinstalldirs) $$docdir"; \
572
$(mkinstalldirs) "$$docdir"; \
574
echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
575
$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc; \
579
@list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \
580
for lc in C $(_DOC_REAL_LINGUAS); do \
582
if test -f "$$lc/$$fig"; then \
583
figfile="$$lc/$$fig"; \
584
elif test -f "$(srcdir)/$$lc/$$fig"; then \
585
figfile="$(srcdir)/$$lc/$$fig"; \
589
figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
590
figdir="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$figdir"; \
591
if ! test -d "$$figdir"; then \
592
echo "$(mkinstalldirs) $$figdir"; \
593
$(mkinstalldirs) "$$figdir"; \
595
figbase=`echo $$fig | sed -e 's/^.*\///'`; \
596
if $$figsymlink; then \
597
echo "cd $$figdir && $(LN_S) -f ../../C/$$fig $$figbase"; \
598
( cd "$$figdir" && $(LN_S) -f "../../C/$$fig" "$$figbase" ); \
600
echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \
601
$(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \
610
$(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)
611
@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
612
echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
613
$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf; \
615
@if test "x$(_ENABLE_SK)" = "xtrue"; then \
616
echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \
617
scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \
625
################################################################################
628
.PHONY: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk
630
$(if $(DOC_MODULE)$(DOC_ID),uninstall-doc-docs) \
631
$(if $(_DOC_HTML_ALL),uninstall-doc-html) \
632
$(if $(_DOC_C_FIGURES),uninstall-doc-figs) \
633
$(if $(_DOC_OMF_IN),uninstall-doc-omf)
634
# $(if $(_DOC_DSK_IN),uninstall-doc-dsk)
637
@list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \
638
echo " rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
639
rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
643
@list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in $$list; do \
644
echo "rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \
645
rm -f "$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \
649
@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
650
if test "x$(_ENABLE_SK)" = "xtrue"; then \
651
echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
652
scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
654
echo "rm -f $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
655
rm -f "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \