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
62
.PHONY: dist-doc-header
63
dist-doc-header: $(DOC_H_FILE)
64
@if test -f "$(DOC_H_FILE)"; then d=; else d="$(srcdir)/"; fi; \
65
echo "$(INSTALL_DATA) $${d}$(DOC_H_FILE) $(distdir)/$(DOC_H_FILE)"; \
66
$(INSTALL_DATA) "$${d}$(DOC_H_FILE)" "$(distdir)/$(DOC_H_FILE)";
68
doc-dist-hook: $(if $(DOC_H_FILE),dist-doc-header)
70
.PHONY: clean-doc-header
71
_clean_doc_header = $(if $(DOC_H_FILE),clean-doc-header)
72
clean-local: $(_clean_doc_header)
73
distclean-local: $(_clean_doc_header)
74
mostlyclean-local: $(_clean_doc_header)
75
maintainer-clean-local: $(_clean_doc_header)
82
################################################################################
83
## @@ Generating Documentation Files
86
## The name of the document being built
90
## Files included with a SYSTEM entity
94
## Files included with XInclude
98
## Figures and other external data
102
## The default formats to be built and installed
103
DOC_FORMATS ?= docbook
104
_DOC_REAL_FORMATS = $(if $(DOC_USER_FORMATS),$(DOC_USER_FORMATS),$(DOC_FORMATS))
107
## The languages this document is translated into
111
## The directories containing RNG files to be documented with rngdoc
115
## The directories containing XSLT files to be documented with xsldoc
119
################################################################################
120
## Variables for Bootstrapping
122
_xml2po ?= `which xml2po`
124
_db2html ?= `$(PKG_CONFIG) --variable db2html gnome-doc-utils`
125
_db2omf ?= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils`
126
_rngdoc ?= `$(PKG_CONFIG) --variable rngdoc gnome-doc-utils`
127
_xsldoc ?= `$(PKG_CONFIG) --variable xsldoc gnome-doc-utils`
128
_chunks ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/chunks.xsl
129
_credits ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/credits.xsl
130
_ids ?= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome/xslt/docbook/utils/ids.xsl
132
_sklocalstatedir ?= `scrollkeeper-config --pkglocalstatedir`
135
################################################################################
136
## @@ Rules for rngdoc
139
--stringparam rngdoc.id \
140
$(shell echo $(basename $(notdir $(1))) | sed -e 's/[^A-Za-z0-9_-]/_/g')\
141
$(_rngdoc) $(filter %/$(basename $(notdir $(1))).rng,$(_RNGDOC_RNGS))
144
## The actual RNG files for which to generate documentation with rngdoc
145
_RNGDOC_RNGS = $(sort $(patsubst ./%, %, $(foreach dir,$(RNGDOC_DIRS), \
146
$(wildcard $(dir)/*.rng) $(wildcard $(srcdir)/$(dir)/*.rng))))
149
## The generated rngdoc documentation in the C locale
150
_RNGDOC_C_DOCS = $(foreach rng,$(_RNGDOC_RNGS), C/$(basename $(notdir $(rng))).xml)
152
# FIXME: Fix the dependancies
153
$(_RNGDOC_C_DOCS) : $(_RNGDOC_RNGS)
154
if ! test -d $(dir $@); then mkdir $(dir $@); fi;
155
xsltproc $(call rngdoc_args,$@,$<) | xmllint --c14n - > $@.tmp && \
156
cp $@.tmp $@ && rm -f $@.tmp
159
rngdoc: $(_RNGDOC_C_DOCS)
162
################################################################################
163
## @@ Rules for xsldoc
165
# FIXME: _XSLDOC_XSLS is getting dupes with relative/absolute in some
166
# cases. Right now, I'm just taking the first, but that's just a bad
167
# work-around. Fix the real problem.
169
--stringparam xsldoc.id \
170
$(shell echo $(basename $(notdir $(1))) | sed -e 's/[^A-Za-z0-9_-]/_/g')\
172
$(word 1,$(filter %/$(basename $(notdir $(1))).xsl,$(_XSLDOC_XSLS)))
175
## The actual XSLT files for which to generate documentation with xsldoc
176
_XSLDOC_XSLS = $(sort $(patsubst ./%, %, $(foreach dir,$(XSLDOC_DIRS), \
177
$(wildcard $(dir)/*.xsl) $(wildcard $(srcdir)/$(dir)/*.xsl))))
180
## The generated xsldoc documentation in the C locale
181
_XSLDOC_C_DOCS = $(foreach xsl,$(_XSLDOC_XSLS), C/$(basename $(notdir $(xsl))).xml)
183
# FIXME: Fix the dependancies
184
$(_XSLDOC_C_DOCS) : $(_XSLDOC_XSLS)
185
if ! test -d $(dir $@); then mkdir $(dir $@); fi;
186
xsltproc $(call xsldoc_args,$@,$<) | xmllint --c14n - > $@.tmp && \
187
cp $@.tmp $@ && rm -f $@.tmp
190
xsldoc: $(_XSLDOC_C_DOCS)
193
################################################################################
194
## @@ Rules for OMF Files
197
--stringparam db2omf.basename $(DOC_MODULE) \
198
--stringparam db2omf.format $(3) \
199
--stringparam db2omf.dtd \
200
$(shell xmllint --format $(2) | grep -h PUBLIC | head -n 1 \
201
| sed -e 's/.*PUBLIC \(\"[^\"]*\"\).*/\1/') \
202
--stringparam db2omf.lang $(notdir $(patsubst %/$(notdir $(2)),%,$(2))) \
203
--stringparam db2omf.omf_dir "$(OMF_DIR)" \
204
--stringparam db2omf.help_dir "$(HELP_DIR)" \
205
--stringparam db2omf.omf_in "`pwd`/$(_DOC_OMF_IN)" \
209
## The OMF input file
210
_DOC_OMF_IN = $(if $(DOC_MODULE),$(wildcard $(srcdir)/$(DOC_MODULE).omf.in))
213
## The OMF files for DocBook output
214
_DOC_OMF_DB = $(if $(_DOC_OMF_IN), \
215
$(foreach lc,C $(DOC_LINGUAS),$(DOC_MODULE)-$(lc).omf))
217
$(_DOC_OMF_DB) : $(_DOC_OMF_IN)
218
$(_DOC_OMF_DB) : $(DOC_MODULE)-%.omf : %/$(DOC_MODULE).xml
219
xsltproc -o $@ $(call db2omf_args,$@,$<,'docbook')
222
## The OMF files for HTML output
223
_DOC_OMF_HTML = $(if $(_DOC_OMF_IN), \
224
$(foreach lc,C $(DOC_LINGUAS),$(DOC_MODULE)-html-$(lc).omf))
226
$(_DOC_OMF_HTML) : $(_DOC_OMF_IN)
227
$(_DOC_OMF_HTML) : $(DOC_MODULE)-html-%.omf : %/$(DOC_MODULE).xml
228
xsltproc -o $@ $(call db2omf_args,$@,$<,'html')
231
## All OMF output files to be built
234
$(if $(findstring docbook,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_DB)) \
235
$(if $(findstring html,$(_DOC_REAL_FORMATS)),$(_DOC_OMF_HTML))
241
################################################################################
242
## @@ Rules for Desktop Entry Files
245
## The desktop entry input file
246
_DOC_DSK_IN = $(if $(DOC_MODULE),$(wildcard $(srcdir)/$(DOC_MODULE).desktop.in))
249
## The desktop entry files for DocBook output
250
_DOC_DSK_DB = $(if $(_DOC_DSK_IN), \
251
$(foreach lc,C $(DOC_LINGUAS),$(DOC_MODULE).db.$(lc).desktop))
254
$(_DOC_DSK_DB) : $(_DOC_DSK_IN)
255
$(_DOC_DSK_DB) : $(DOC_MODULE).db.%.desktop : %/$(DOC_MODULE).xml
259
## The desktop entry files for HTML output
260
_DOC_DSK_HTML = $(if $(_DOC_DSK_IN), \
261
$(foreach lc,C $(DOC_LINGUAS),$(DOC_MODULE).html.$(lc).desktop))
263
$(_DOC_DSK_HTML) : $(_DOC_DSK_IN)
264
$(_DOC_DSK_HTML) : $(DOC_MODULE).html.%.desktop : %/$(DOC_MODULE).xml
268
## All desktop entry output files to be built
271
$(if $(findstring docbook,$(_DOC_REAL_FORMATS)),$(_DOC_DSK_DB)) \
272
$(if $(findstring html,$(_DOC_REAL_FORMATS)),$(_DOC_DSK_HTML))
278
################################################################################
279
## @@ Rules for .cvsignore Files
282
## The .cvsignore file in the top directory
283
_CVSIGNORE_TOP = $(if $(DOC_MODULE), .cvsignore)
286
## The .cvsignore file in the C directory
287
_CVSIGNORE_C = $(if $(DOC_MODULE), C/.cvsignore)
290
## The .cvsignore files in other locale directories
291
_CVSIGNORE_LC = $(if $(DOC_MODULE),$(foreach lc,$(DOC_LINGUAS),$(lc)/.cvsignore))
293
## @ _CVSIGNORE_TOP_FILES
294
## The list of files to be listed in the top-level .cvsignore file
295
_CVSIGNORE_TOP_FILES = $(_DOC_OMF_ALL) $(_DOC_DSK_ALL)
297
## @ _CVSIGNORE_C_FILES
298
## The list of files to be listed in the .cvsignore file in the C directory
299
_CVSIGNORE_C_FILES = $(_RNGDOC_C_DOCS) $(_XSLDOC_C_DOCS)
301
## @ _CVSIGNORE_C_FILES
302
## The list of files to be listed in the .cvsignore files in other
303
## locale directories
304
_CVSIGNORE_LC_FILES = $(_DOC_LC_DOCS)
306
$(_CVSIGNORE_TOP) : $(_CVSIGNORE_TOP_FILES)
307
if ! test -f $@; then touch $@; fi
309
list='$^'; for file in $$list; do \
310
echo $$file >> $@.tmp; \
312
cat $@.tmp | sort | uniq > $@
315
$(_CVSIGNORE_C) : $(_CVSIGNORE_C_FILES)
316
if ! test -f $@; then touch $@; fi
318
list='$^'; for file in $$list; do \
319
echo $$file | sed -e 's/.*\///' >> $@.tmp; \
321
cat $@.tmp | sort | uniq > $@
324
$(_CVSIGNORE_LC) : $(_CVSIGNORE_LC_FILES)
325
if ! test -f $@; then touch $@; fi
327
list='$(wildcard $(_CVSIGNORE_LC_FILES),$(dir $@)/*)'; \
328
for file in $$list; do \
329
echo $$file | sed -e 's/.*\///' >> $@.tmp; \
331
cat $@.tmp | sort | uniq > $@
335
cvsignore: $(_CVSIGNORE_TOP) $(_CVSIGNROE_C) $(_CVSIGNORE_LC)
338
################################################################################
339
## @@ C Locale Documents
342
## The top-level documentation file in the C locale
343
_DOC_C_MODULE = $(if $(DOC_MODULE),C/$(DOC_MODULE).xml)
346
## Files included with a SYSTEM entity in the C locale
347
_DOC_C_ENTITIES = $(foreach ent,$(DOC_ENTITIES),C/$(ent))
349
## @ _DOC_C_XINCLUDES
350
## Files included with XInclude in the C locale
351
_DOC_C_INCLUDES = $(foreach inc,$(DOC_INCLUDES),C/$(inc))
354
## All documentation files in the C locale
356
$(_DOC_C_ENTITIES) $(_DOC_C_INCLUDES) \
357
$(_RNGDOC_C_DOCS) $(_XSLDOC_C_DOCS) \
360
## @ _DOC_C_DOCS_NOENT
361
## All documentation files in the C locale,
362
## except files included with a SYSTEM entity
363
_DOC_C_DOCS_NOENT = \
364
$(_DOC_C_MODULE) $(_DOC_C_INCLUDES) \
365
$(_RNGDOC_C_DOCS) $(_XSLDOC_C_DOCS)
368
## All figures and other external data in the C locale
369
_DOC_C_FIGURES = $(if $(DOC_FIGURES), \
370
$(foreach fig,$(DOC_FIGURES),C/$(fig)), \
371
$(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/C/figures/*.png)))
374
## All HTML documentation in the C locale
375
# FIXME: probably have to shell escape to determine the file names
376
_DOC_C_HTML = $(shell xsltproc --xinclude \
377
--stringparam db.chunk.basename "$(DOC_MODULE)" \
378
$(_chunks) "C/$(DOC_MODULE).xml")
380
###############################################################################
381
## @@ Other Locale Documentation
384
## The .po files used for translating the document
385
_DOC_POFILES = $(if $(DOC_MODULE), \
386
$(foreach lc,$(DOC_LINGUAS),$(lc)/$(lc).po))
392
## The top-level documentation files in all other locales
393
_DOC_LC_MODULES = $(if $(DOC_MODULE), \
394
$(foreach lc,$(DOC_LINGUAS),$(lc)/$(DOC_MODULE).xml))
396
## @ _DOC_LC_XINCLUDES
397
## Files included with XInclude in all other locales
399
$(foreach lc,$(DOC_LINGUAS),$(foreach inc,$(_DOC_C_INCLUDES), \
400
$(lc)/$(notdir $(inc)) ))
403
## The generated rngdoc documentation in all other locales
405
$(foreach lc,$(DOC_LINGUAS),$(foreach doc,$(_RNGDOC_C_DOCS), \
406
$(lc)/$(notdir $(doc)) ))
409
## The generated xsldoc documentation in all other locales
411
$(foreach lc,$(DOC_LINGUAS),$(foreach doc,$(_XSLDOC_C_DOCS), \
412
$(lc)/$(notdir $(doc)) ))
415
## All HTML documentation in all other locales
416
# FIXME: probably have to shell escape to determine the file names
418
$(foreach lc,$(DOC_LINGUAS),$(foreach doc,$(_DOC_C_HTML), \
419
$(lc)/$(notdir $(doc)) ))
422
## All documentation files in all other locales
424
$(_DOC_LC_MODULES) $(_DOC_LC_INCLUDES) \
425
$(_RNGDOC_LC_DOCS) $(_XSLDOC_LC_DOCS) \
426
$(if $(findstring html,$(_DOC_REAL_FORMATS)),$(_DOC_LC_HTML))
429
## All figures and other external data in all other locales
430
_DOC_LC_FIGURES = $(foreach lc,$(DOC_LINGUAS), \
431
$(patsubst C/%,$(lc)/%,$(_DOC_C_FIGURES)) )
434
$(foreach fig,$(_DOC_C_FIGURES), $(foreach lc,C $(DOC_LINGUAS), \
435
$(wildcard $(srcdir)/$(lc)/$(patsubst C/%,%,$(fig))) ))
437
$(_DOC_POFILES): $(_DOC_C_DOCS)
438
@if ! test -d $(dir $@); then \
439
echo "mkdir $(dir $@)"; \
442
@if test ! -f $@ -a -f $(srcdir)/$@; then \
443
echo "cp $(srcdir)/$@ $@"; \
444
cp "$(srcdir)/$@" "$@"; \
447
list='$(_DOC_C_DOCS_NOENT)'; for doc in $$list; do \
448
if test -f $$doc; then \
449
docs="$$docs ../$$doc"; \
451
docs="$$docs ../$(srcdir)/$$doc"; \
454
if ! test -f $@; then \
455
echo "(cd $(dir $@) && \
456
$(_xml2po) -e $$docs > $(notdir $@).tmp && \
457
cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \
459
$(_xml2po) -e $$docs > $(notdir $@).tmp && \
460
cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp); \
462
echo "(cd $(dir $@) && \
463
$(_xml2po) -e -u $(notdir $@) $$docs)"; \
465
$(_xml2po) -e -u $(notdir $@) $$docs); \
468
# FIXME: fix the dependancy
469
# FIXME: hook xml2po up
470
$(_DOC_LC_DOCS) : $(_DOC_POFILES)
471
$(_DOC_LC_DOCS) : $(_DOC_C_DOCS)
472
if ! test -d $(dir $@); then mkdir $(dir $@); fi
473
case "$(srcdir)" in /*) sd="$(srcdir)";; *) sd="../$(srcdir)";; esac; \
474
if [ -f "C/$(notdir $@)" ]; then d="../"; else d="$sd/"; fi; \
477
"$${d}$(dir $@)$(patsubst %/$(notdir $@),%,$@).po" \
478
"$${d}C/$(notdir $@)" > $(notdir $@).tmp && \
479
cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)
483
_DOC_POT = $(if $(DOC_MODULE),$(DOC_MODULE).pot)
486
$(_DOC_POT): $(_DOC_C_DOCS_NOENT)
487
$(_xml2po) -e -o $@ $^
490
################################################################################
491
## @@ All Documentation
494
## All HTML documentation, only if it's built
495
_DOC_HTML_ALL = $(if $(findstring html,$(_DOC_REAL_FORMATS)), \
496
$(_DOC_C_HTML) $(_DOC_LC_HTML))
498
_DOC_HTML_TOPS = $(foreach lc,C $(DOC_LINGUAS),$(lc)/$(DOC_MODULE).html)
500
$(_DOC_HTML_TOPS): $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
501
xsltproc -o $@ --xinclude --param db.chunk.chunk_top "false()" --stringparam db.chunk.basename "$(DOC_MODULE)" --stringparam db.chunk.extension ".html" $(_db2html) $(patsubst %.html,%.xml,$@)
504
################################################################################
513
$(_DOC_C_DOCS) $(_DOC_LC_DOCS) \
514
$(_DOC_OMF_ALL) $(_DOC_DSK_ALL) \
515
$(_DOC_HTML_ALL) $(_DOC_POFILES)
518
.PHONY: clean-doc-rngdoc clean-doc-xsldoc clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir
520
clean-doc-rngdoc: ; rm -f $(_RNGDOC_C_DOCS) $(_RNGDOC_LC_DOCS)
521
clean-doc-xsldoc: ; rm -f $(_XSLDOC_C_DOCS) $(_XSLDOC_LC_DOCS)
522
clean-doc-omf: ; rm -f $(_DOC_OMF_DB) $(_DOC_OMF_HTML)
523
clean-doc-dsk: ; rm -f $(_DOC_DSK_DB) $(_DOC_DSK_HTML)
525
rm -f $(_DOC_LC_DOCS)
526
@list='$(_DOC_POFILES)'; for po in $$list; do \
527
if ! test "$$po" -ef "$(srcdir)/$$po"; then \
532
@for lc in C $(DOC_LINGUAS); do \
533
if test -f "$$lc/.xml2po.mo"; then \
534
echo "rm -f $$lc/.xml2po.mo"; \
535
rm -f "$$lc/.xml2po.mo"; \
539
@for lc in C $(DOC_LINGUAS); do \
540
for dir in `find $$lc -depth -type d`; do \
541
if ! test $$dir -ef $(srcdir)/$$dir; then \
542
echo "rmdir $$dir"; \
548
_clean_rngdoc = $(if $(RNGDOC_DIRS),clean-doc-rngdoc)
549
_clean_xsldoc = $(if $(XSLDOC_DIRS),clean-doc-xsldoc)
550
_clean_omf = $(if $(_DOC_OMF_IN),clean-doc-omf)
551
_clean_dsk = $(if $(_DOC_DSK_IN),clean-doc-dsk)
552
_clean_lc = $(if $(DOC_LINGUAS),clean-doc-lc)
553
_clean_dir = $(if $(DOC_MODULE),clean-doc-dir)
556
$(_clean_rngdoc) $(_clean_xsldoc) \
557
$(_clean_omf) $(_clean_dsk) \
558
$(_clean_lc) $(_clean_dir)
560
$(_clean_rngdoc) $(_clean_xsldoc) \
561
$(_clean_omf) $(_clean_dsk) \
562
$(_clean_lc) $(_clean_dir)
564
$(_clean_rngdoc) $(_clean_xsldoc) \
565
$(_clean_omf) $(_clean_dsk) \
566
$(_clean_lc) $(_clean_dir)
567
maintainer-clean-local: \
568
$(_clean_rngdoc) $(_clean_xsldoc) \
569
$(_clean_omf) $(_clean_dsk) \
570
$(_clean_lc) $(_clean_dir)
573
.PHONY: dist-doc-docs dist-doc-figs dist-doc-omf dist-doc-dsk
575
$(if $(DOC_MODULE),dist-doc-docs) \
576
$(if $(_DOC_C_FIGURES),dist-doc-figs) \
577
$(if $(_DOC_OMF_IN),dist-doc-omf)
578
# $(if $(_DOC_DSK_IN),dist-doc-dsk)
580
dist-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)
581
@for lc in C $(DOC_LINGUAS); do \
582
echo " $(mkinstalldirs) $(distdir)/$$lc"; \
583
$(mkinstalldirs) "$(distdir)/$$lc"; \
585
@list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)'; \
586
for doc in $$list; do \
587
if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
588
echo "$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \
589
$(INSTALL_DATA) "$$d$$doc" "$(distdir)/$$doc"; \
592
dist-doc-figs: $(_DOC_SRC_FIGURES)
593
@list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; \
594
for fig in $$list; do \
595
if test -f "$$fig"; then d=; else d="$(srcdir)/"; fi; \
596
if test -f "$$d$$fig"; then \
597
figdir=`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
598
if ! test -d "$(distdir)/$$figdir"; then \
599
echo "$(mkinstalldirs) $(distdir)/$$figdir"; \
600
$(mkinstalldirs) "$(distdir)/$$figdir"; \
602
echo "$(INSTALL_DATA) $$d$$fig $(distdir)/$$fig"; \
603
$(INSTALL_DATA) "$$d$$fig" "$(distdir)/$$fig"; \
608
@if test -f "$(_DOC_OMF_IN)"; then d=; else d="$(srcdir)/"; fi; \
609
echo "$(INSTALL_DATA) $$d$(_DOC_OMF_IN) $(distdir)/$(notdir $(_DOC_OMF_IN))"; \
610
$(INSTALL_DATA) "$$d$(_DOC_OMF_IN)" "$(distdir)/$(notdir $(_DOC_OMF_IN))"
613
@if test -f "$(_DOC_DSK_IN)"; then d=; else d="$(srcdir)/"; fi; \
614
echo "$(INSTALL_DATA) $$d$(_DOC_DSK_IN) $(distdir)/$(notdir $(_DOC_DSK_IN))"; \
615
$(INSTALL_DATA) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))"
618
.PHONY: check-doc-docs check-doc-omf
620
$(if $(DOC_MODULE),check-doc-docs) \
621
$(if $(_DOC_OMF_IN),check-doc-omf)
623
check-doc-docs: $(_DOC_C_DOCS) $(_DOC_LC_DOCS)
624
@for lc in C $(DOC_LINGUAS); do \
630
xmlpath="$$lc:$(srcdir)/$$lc"; \
632
echo "xmllint --noout --noent --path $$xmlpath --xinclude --postvalid $$d$$lc/$(DOC_MODULE).xml"; \
633
xmllint --noout --noent --path "$$xmlpath" --xinclude --postvalid "$$d$$lc/$(DOC_MODULE).xml"; \
636
check-doc-omf: $(_DOC_OMF_ALL)
637
@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
638
echo "xmllint --noout --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \
639
xmllint --noout --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \
643
.PHONY: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk
644
install-data-local: \
645
$(if $(DOC_MODULE),install-doc-docs) \
646
$(if $(_DOC_HTML_ALL),install-doc-html) \
647
$(if $(_DOC_C_FIGURES),install-doc-figs) \
648
$(if $(_DOC_OMF_IN),install-doc-omf)
649
# $(if $(_DOC_DSK_IN),install-doc-dsk)
652
@for lc in C $(DOC_LINGUAS); do \
653
echo "$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc"; \
654
$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc; \
656
@list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \
657
if test -f "$$doc"; then d=; else d="$(srcdir)/"; fi; \
658
echo "$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \
659
$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc; \
663
@list='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in $$list; do \
664
for lc in C $(DOC_LINGUAS); do \
665
if test -f "$$lc/$$fig"; then \
666
figfile="$$lc/$$fig"; \
667
elif test -f "$(srcdir)/$$lc/$$fig"; then \
668
figfile="$(srcdir)/$$lc/$$fig"; \
669
elif test -f "C/$$fig"; then \
672
figfile="$(srcdir)/C/$$fig"; \
674
figdir="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
675
figdir="$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$figdir"; \
676
if ! test -d "$$figdir"; then \
677
echo "$(mkinstalldirs) $$figdir"; \
678
$(mkinstalldirs) "$$figdir"; \
680
figbase=`echo $$fig | sed -e 's/^.*\///'`; \
681
echo "$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \
682
$(INSTALL_DATA) "$$figfile" "$$figdir$$figbase"; \
690
$(mkinstalldirs) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)
691
@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
692
echo "$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
693
$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf; \
695
@if test "x$(_ENABLE_SK)" = "xtrue"; then \
696
echo "scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \
697
scrollkeeper-update -p "$(DESTDIR)$(_sklocalstatedir)" -o "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \
704
.PHONY: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk
706
$(if $(DOC_MODULE),uninstall-doc-docs) \
707
$(if $(_DOC_HTML_ALL),uninstall-doc-html) \
708
$(if $(DOC_FIGURES),uninstall-doc-figs) \
709
$(if $(_DOC_OMF_IN),uninstall-doc-omf)
710
# $(if $(_DOC_DSK_IN),uninstall-doc-dsk)
713
@list='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in $$list; do \
714
echo " rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \
715
rm -f "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \
719
@list='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in $$list; do \
720
echo "rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \
721
rm -f "$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \
725
@list='$(_DOC_OMF_ALL)'; for omf in $$list; do \
726
if test "x$(_ENABLE_SK)" == "xtrue"; then \
727
echo "scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
728
scrollkeeper-uninstall -p "$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
730
echo "rm -f $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
731
rm -f "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \