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 ## Files included with a SYSTEM entity
99 ## Files included with XInclude
103 ## Figures and other external data
107 ## The default formats to be built and installed
108 DOC_FORMATS ?
= docbook
109 _DOC_REAL_FORMATS
= $(if
$(DOC_USER_FORMATS
),$(DOC_USER_FORMATS
),$(DOC_FORMATS
))
112 ## The languages this document is translated into
114 _DOC_REAL_LINGUAS
= $(if
$(filter environment
,$(origin LINGUAS
)), \
115 $(filter $(LINGUAS
),$(DOC_LINGUAS
)), \
118 _DOC_ABS_SRCDIR
= @abs_srcdir@
121 ################################################################################
122 ## Variables for Bootstrapping
124 _xml2po ?
= `which xml2po`
126 _db2html ?
= `$(PKG_CONFIG) --variable db2html gnome-doc-utils`
127 _db2omf ?
= `$(PKG_CONFIG) --variable db2omf 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
134 _skpkgdatadir ?
= `scrollkeeper-config --pkgdatadir`
135 _sklocalstatedir ?
= `scrollkeeper-config --pkglocalstatedir`
136 _skcontentslist ?
= $(_skpkgdatadir
)/Templates
/C
/scrollkeeper_cl.xml
140 ################################################################################
141 ## @@ Rules for OMF Files
144 --stringparam db2omf.
basename $(DOC_MODULE
) \
145 --stringparam db2omf.format
$(3) \
146 --stringparam db2omf.dtd \
147 $(shell xmllint
--format
$(2) | grep
-h PUBLIC | head
-n
1 \
148 | sed
-e
's/.*PUBLIC \(\"[^\"]*\"\).*/\1/') \
149 --stringparam db2omf.lang
$(notdir $(patsubst %/$(notdir $(2)),%,$(2))) \
150 --stringparam db2omf.omf_dir
"$(OMF_DIR)" \
151 --stringparam db2omf.help_dir
"$(HELP_DIR)" \
152 --stringparam db2omf.omf_in
"$(_DOC_OMF_IN)" \
153 $(if
$(_ENABLE_SK
), \
154 --stringparam db2omf.scrollkeeper_cl
"$(_skcontentslist)") \
158 ## The OMF input file
159 _DOC_OMF_IN
= $(if
$(DOC_MODULE
),$(wildcard $(_DOC_ABS_SRCDIR
)/$(DOC_MODULE
).omf.in
))
162 ## The OMF files for DocBook output
163 _DOC_OMF_DB
= $(if
$(_DOC_OMF_IN
), \
164 $(foreach lc
,C
$(_DOC_REAL_LINGUAS
),$(DOC_MODULE
)-$(lc
).omf
))
166 $(_DOC_OMF_DB
) : $(_DOC_OMF_IN
)
167 $(_DOC_OMF_DB
) : $(DOC_MODULE
)-%.omf
: %/$(DOC_MODULE
).xml
168 @
test "x$(_ENABLE_SK)" != "xtrue" -o
-f
"$(_skcontentslist)" ||
{ \
169 echo
"The file '$(_skcontentslist)' does not exist." >&2; \
170 echo
"Please check your ScrollKeeper installation." >&2; \
172 xsltproc
-o
$@
$(call db2omf_args
,$@
,$<,'docbook') ||
{ rm -f
"$@"; exit
1; }
175 ## The OMF files for HTML output
176 _DOC_OMF_HTML
= $(if
$(_DOC_OMF_IN
), \
177 $(foreach lc
,C
$(_DOC_REAL_LINGUAS
),$(DOC_MODULE
)-html-
$(lc
).omf
))
179 $(_DOC_OMF_HTML
) : $(_DOC_OMF_IN
)
180 $(_DOC_OMF_HTML
) : $(DOC_MODULE
)-html-
%.omf
: %/$(DOC_MODULE
).xml
182 @
test "x$(_ENABLE_SK)" != "xtrue" -o
-f
"$(_skcontentslist)" ||
{ \
183 echo
"The file '$(_skcontentslist)' does not exist" >&2; \
184 echo
"Please check your ScrollKeeper installation." >&2; \
187 xsltproc
-o
$@
$(call db2omf_args
,$@
,$<,'xhtml') ||
{ rm -f
"$@"; exit
1; }
190 ## All OMF output files to be built
193 $(if
$(filter docbook
,$(_DOC_REAL_FORMATS
)),$(_DOC_OMF_DB
)) \
194 $(if
$(filter html HTML
,$(_DOC_REAL_FORMATS
)),$(_DOC_OMF_HTML
))
200 ################################################################################
201 ## @@ C Locale Documents
204 ## The top-level documentation file in the C locale
205 _DOC_C_MODULE
= $(if
$(DOC_MODULE
),C
/$(DOC_MODULE
).xml
)
208 ## Files included with a SYSTEM entity in the C locale
209 _DOC_C_ENTITIES
= $(foreach ent
,$(DOC_ENTITIES
),C
/$(ent
))
211 ## @ _DOC_C_XINCLUDES
212 ## Files included with XInclude in the C locale
213 _DOC_C_INCLUDES
= $(foreach inc
,$(DOC_INCLUDES
),C
/$(inc
))
216 ## All documentation files in the C locale
218 $(_DOC_C_ENTITIES
) $(_DOC_C_INCLUDES
) \
221 ## @ _DOC_C_DOCS_NOENT
222 ## All documentation files in the C locale,
223 ## except files included with a SYSTEM entity
224 _DOC_C_DOCS_NOENT
= \
225 $(_DOC_C_MODULE
) $(_DOC_C_INCLUDES
)
228 ## All figures and other external data in the C locale
229 _DOC_C_FIGURES
= $(if
$(DOC_FIGURES
), \
230 $(foreach fig
,$(DOC_FIGURES
),C
/$(fig
)), \
231 $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/C
/figures
/*.png
)))
234 ## All HTML documentation in the C locale
235 # FIXME: probably have to shell escape to determine the file names
236 _DOC_C_HTML
= $(foreach f
, \
237 $(shell xsltproc
--xinclude \
238 --stringparam db.chunk.
basename "$(DOC_MODULE)" \
239 $(_chunks
) "C/$(DOC_MODULE).xml"), \
242 ###############################################################################
243 ## @@ Other Locale Documentation
246 ## The .po files used for translating the document
247 _DOC_POFILES
= $(if
$(DOC_MODULE
), \
248 $(foreach lc
,$(_DOC_REAL_LINGUAS
),$(lc
)/$(lc
).po
))
254 ## The top-level documentation files in all other locales
255 _DOC_LC_MODULES
= $(if
$(DOC_MODULE
), \
256 $(foreach lc
,$(_DOC_REAL_LINGUAS
),$(lc
)/$(DOC_MODULE
).xml
))
258 ## @ _DOC_LC_XINCLUDES
259 ## Files included with XInclude in all other locales
261 $(foreach lc
,$(_DOC_REAL_LINGUAS
),$(foreach inc
,$(_DOC_C_INCLUDES
), \
262 $(lc
)/$(notdir $(inc
)) ))
265 ## All HTML documentation in all other locales
266 # FIXME: probably have to shell escape to determine the file names
268 $(foreach lc
,$(_DOC_REAL_LINGUAS
),$(foreach doc
,$(_DOC_C_HTML
), \
269 $(lc
)/$(notdir $(doc
)) ))
272 ## All documentation files in all other locales
274 $(_DOC_LC_MODULES
) $(_DOC_LC_INCLUDES
) \
275 $(if
$(filter html HTML
,$(_DOC_REAL_FORMATS
)),$(_DOC_LC_HTML
))
278 ## All figures and other external data in all other locales
279 _DOC_LC_FIGURES
= $(foreach lc
,$(_DOC_REAL_LINGUAS
), \
280 $(patsubst C
/%,$(lc
)/%,$(_DOC_C_FIGURES
)) )
283 $(foreach fig
,$(_DOC_C_FIGURES
), $(foreach lc
,C
$(_DOC_REAL_LINGUAS
), \
284 $(wildcard $(srcdir)/$(lc
)/$(patsubst C
/%,%,$(fig
))) ))
287 @if
! test -d
$(dir $@
); then \
288 echo
"mkdir $(dir $@)"; \
291 @if
test ! -f
$@
-a
-f
$(srcdir)/$@
; then \
292 echo
"cp $(srcdir)/$@ $@"; \
293 cp
"$(srcdir)/$@" "$@"; \
296 list
='$(_DOC_C_DOCS_NOENT)'; for doc in
$$list; do \
297 docs
="$$docs $(_DOC_ABS_SRCDIR)/$$doc"; \
299 if
! test -f
$@
; then \
300 echo
"(cd $(dir $@) && \
301 $(_xml2po) -e $$docs > $(notdir $@).tmp && \
302 cp $(notdir $@).tmp $(notdir $@) && rm -f $(notdir $@).tmp)"; \
304 $(_xml2po
) -e
$$docs > $(notdir $@
).tmp
&& \
305 cp
$(notdir $@
).tmp
$(notdir $@
) && rm -f
$(notdir $@
).tmp
); \
307 echo
"(cd $(dir $@) && \
308 $(_xml2po) -e -u $(notdir $@) $$docs)"; \
310 $(_xml2po
) -e
-u
$(notdir $@
) $$docs); \
313 # FIXME: fix the dependancy
314 # FIXME: hook xml2po up
315 $(_DOC_LC_DOCS
) : $(_DOC_POFILES
)
316 $(_DOC_LC_DOCS
) : $(_DOC_C_DOCS
)
317 if
! test -d
$(dir $@
); then mkdir
$(dir $@
); fi
318 if
[ -f
"C/$(notdir $@)" ]; then d
="../"; else d
="$(_DOC_ABS_SRCDIR)/"; fi
; \
321 "$${d}$(dir $@)$(patsubst %/$(notdir $@),%,$@).po" \
322 "$${d}C/$(notdir $@)" > $(notdir $@
).tmp
&& \
323 cp
$(notdir $@
).tmp
$(notdir $@
) && rm -f
$(notdir $@
).tmp
)
327 _DOC_POT
= $(if
$(DOC_MODULE
),$(DOC_MODULE
).pot
)
330 $(_DOC_POT
): $(_DOC_C_DOCS_NOENT
)
331 $(_xml2po
) -e
-o
$@
$^
334 ################################################################################
335 ## @@ All Documentation
338 ## All HTML documentation, only if it's built
339 _DOC_HTML_ALL
= $(if
$(filter html HTML
,$(_DOC_REAL_FORMATS
)), \
340 $(_DOC_C_HTML
) $(_DOC_LC_HTML
))
342 _DOC_HTML_TOPS
= $(foreach lc
,C
$(_DOC_REAL_LINGUAS
),$(lc
)/$(DOC_MODULE
).xhtml
)
344 $(_DOC_HTML_TOPS
): $(_DOC_C_DOCS
) $(_DOC_LC_DOCS
)
345 xsltproc
-o
$@
--xinclude
--param db.chunk.chunk_top
"false()" --stringparam db.chunk.
basename "$(DOC_MODULE)" --stringparam db.chunk.extension
".xhtml" $(_db2html
) $(patsubst %.xhtml
,%.xml
,$@
)
348 ################################################################################
351 $(_DOC_C_DOCS
) $(_DOC_LC_DOCS
) \
352 $(_DOC_OMF_ALL
) $(_DOC_DSK_ALL
) \
353 $(_DOC_HTML_ALL
) $(_DOC_POFILES
)
356 .PHONY
: clean-doc-omf clean-doc-dsk clean-doc-lc clean-doc-dir
358 clean-doc-omf
: ; rm -f
$(_DOC_OMF_DB
) $(_DOC_OMF_HTML
)
359 clean-doc-dsk
: ; rm -f
$(_DOC_DSK_DB
) $(_DOC_DSK_HTML
)
361 rm -f
$(_DOC_LC_DOCS
)
362 @list
='$(_DOC_POFILES)'; for po in
$$list; do \
363 if
! test "$$po" -ef
"$(srcdir)/$$po"; then \
368 @for lc in C
$(_DOC_REAL_LINGUAS
); do \
369 if
test -f
"$$lc/.xml2po.mo"; then \
370 echo
"rm -f $$lc/.xml2po.mo"; \
371 rm -f
"$$lc/.xml2po.mo"; \
375 @for lc in C
$(_DOC_REAL_LINGUAS
); do \
376 for
dir in
`find $$lc -depth -type d`; do \
377 if
! test $$dir -ef
$(srcdir)/$$dir; then \
378 echo
"rmdir $$dir"; \
384 _clean_omf
= $(if
$(_DOC_OMF_IN
),clean-doc-omf
)
385 _clean_dsk
= $(if
$(_DOC_DSK_IN
),clean-doc-dsk
)
386 _clean_lc
= $(if
$(_DOC_REAL_LINGUAS
),clean-doc-lc
)
387 _clean_dir
= $(if
$(DOC_MODULE
),clean-doc-dir
)
390 $(_clean_omf
) $(_clean_dsk
) \
391 $(_clean_lc
) $(_clean_dir
)
393 $(_clean_omf
) $(_clean_dsk
) \
394 $(_clean_lc
) $(_clean_dir
)
396 $(_clean_omf
) $(_clean_dsk
) \
397 $(_clean_lc
) $(_clean_dir
)
398 maintainer-clean-local
: \
399 $(_clean_omf
) $(_clean_dsk
) \
400 $(_clean_lc
) $(_clean_dir
)
403 .PHONY
: dist-doc-docs dist-doc-figs dist-doc-omf dist-doc-dsk
405 $(if
$(DOC_MODULE
),dist-doc-docs
) \
406 $(if
$(_DOC_C_FIGURES
),dist-doc-figs
) \
407 $(if
$(_DOC_OMF_IN
),dist-doc-omf
)
408 # $(if $(_DOC_DSK_IN),dist-doc-dsk)
410 dist-doc-docs
: $(_DOC_C_DOCS
) $(_DOC_LC_DOCS
) $(_DOC_POFILES
)
411 @for lc in C
$(_DOC_REAL_LINGUAS
); do \
412 echo
" $(mkinstalldirs) $(distdir)/$$lc"; \
413 $(mkinstalldirs
) "$(distdir)/$$lc"; \
415 @list
='$(_DOC_C_DOCS) $(_DOC_LC_DOCS) $(_DOC_POFILES)'; \
416 for doc in
$$list; do \
417 if
test -f
"$$doc"; then d
=; else d
="$(srcdir)/"; fi
; \
418 docdir
=`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
419 if
! test -d
"$(distdir)/$$docdir"; then \
420 echo
"$(mkinstalldirs) $(distdir)/$$docdir"; \
421 $(mkinstalldirs
) "$(distdir)/$$docdir"; \
423 echo
"$(INSTALL_DATA) $$d$$doc $(distdir)/$$doc"; \
424 $(INSTALL_DATA
) "$$d$$doc" "$(distdir)/$$doc"; \
427 dist-doc-figs
: $(_DOC_SRC_FIGURES
)
428 @list
='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; \
429 for fig in
$$list; do \
430 if
test -f
"$$fig"; then d
=; else d
="$(srcdir)/"; fi
; \
431 if
test -f
"$$d$$fig"; then \
432 figdir
=`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
433 if
! test -d
"$(distdir)/$$figdir"; then \
434 echo
"$(mkinstalldirs) $(distdir)/$$figdir"; \
435 $(mkinstalldirs
) "$(distdir)/$$figdir"; \
437 echo
"$(INSTALL_DATA) $$d$$fig $(distdir)/$$fig"; \
438 $(INSTALL_DATA
) "$$d$$fig" "$(distdir)/$$fig"; \
443 @if
test -f
"$(_DOC_OMF_IN)"; then d
=; else d
="$(srcdir)/"; fi
; \
444 echo
"$(INSTALL_DATA) $$d$(_DOC_OMF_IN) $(distdir)/$(notdir $(_DOC_OMF_IN))"; \
445 $(INSTALL_DATA
) "$$d$(_DOC_OMF_IN)" "$(distdir)/$(notdir $(_DOC_OMF_IN))"
448 @if
test -f
"$(_DOC_DSK_IN)"; then d
=; else d
="$(srcdir)/"; fi
; \
449 echo
"$(INSTALL_DATA) $$d$(_DOC_DSK_IN) $(distdir)/$(notdir $(_DOC_DSK_IN))"; \
450 $(INSTALL_DATA
) "$$d$(_DOC_DSK_IN)" "$(distdir)/$(notdir $(_DOC_DSK_IN))"
453 .PHONY
: check-doc-docs check-doc-omf
455 $(if
$(DOC_MODULE
),check-doc-docs
) \
456 $(if
$(_DOC_OMF_IN
),check-doc-omf
)
458 check-doc-docs
: $(_DOC_C_DOCS
) $(_DOC_LC_DOCS
)
459 @for lc in C
$(_DOC_REAL_LINGUAS
); do \
465 xmlpath
="$$lc:$(srcdir)/$$lc"; \
467 echo
"xmllint --noout --noent --path $$xmlpath --xinclude --postvalid $$d$$lc/$(DOC_MODULE).xml"; \
468 xmllint
--noout
--noent
--path
"$$xmlpath" --xinclude
--postvalid
"$$d$$lc/$(DOC_MODULE).xml"; \
471 check-doc-omf
: $(_DOC_OMF_ALL
)
472 @list
='$(_DOC_OMF_ALL)'; for omf in
$$list; do \
473 echo
"xmllint --noout --xinclude --dtdvalid 'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf"; \
474 xmllint
--noout
--xinclude
--dtdvalid
'http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd' $$omf; \
478 .PHONY
: install-doc-docs install-doc-html install-doc-figs install-doc-omf install-doc-dsk
479 install-data-local
: \
480 $(if
$(DOC_MODULE
),install-doc-docs
) \
481 $(if
$(_DOC_HTML_ALL
),install-doc-html
) \
482 $(if
$(_DOC_C_FIGURES
),install-doc-figs
) \
483 $(if
$(_DOC_OMF_IN
),install-doc-omf
)
484 # $(if $(_DOC_DSK_IN),install-doc-dsk)
487 @for lc in C
$(_DOC_REAL_LINGUAS
); do \
488 echo
"$(mkinstalldirs) $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$lc"; \
489 $(mkinstalldirs
) $(DESTDIR
)$(HELP_DIR
)/$(DOC_MODULE
)/$$lc; \
491 @list
='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in
$$list; do \
492 if
test -f
"$$doc"; then d
=; else d
="$(srcdir)/"; fi
; \
493 docdir
="$$lc/"`echo $$doc | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
494 docdir
="$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$docdir"; \
495 if
! test -d
"$$docdir"; then \
496 echo
"$(mkinstalldirs) $$docdir"; \
497 $(mkinstalldirs
) "$$docdir"; \
499 echo
"$(INSTALL_DATA) $$d$$doc $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \
500 $(INSTALL_DATA
) $$d$$doc $(DESTDIR
)$(HELP_DIR
)/$(DOC_MODULE
)/$$doc; \
504 @list
='$(patsubst C/%,%,$(_DOC_C_FIGURES))'; for fig in
$$list; do \
505 for lc in C
$(_DOC_REAL_LINGUAS
); do \
507 if
test -f
"$$lc/$$fig"; then \
508 figfile
="$$lc/$$fig"; \
509 elif
test -f
"$(srcdir)/$$lc/$$fig"; then \
510 figfile
="$(srcdir)/$$lc/$$fig"; \
514 figdir
="$$lc/"`echo $$fig | sed -e 's/^\(.*\/\).*/\1/' -e '/\//!s/.*//'`; \
515 figdir
="$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$figdir"; \
516 if
! test -d
"$$figdir"; then \
517 echo
"$(mkinstalldirs) $$figdir"; \
518 $(mkinstalldirs
) "$$figdir"; \
520 figbase
=`echo $$fig | sed -e 's/^.*\///'`; \
521 if
$$figsymlink; then \
522 echo
"cd $$figdir && $(LN_S) -f ../../C/$$fig $$figbase"; \
523 ( cd
"$$figdir" && $(LN_S
) -f
"../../C/$$fig" "$$figbase" ); \
525 echo
"$(INSTALL_DATA) $$figfile $$figdir$$figbase"; \
526 $(INSTALL_DATA
) "$$figfile" "$$figdir$$figbase"; \
535 $(mkinstalldirs
) $(DESTDIR
)$(OMF_DIR
)/$(DOC_MODULE
)
536 @list
='$(_DOC_OMF_ALL)'; for omf in
$$list; do \
537 echo
"$(INSTALL_DATA) $$omf $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
538 $(INSTALL_DATA
) $$omf $(DESTDIR
)$(OMF_DIR
)/$(DOC_MODULE
)/$$omf; \
540 @if
test "x$(_ENABLE_SK)" = "xtrue"; then \
541 echo
"scrollkeeper-update -p $(DESTDIR)$(_sklocalstatedir) -o $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \
542 scrollkeeper-update
-p
"$(DESTDIR)$(_sklocalstatedir)" -o
"$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)"; \
549 .PHONY
: uninstall-doc-docs uninstall-doc-html uninstall-doc-figs uninstall-doc-omf uninstall-doc-dsk
551 $(if
$(DOC_MODULE
),uninstall-doc-docs
) \
552 $(if
$(_DOC_HTML_ALL
),uninstall-doc-html
) \
553 $(if
$(_DOC_C_FIGURES
),uninstall-doc-figs
) \
554 $(if
$(_DOC_OMF_IN
),uninstall-doc-omf
)
555 # $(if $(_DOC_DSK_IN),uninstall-doc-dsk)
558 @list
='$(_DOC_C_DOCS) $(_DOC_LC_DOCS)'; for doc in
$$list; do \
559 echo
" rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \
560 rm -f
"$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$doc"; \
564 @list
='$(_DOC_C_FIGURES) $(_DOC_LC_FIGURES)'; for fig in
$$list; do \
565 echo
"rm -f $(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \
566 rm -f
"$(DESTDIR)$(HELP_DIR)/$(DOC_MODULE)/$$fig"; \
570 @list
='$(_DOC_OMF_ALL)'; for omf in
$$list; do \
571 if
test "x$(_ENABLE_SK)" = "xtrue"; then \
572 echo
"scrollkeeper-uninstall -p $(_sklocalstatedir) $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
573 scrollkeeper-uninstall
-p
"$(_sklocalstatedir)" "$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
575 echo
"rm -f $(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \
576 rm -f
"$(DESTDIR)$(OMF_DIR)/$(DOC_MODULE)/$$omf"; \