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, see <http://www.gnu.org/licenses/>.
17 # As a special exception to the GNU General Public License, if you
18 # distribute this file as part of a program that contains a
19 # configuration script generated by Autoconf, you may include it under
20 # the same distribution terms that you use for the rest of that program.
22 ################################################################################
23 ## @@ Generating Header Files
26 ## The name of the header file to generate
30 ## The input DocBook files for generating the header file
33 $(DOC_H_FILE
): $(DOC_H_DOCS
);
34 @
rm -f
$@.tmp
; touch
$@.tmp
;
35 echo
'const gchar* documentation_credits[] = {' >> $@.tmp
36 list
='$(DOC_H_DOCS)'; for doc in
$$list; do \
37 xmlpath
="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \
38 if
! test -f
"$$doc"; then doc
="$(srcdir)/$$doc"; fi
; \
39 xsltproc
--path
"$$xmlpath" $(_credits
) $$doc; \
41 | 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}}' \
42 | sed
-e
's/\\/\\\\/' -e
's/"/\\"/' -e
's/\(.*\)/\t"\1",/' >> $@.tmp
43 echo
' NULL' >> $@.tmp
46 list
='$(DOC_H_DOCS)'; for doc in
$$list; do \
47 xmlpath
="`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`:$(srcdir)/`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`"; \
48 if
! test -f
"$$doc"; then doc
="$(srcdir)/$$doc"; fi
; \
49 docid
=`echo "$$doc" | sed -e 's/.*\/\([^/]*\)\.xml/\1/' \
50 | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`; \
52 ids
=`xsltproc --xinclude --path "$$xmlpath" $(_ids) $$doc`; \
54 echo
'#define HELP_'`echo $$docid`'_'`echo $$id \
55 | sed -e 's/[^a-zA-Z_]/_/g' | tr 'a-z' 'A-Z'`' "'$$id'"' >> $@.tmp
; \
59 cp
$@.tmp
$@
&& rm -f
$@.tmp
62 if
!HAVE_GNOME_DOC_UTILS
63 @echo
"*** GNOME Doc Utils must be installed in order to make dist"
67 .PHONY
: dist-doc-header
68 dist-doc-header
: $(DOC_H_FILE
)
69 @if
test -f
"$(DOC_H_FILE)"; then d
=; else d
="$(srcdir)/"; fi
; \
70 echo
"$(INSTALL_DATA) $${d}$(DOC_H_FILE) $(distdir)/$(DOC_H_FILE)"; \
71 $(INSTALL_DATA
) "$${d}$(DOC_H_FILE)" "$(distdir)/$(DOC_H_FILE)";
73 doc-dist-hook
: dist-check-gdu
$(if
$(DOC_H_FILE
),dist-doc-header
)
75 .PHONY
: clean-doc-header
76 _clean_doc_header
= $(if
$(DOC_H_FILE
),clean-doc-header
)
77 clean-local
: $(_clean_doc_header
)
78 distclean-local
: $(_clean_doc_header
)
79 mostlyclean-local
: $(_clean_doc_header
)
80 maintainer-clean-local
: $(_clean_doc_header
)
87 ################################################################################
88 ## @@ Generating Documentation Files
91 ## The name of the document being built
95 ## The unique identifier for a Mallard document
99 ## Page files in a Mallard document
103 ## Files included with a SYSTEM entity
107 ## Files included with XInclude
111 ## Figures and other external data
115 ## The default formats to be built and installed
116 DOC_FORMATS ?
= docbook
117 _DOC_REAL_FORMATS
= $(if
$(DOC_USER_FORMATS
),$(DOC_USER_FORMATS
),$(DOC_FORMATS
))
120 ## The languages this document is translated into
122 _DOC_REAL_LINGUAS
= $(if
$(filter environment
,$(origin LINGUAS
)), \
123 $(filter $(LINGUAS
),$(DOC_LINGUAS
)), \
126 _DOC_ABS_SRCDIR
= @abs_srcdir@
129 ################################################################################
130 ## Variables for Bootstrapping
132 _xml2po ?
= `which xml2po`
133 _xml2po_mode
= $(if
$(DOC_ID
),mallard
,docbook
)
135 _db2html ?
= `$(PKG_CONFIG) --variable db2html gnome-doc-utils`
136 _db2omf ?
= `$(PKG_CONFIG) --variable db2omf gnome-doc-utils`
137 _malrng ?
= `$(PKG_CONFIG) --variable malrng gnome-doc-utils`
138 _chunks ?
= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome
/xslt
/docbook
/utils
/chunks.xsl
139 _credits ?
= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome
/xslt
/docbook
/utils
/credits.xsl
140 _ids ?
= `$(PKG_CONFIG) --variable xmldir gnome-doc-utils`/gnome
/xslt
/docbook
/utils
/ids.xsl
144 _skpkgdatadir ?
= `scrollkeeper-config --pkgdatadir`
145 _sklocalstatedir ?
= `scrollkeeper-config --pkglocalstatedir`
146 _skcontentslist ?
= $(_skpkgdatadir
)/Templates
/C
/scrollkeeper_cl.xml
150 ################################################################################
151 ## @@ Rules for OMF Files
154 --stringparam db2omf.
basename $(DOC_MODULE
) \
155 --stringparam db2omf.format
$(3) \
156 --stringparam db2omf.dtd \
157 $(shell xmllint
--format
$(2) | grep
-h PUBLIC | head
-n
1 \
158 | sed
-e
's/.*PUBLIC \(\"[^\"]*\"\).*/\1/') \
159 --stringparam db2omf.lang
$(notdir $(patsubst %/$(notdir $(2)),%,$(2))) \
160 --stringparam db2omf.omf_dir
"$(OMF_DIR)" \
161 --stringparam db2omf.help_dir
"$(HELP_DIR)" \
162 --stringparam db2omf.omf_in
"$(_DOC_OMF_IN)" \
163 $(if
$(_ENABLE_SK
), \
164 --stringparam db2omf.scrollkeeper_cl
"$(_skcontentslist)") \
168 ## The OMF input file
169 _DOC_OMF_IN
= $(if
$(DOC_MODULE
),$(wildcard $(_DOC_ABS_SRCDIR
)/$(DOC_MODULE
).omf.in
))
172 ## The OMF files for DocBook output
173 _DOC_OMF_DB
= $(if
$(_DOC_OMF_IN
), \
174 $(foreach lc
,C
$(_DOC_REAL_LINGUAS
),$(DOC_MODULE
)-$(lc
).omf
))
176 $(_DOC_OMF_DB
) : $(_DOC_OMF_IN
)
177 $(_DOC_OMF_DB
) : $(DOC_MODULE
)-%.omf
: %/$(DOC_MODULE
).xml
178 @
test "x$(_ENABLE_SK)" != "xtrue" -o
-f
"$(_skcontentslist)" ||
{ \
179 echo
"The file '$(_skcontentslist)' does not exist." >&2; \
180 echo
"Please check your ScrollKeeper installation." >&2; \
182 xsltproc
-o
$@
$(call db2omf_args
,$@
,$<,'docbook') ||
{ rm -f
"$@"; exit
1; }
185 ## The OMF files for HTML output
186 _DOC_OMF_HTML
= $(if
$(_DOC_OMF_IN
), \
187 $(foreach lc
,C
$(_DOC_REAL_LINGUAS
),$(DOC_MODULE
)-html-
$(lc
).omf
))
189 $(_DOC_OMF_HTML
) : $(_DOC_OMF_IN
)
190 $(_DOC_OMF_HTML
) : $(DOC_MODULE
)-html-
%.omf
: %/$(DOC_MODULE
).xml
192 @
test "x$(_ENABLE_SK)" != "xtrue" -o
-f
"$(_skcontentslist)" ||
{ \
193 echo
"The file '$(_skcontentslist)' does not exist" >&2; \
194 echo
"Please check your ScrollKeeper installation." >&2; \
197 xsltproc
-o
$@
$(call db2omf_args
,$@
,$<,'xhtml') ||
{ rm -f
"$@"; exit
1; }
200 ## All OMF output files to be built
203 $(if
$(filter docbook
,$(_DOC_REAL_FORMATS
)),$(_DOC_OMF_DB
)) \
204 $(if
$(filter html HTML
,$(_DOC_REAL_FORMATS
)),$(_DOC_OMF_HTML
))
210 ################################################################################
211 ## @@ C Locale Documents
214 ## The top-level documentation file in the C locale
215 _DOC_C_MODULE
= $(if
$(DOC_MODULE
),C
/$(DOC_MODULE
).xml
)
218 ## Page files in a Mallard document in the C locale
219 _DOC_C_PAGES
= $(foreach page
,$(DOC_PAGES
),C
/$(page
))
222 ## Files included with a SYSTEM entity in the C locale
223 _DOC_C_ENTITIES
= $(foreach ent
,$(DOC_ENTITIES
),C
/$(ent
))
225 ## @ _DOC_C_XINCLUDES
226 ## Files included with XInclude in the C locale
227 _DOC_C_INCLUDES
= $(foreach inc
,$(DOC_INCLUDES
),C
/$(inc
))
230 ## All documentation files in the C locale
232 $(_DOC_C_ENTITIES
) $(_DOC_C_INCLUDES
) \
233 $(_DOC_C_PAGES
) $(_DOC_C_MODULE
)
235 ## @ _DOC_C_DOCS_NOENT
236 ## All documentation files in the C locale,
237 ## except files included with a SYSTEM entity
238 _DOC_C_DOCS_NOENT
= \
239 $(_DOC_C_MODULE
) $(_DOC_C_INCLUDES
) \
243 ## All figures and other external data in the C locale
244 _DOC_C_FIGURES
= $(if
$(DOC_FIGURES
), \
245 $(foreach fig
,$(DOC_FIGURES
),C
/$(fig
)), \
246 $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/C
/figures
/*.png
)))
249 ## All HTML documentation in the C locale
250 # FIXME: probably have to shell escape to determine the file names
251 _DOC_C_HTML
= $(foreach f
, \
252 $(shell xsltproc
--xinclude \
253 --stringparam db.chunk.
basename "$(DOC_MODULE)" \
254 $(_chunks
) "C/$(DOC_MODULE).xml"), \
257 ###############################################################################
258 ## @@ Other Locale Documentation
261 ## The .po files used for translating the document
262 _DOC_POFILES
= $(if
$(DOC_MODULE
)$(DOC_ID
), \
263 $(foreach lc
,$(_DOC_REAL_LINGUAS
),$(lc
)/$(lc
).po
))
269 ## The .mo files used for translating the document
270 _DOC_MOFILES
= $(patsubst %.po
,%.mo
,$(_DOC_POFILES
))
276 ## The top-level documentation files in all other locales
277 _DOC_LC_MODULES
= $(if
$(DOC_MODULE
), \
278 $(foreach lc
,$(_DOC_REAL_LINGUAS
),$(lc
)/$(DOC_MODULE
).xml
))
281 ## Page files in a Mallard document in all other locales
283 $(foreach lc
,$(_DOC_REAL_LINGUAS
),$(foreach page
,$(_DOC_C_PAGES
), \
284 $(lc
)/$(notdir $(page
)) ))
286 ## @ _DOC_LC_XINCLUDES
287 ## Files included with XInclude in all other locales
289 $(foreach lc
,$(_DOC_REAL_LINGUAS
),$(foreach inc
,$(_DOC_C_INCLUDES
), \
290 $(lc
)/$(notdir $(inc
)) ))
293 ## All HTML documentation in all other locales
294 # FIXME: probably have to shell escape to determine the file names
296 $(foreach lc
,$(_DOC_REAL_LINGUAS
),$(foreach doc
,$(_DOC_C_HTML
), \
297 $(lc
)/$(notdir $(doc
)) ))
300 ## All documentation files in all other locales
302 $(_DOC_LC_MODULES
) $(_DOC_LC_INCLUDES
) $(_DOC_LC_PAGES
) \
303 $(if
$(filter html HTML
,$(_DOC_REAL_FORMATS
)),$(_DOC_LC_HTML
))
306 ## All figures and other external data in all other locales
307 _DOC_LC_FIGURES
= $(foreach lc
,$(_DOC_REAL_LINGUAS
), \
308 $(patsubst C
/%,$(lc
)/%,$(_DOC_C_FIGURES
)) )
311 $(foreach fig
,$(_DOC_C_FIGURES
), $(foreach lc
,C
$(_DOC_REAL_LINGUAS
), \
312 $(wildcard $(srcdir)/$(lc
)/$(patsubst C
/%,%,$(fig
))) ))
315 @if
! test -d
$(dir $@
); then \
316 echo
"mkdir $(dir $@)"; \
319 @if
test ! -f
$@
-a
-f
$(srcdir)/$@
; then \
320 echo
"cp $(srcdir)/$@ $@"; \
321 cp
"$(srcdir)/$@" "$@"; \
324 list
='$(_DOC_C_DOCS_NOENT)'; for doc in
$$list; do \
325 docs
="$$docs $(_DOC_ABS_SRCDIR)/$$doc"; \
327 if
! test -f
$@
; then \
328 echo
"(cd $(dir $@) && \
329 $(_xml2po) -m $(_xml2po_mode) -e $$docs > $(notdir $@).tmp && \
330 cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \
332 $(_xml2po
) -m
$(_xml2po_mode
) -e
$$docs > $(notdir $@
).tmp
&& \
333 cp
$(notdir $@
).tmp
$(notdir $@
) && rm -f
$(notdir $@
).tmp
); \
335 echo
"(cd $(dir $@) && \
336 $(_xml2po) -m $(_xml2po_mode) -e -u $(notdir $@) $$docs)"; \
338 $(_xml2po
) -m
$(_xml2po_mode
) -e
-u
$(notdir $@
) $$docs); \
341 $(_DOC_MOFILES
): %.mo
: %.po
342 @if
! test -d
$(dir $@
); then \
343 echo
"mkdir $(dir $@)"; \
348 # FIXME: fix the dependancy
349 # FIXME: hook xml2po up
350 $(_DOC_LC_DOCS
) : $(_DOC_MOFILES
)
351 $(_DOC_LC_DOCS
) : $(_DOC_C_DOCS
)
352 if
! test -d
$(dir $@
); then mkdir
$(dir $@
); fi
353 if
[ -f
"C/$(notdir $@)" ]; then d
="../"; else d
="$(_DOC_ABS_SRCDIR)/"; fi
; \
354 mo
="$(dir $@)$(patsubst %/$(notdir $@),%,$@).mo"; \
355 if
[ -f
"$${mo}" ]; then mo
="../$${mo}"; else mo
="$(_DOC_ABS_SRCDIR)/$${mo}"; fi
; \
357 $(_xml2po
) -m
$(_xml2po_mode
) -e
-t
"$${mo}" \
358 "$${d}C/$(notdir $@)" > $(notdir $@
).tmp
&& \
359 cp
$(notdir $@
).tmp
$(notdir $@
) && rm -f
$(notdir $@
).tmp
)
363 _DOC_POT
= $(if
$(DOC_MODULE
),$(DOC_MODULE
).pot
)
366 $(_DOC_POT
): $(_DOC_C_DOCS_NOENT
)
367 $(_xml2po
) -m
$(_xml2po_mode
) -e
-o
$@
$^
370 ################################################################################
371 ## @@ All Documentation
374 ## All HTML documentation, only if it's built
375 _DOC_HTML_ALL
= $(if
$(filter html HTML
,$(_DOC_REAL_FORMATS
)), \
376 $(_DOC_C_HTML
) $(_DOC_LC_HTML
))
378 _DOC_HTML_TOPS
= $(foreach lc
,C
$(_DOC_REAL_LINGUAS
),$(lc
)/$(DOC_MODULE
).xhtml
)
380 $(_DOC_HTML_TOPS
): $(_DOC_C_DOCS
) $(_DOC_LC_DOCS
)
381 xsltproc
-o
$@
--xinclude
--param db.chunk.chunk_top
"false()" --stringparam db.chunk.
basename "$(DOC_MODULE)" --stringparam db.chunk.extension
".xhtml" $(_db2html
) $(patsubst %.xhtml
,%.xml
,$@
)
384 ################################################################################
388 $(_DOC_C_DOCS
) $(_DOC_LC_DOCS
) \
389 $(_DOC_OMF_ALL
) $(_DOC_DSK_ALL
) \
390 $(_DOC_HTML_ALL
) $(_DOC_POFILES
)
393 ################################################################################
396 .PHONY
: clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir
398 clean-doc-omf
: ; rm -f
$(_DOC_OMF_DB
) $(_DOC_OMF_HTML
)
399 clean-doc-dsk
: ; rm -f
$(_DOC_DSK_DB
) $(_DOC_DSK_HTML
)
401 rm -f
$(_DOC_LC_DOCS
)
402 rm -f
$(_DOC_MOFILES
)
403 @list
='$(_DOC_POFILES)'; for po in
$$list; do \
404 if
! test "$$po" -ef
"$(srcdir)/$$po"; then \
409 # .xml2.po.mo cleaning is obsolete as of 0.18.1 and could be removed in 0.20.x
410 @for lc in C
$(_DOC_REAL_LINGUAS
); do \
411 if
test -f
"$$lc/.xml2po.mo"; then \
412 echo
"rm -f $$lc/.xml2po.mo"; \
413 rm -f
"$$lc/.xml2po.mo"; \
416 clean-doc-dir
: clean-doc-lc
417 @for lc in C
$(_DOC_REAL_LINGUAS
); do \
418 for
dir in
`find $$lc -depth -type d`; do \
419 if
! test $$dir -ef
$(srcdir)/$$dir; then \
420 echo
"rmdir $$dir"; \
426 _clean_omf
= $(if
$(_DOC_OMF_IN
),clean-doc-omf
)
427 _clean_dsk
= $(if
$(_DOC_DSK_IN
),clean-doc-dsk
)
428 _clean_lc
= $(if
$(_DOC_REAL_LINGUAS
),clean-doc-lc
)
429 _clean_dir
= $(if
$(DOC_MODULE
)$(DOC_ID
),clean-doc-dir
)
432 $(_clean_omf
) $(_clean_dsk
) \
433 $(_clean_lc
) $(_clean_dir
)
435 $(_clean_omf
) $(_clean_dsk
) \
436 $(_clean_lc
) $(_clean_dir
)
438 $(_clean_omf
) $(_clean_dsk
) \
439 $(_clean_lc
) $(_clean_dir
)
440 maintainer-clean-local
: \
441 $(_clean_omf
) $(_clean_dsk
) \
442 $(_clean_lc
) $(_clean_dir
)
446 ################################################################################
449 .PHONY
: dist-doc-docs dist-doc-pages dist-doc-figs dist-doc-omf dist-doc-dsk
451 $(if
$(DOC_MODULE
)$(DOC_ID
),dist-doc-docs
) \
452 $(if
$(_DOC_C_FIGURES
),dist-doc-figs
) \
453 $(if
$(_DOC_OMF_IN
),dist-doc-omf
)
454 # $(if $(_DOC_DSK_IN),dist-doc-dsk)
456 dist-doc-docs
: $(_DOC_C_DOCS
) $(_DOC_LC_DOCS
) $(_DOC_POFILES
)
457 @for lc in C
$(_DOC_REAL_LINGUAS
); do \
458 echo
" $(mkinstalldirs) $(distdir)/$$lc"; \
459 $(mkinstalldirs
) "$(distdir)/$$lc"; \
461 @list
='$(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)'; \
462 for doc in
$$list; do \
463 if
test -f
"$$doc"; then d
=; else d
="$(srcdir)/"; fi
; \
464 docdir
=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
465 if
! test -d
"$(distdir)/$$docdir"; then \
466 echo
"$(mkinstalldirs) $(distdir)/$$docdir"; \
467 $(mkinstalldirs
) "$(distdir)/$$docdir"; \
469 echo
"$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \
470 $(INSTALL_DATA
) "$$d$$doc" "$(distdir)/$$doc"; \
473 dist-doc-figs
: $(_DOC_SRC_FIGURES
)
474 @list
='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; \
475 for fig in
$$list; do \
476 if
test -f
"$$fig"; then d
=; else d
="$(srcdir)/"; fi
; \
477 if
test -f
"$$d$$fig"; then \
478 figdir
=`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
479 if
! test -d
"$(distdir)/$$figdir"; then \
480 echo
"$(mkinstalldirs) $(distdir)/$$figdir"; \
481 $(mkinstalldirs
) "$(distdir)/$$figdir"; \
483 echo
"$(INSTALL_DATA) $$d$$fig $(distdir)/$$fig"; \
484 $(INSTALL_DATA
) "$$d$$fig" "$(distdir)/$$fig"; \
489 @if
test -f
"$(_DOC_OMF_IN)"; then d
=; else d
="$(srcdir)/"; fi
; \
490 echo
"$(INSTALL_DATA) $$d$(_DOC_OMF_IN) $(distdir)/$(notdir $(_DOC_OMF_IN))"; \
491 $(INSTALL_DATA
) "$$d$(_DOC_OMF_IN)" "$(distdir)/$(notdir $(_DOC_OMF_IN))"
494 @if
test -f
"$(_DOC_DSK_IN)"; then d
=; else d
="$(srcdir)/"; fi
; \
495 echo
"$(INSTALL_DATA) $$d$(_DOC_DSK_IN) $(distdir)/$(notdir $(_DOC_DSK_IN))"; \
496 $(INSTALL_DATA
) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))"
500 ################################################################################
503 .PHONY
: check-doc-docs check-doc-omf
505 $(if
$(DOC_MODULE
),check-doc-docs
) \
506 $(if
$(DOC_ID
),check-doc-pages
) \
507 $(if
$(_DOC_OMF_IN
),check-doc-omf
)
509 check-doc-docs
: $(_DOC_C_DOCS
) $(_DOC_LC_DOCS
)
510 @for lc in C
$(_DOC_REAL_LINGUAS
); do \
516 xmlpath
="$$lc:$(srcdir)/$$lc"; \
518 echo
"xmllint --noout --noent --path $$xmlpath --xinclude --postvalid $$d$$lc/$(DOC_MODULE).xml"; \
519 xmllint
--noout
--noent
--path
"$$xmlpath" --xinclude
--postvalid
"$$d$$lc/$(DOC_MODULE).xml"; \
522 check-doc-pages
: $(_DOC_C_PAGES
) $(_DOC_LC_PAGES
)
523 for lc in C
$(_DOC_REAL_LINGUAS
); do \
529 xmlpath
="$$lc:$(srcdir)/$$lc"; \
531 for page in
$(DOC_PAGES
); do \
532 echo
"xmllint --noout --noent --path $$xmlpath --xinclude --relaxng $(_malrng) $$d$$lc/$$page"; \
533 xmllint
--noout
--noent
--path
"$$xmlpath" --xinclude
--relaxng
"$(_malrng)" "$$d$$lc/$$page"; \
537 check-doc-omf
: $(_DOC_OMF_ALL
)
538 @list
='$(_DOC_OMF_ALL)'; for omf in
$$list; do \
539 echo
"xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \
540 xmllint
--noout
--xinclude
--dtdvalid
'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \
545 ################################################################################
548 .PHONY
: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk
550 _doc_install_dir
= $(if
$(DOC_ID
),$(DOC_ID
),$(DOC_MODULE
))
552 install-data-local
: \
553 $(if
$(DOC_MODULE
)$(DOC_ID
),install-doc-docs
) \
554 $(if
$(_DOC_HTML_ALL
),install-doc-html
) \
555 $(if
$(_DOC_C_FIGURES
),install-doc-figs
) \
556 $(if
$(_DOC_OMF_IN
),install-doc-omf
)
557 # $(if $(_DOC_DSK_IN),install-doc-dsk)
560 @for lc in C
$(_DOC_REAL_LINGUAS
); do \
561 echo
"$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$lc"; \
562 $(mkinstalldirs
) $(DESTDIR
)$(HELP_DIR
)/$(_doc_install_dir
)/$$lc; \
564 @list
='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in
$$list; do \
565 if
test -f
"$$doc"; then d
=; else d
="$(srcdir)/"; fi
; \
566 docdir
="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
567 docdir
="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$docdir"; \
568 if
! test -d
"$$docdir"; then \
569 echo
"$(mkinstalldirs) $$docdir"; \
570 $(mkinstalldirs
) "$$docdir"; \
572 echo
"$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
573 $(INSTALL_DATA
) $$d$$doc $(DESTDIR
)$(HELP_DIR
)/$(_doc_install_dir
)/$$doc; \
577 @list
='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in
$$list; do \
578 for lc in C
$(_DOC_REAL_LINGUAS
); do \
580 if
test -f
"$$lc/$$fig"; then \
581 figfile
="$$lc/$$fig"; \
582 elif
test -f
"$(srcdir)/$$lc/$$fig"; then \
583 figfile
="$(srcdir)/$$lc/$$fig"; \
587 figdir
="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
588 figdir
="$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$figdir"; \
589 if
! test -d
"$$figdir"; then \
590 echo
"$(mkinstalldirs) $$figdir"; \
591 $(mkinstalldirs
) "$$figdir"; \
593 figbase
=`echo $$fig | sed -e 's/^.*\///'`; \
594 if
$$figsymlink; then \
595 echo
"cd $$figdir && $(LN_S) -f ../../C/$$fig $$figbase"; \
596 ( cd
"$$figdir" && $(LN_S
) -f
"../../C/$$fig" "$$figbase" ); \
598 echo
"$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \
599 $(INSTALL_DATA
) "$$figfile" "$$figdir$$figbase"; \
608 $(mkinstalldirs
) $(DESTDIR
)$(OMF_DIR
)/$(_doc_install_dir
)
609 @list
='$(_DOC_OMF_ALL)'; for omf in
$$list; do \
610 echo
"$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
611 $(INSTALL_DATA
) $$omf $(DESTDIR
)$(OMF_DIR
)/$(_doc_install_dir
)/$$omf; \
613 @if
test "x$(_ENABLE_SK)" = "xtrue"; then \
614 echo
"scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \
615 scrollkeeper-update
-p
"$(DESTDIR)$(_sklocalstatedir)" -o
"$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)"; \
623 ################################################################################
626 .PHONY
: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk
628 $(if
$(DOC_MODULE
)$(DOC_ID
),uninstall-doc-docs
) \
629 $(if
$(_DOC_HTML_ALL
),uninstall-doc-html
) \
630 $(if
$(_DOC_C_FIGURES
),uninstall-doc-figs
) \
631 $(if
$(_DOC_OMF_IN
),uninstall-doc-omf
)
632 # $(if $(_DOC_DSK_IN),uninstall-doc-dsk)
635 @list
='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in
$$list; do \
636 echo
" rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
637 rm -f
"$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$doc"; \
641 @list
='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in
$$list; do \
642 echo
"rm -f $(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \
643 rm -f
"$(DESTDIR)$(HELP_DIR)/$(_doc_install_dir)/$$fig"; \
647 @list
='$(_DOC_OMF_ALL)'; for omf in
$$list; do \
648 if
test "x$(_ENABLE_SK)" = "xtrue"; then \
649 echo
"scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
650 scrollkeeper-uninstall
-p
"$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
652 echo
"rm -f $(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \
653 rm -f
"$(DESTDIR)$(OMF_DIR)/$(_doc_install_dir)/$$omf"; \