Fix distcheck
[nautilus-actions.git] / doc / nact / Makefile.am
blob6ea849ae24d747376ee3868f020061e7e23ac2f1
1 # Nautilus Actions
2 # A Nautilus extension which offers configurable context menu actions.
4 # Copyright (C) 2005 The GNOME Foundation
5 # Copyright (C) 2006, 2007, 2008 Frederic Ruaudel and others (see AUTHORS)
6 # Copyright (C) 2009, 2010 Pierre Wieser and others (see AUTHORS)
8 # This Program is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License as
10 # published by the Free Software Foundation; either version 2 of
11 # the License, or (at your option) any later version.
13 # This Program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public
19 # License along with this Library; see the file COPYING.  If not,
20 # write to the Free Software Foundation, Inc., 59 Temple Place,
21 # Suite 330, Boston, MA 02111-1307, USA.
23 # Authors:
24 #   Frederic Ruaudel <grumz@grumz.net>
25 #   Rodrigo Moya <rodrigo@gnome-db.org>
26 #   Pierre Wieser <pwieser@trychlos.org>
27 #   ... and many others (see AUTHORS)
29 # from Migrating your documentation to gnome-doc-utils
30 # http://live.gnome.org/GnomeDocUtilsMigrationHowTo
32 # do not use the $(NULL) syntax here as this may prevent Damned-Lies
33 # to correctly generate POT files (cf. mail of Claude Paroz 2008-08-29)
35 # This produces the Nautilus-Actions Configuration Tool (NACT) Users's Manual.
36 # As a user's manual, it may be translated.
37 # Default is to produce DocBook XML documents, suitable for Yelp, the
38 # Gnome help system.
39 # --enable-html-manuals and --enable-pdf-manuals are configure options
40 # which produce HTML and PDF formats. These options are always enabled
41 # when making distcheck, so that all output formats for all known locales
42 # are always included in the distributed tarball.
44 include $(top_srcdir)/gnome-doc-utils.make
46 DOC_MODULE = nautilus-actions-config-tool
48 DOC_ENTITIES = \
49         appendix-gnu-fdl-1.3.xml                                                \
50         articleinfo.xml                                                                 \
51         legalnotice.xml                                                                 \
52         nact-bugs.xml                                                                   \
53         nact-conditions.xml                                                             \
54         nact-edit.xml                                                                   \
55         nact-execution.xml                                                              \
56         nact-export.xml                                                                 \
57         nact-import.xml                                                                 \
58         nact-menus.xml                                                                  \
59         nact-misc.xml                                                                   \
60         nact-prefs.xml                                                                  \
61         nact-profiles.xml                                                               \
62         nact-save.xml                                                                   \
63         nact-sorting.xml                                                                \
64         nact-starting.xml                                                               \
65         nact-where.xml
67 DOC_INCLUDES =
69 DOC_FIGURES = \
70         figures/add.png                                                                 \
71         figures/nact-action-tab.png                                             \
72         figures/nact-basenames-tab.png                                  \
73         figures/nact-capabilities-tab.png                               \
74         figures/nact-command-tab.png                                    \
75         figures/nact-desktop-environment-frame.png              \
76         figures/nact-environment-tab.png                                \
77         figures/nact-exec-mode-frame.png                                \
78         figures/nact-execute-as-frame.png                               \
79         figures/nact-execution-environment-frame.png    \
80         figures/nact-execution-tab.png                                  \
81         figures/nact-folders-tab.png                                    \
82         figures/nact-legend.png                                                 \
83         figures/nact-main-empty.png                                             \
84         figures/nact-mimetypes-tab.png                                  \
85         figures/nact-new-capability.png                                 \
86         figures/nact-new-scheme.png                                             \
87         figures/nact-preferences-export.png                             \
88         figures/nact-preferences-import.png                             \
89         figures/nact-preferences-io-providers.png               \
90         figures/nact-preferences-runtime.png                    \
91         figures/nact-preferences-schemes.png                    \
92         figures/nact-preferences-ui.png                                 \
93         figures/nact-properties-tab.png                                 \
94         figures/nact-schemes-tab.png                                    \
95         figures/nact-selection-count-frame.png                  \
96         figures/nact-startup-mode-frame.png                             \
97         figures/nact-target-location.png                                \
98         figures/nact-working-directory-frame.png                \
99         figures/read-only.png                                                   \
100         figures/remove.png                                                              \
101         figures/sort-asc.png                                                    \
102         figures/sort-buttons-frame.png                                  \
103         figures/sort-desc.png                                                   \
104         figures/sort-manual.png                                                 \
105         figures/start-context-menu.png                                  \
106         figures/start-context-menu-nautilus.png                 \
107         figures/start-zenity-result.png
109 DOC_LINGUAS = de es
111 # generate HTML and PDF NACT user's manual if 
112 # --enable-html-manuals and/or --enable-pdf-manuals have been set
113 # the generated docs are installed in pkgdocdir/doc/{html|pdf}/
115 # translations only have .po files (should also have figures/ subdirectory)
116 # so do not generate HTML/PDF documents for them
118 # an alternative for generating HTML manual is
119 # gnome-doc-tool html -o xhtml -d0 nautilus-actions-config-tool.xml
120 # which is part of gnome-doc-utils package
121 # - xhtml subdirectory has to be previously created
122 # - figures subdirectory has to be copied to xhtml/
123 # - there is (as of 2010-09-03) no icon for notes and tips
124 # the produced output is very close of what Yelp gives, with in particular
125 # summaries in each chapter while db2html does not produce them
127 # contrarily, gnome-doc-tool does not produce the legal and abstract
128 # in top of the document, while db2html does.
130 # both db2html and gnome-doc-tool do not honor external links;
131 # they are converted to simple links which target the same frame window
133 pkgdocdir = $(datarootdir)/doc/@PACKAGE@-@VERSION@
135 all-local: all-manuals
137 all-manuals: all-html-manuals all-pdf-manuals
139 install-data-local: install-manuals
141 install-manuals: install-html-manuals install-pdf-manuals
143 uninstall-local: uninstall-manuals
145 uninstall-manuals: uninstall-html-manuals uninstall-pdf-manuals
147 dist-hook: doc-dist-hook dist-html-manuals-hook dist-pdf-manuals-hook
149 if ENABLE_HTML_MANUALS
150 all-html-manuals: html.stamp
152 html.stamp: $(_DOC_C_DOCS) $(_DOC_C_FIGURES) $(_DOC_LC_DOCS) ChangeLog
153         @-for i in C $(_DOC_REAL_LINGUAS); do \
154                 rm -fr $$i/$(DOC_MODULE).junk; \
155                 if ! test -d $$i; then $(MKDIR_P) $$i; fi; \
156                 (cd $$i; \
157                  copied=0; \
158                  if test ! -f $(DOC_MODULE).xml; then cp -v $(abs_srcdir)/C/*.xml .; copied=1; fi; \
159                  if test "x$(WITH_DB2HTML)" = "xyes"; then \
160                         _htmlsubdir=$(DOC_MODULE); \
161                         echo "Generating $$i/$$_htmlsubdir/$(DOC_MODULE).html ..."; \
162                         db2html --nochunks $(DOC_MODULE).xml; \
163                  fi; \
164                  if test "x$(WITH_GDT)" = "xyes"; then \
165                         _htmlsubdir=xhtml; \
166                         echo "Generating $$i/$$_htmlsubdir/$(DOC_MODULE).html ..."; \
167                         if ! test -d $$_htmlsubdir; then $(MKDIR_P) $$_htmlsubdir; fi; \
168                         gnome-doc-tool html -o $$_htmlsubdir -d0 $(DOC_MODULE).xml; \
169                  fi; \
170                  if test -d $(abs_srcdir)/$$i/figures; then cp -rp $(abs_srcdir)/$$i/figures $$_htmlsubdir/; fi; \
171                  chmod -R u+w $$_htmlsubdir; \
172                  if test $$copied -eq 1; then rm -f *.xml; fi \
173                 ); \
174         done
175         touch html.stamp
177 # if --htmldir has not been specified, then we default to PKGDOCDIR/html
178 # in all case, we append the locale as a subdirectory level
180 # note that we do not honor here the --with-html-dir gtk-doc option,
181 # but the --htmldir autotools option
183 # as html have multiple files, we create a per-document subdirectory
184 install-html-manuals:
185         @-for _lc in C $(_DOC_REAL_LINGUAS); do \
186                 if test "$(htmldir)" = "$(docdir)"; then \
187                         _destdir=$(DESTDIR)$(pkgdocdir)/html/$$_lc/nact; \
188                 else \
189                         _destdir=$(DESTDIR)$(htmldir)/$$_lc/nact; \
190                 fi; \
191                 if ! test -d $$_destdir; then $(MKDIR_P) $$_destdir; fi; \
192                 if test "x$(WITH_DB2HTML)" = "xyes"; then _htmlsubdir=$(DOC_MODULE); fi; \
193                 if test "x$(WITH_GDT)" = "xyes"; then _htmlsubdir=xhtml; fi; \
194                 _srcdir=$(top_builddir)/doc/nact/$$_lc/$$_htmlsubdir; \
195                 find $$_srcdir -type f | while read _f; do \
196                         _dname=`dirname $$_f`; \
197                         _subdir=`echo "$$_dname" | sed "s|^$$_srcdir[/]*||"`; \
198                         if ! test -d "$$_destdir/$$_subdir"; then $(MKDIR_P) "$$_destdir/$$_subdir"; fi; \
199                         _bname=`basename "$$_f"`; \
200                         echo $(INSTALL_DATA) "$$_f" "$$_destdir/$$_subdir/$$_bname"; \
201                         $(INSTALL_DATA) "$$_f" "$$_destdir/$$_subdir/$$_bname"; \
202                 done; \
203         done
205 uninstall-html-manuals:
206         if test "$(htmldir)" = "$(docdir)"; then \
207                 _instdir=$(DESTDIR)$(pkgdocdir)/html; \
208         else \
209                 _instdir=$(DESTDIR)$(htmldir); \
210         fi; \
211         rm -fr $$_instdir
213 dist-html-manuals-hook:
214         for _lc in C $(_DOC_REAL_LINGUAS); do \
215                 $(MKDIR_P) $(distdir)/html/$$_lc; \
216                 if test "x$(WITH_DB2HTML)" = "xyes"; then _htmlsubdir=$(DOC_MODULE); fi; \
217                 if test "x$(WITH_GDT)" = "xyes"; then _htmlsubdir=xhtml; fi; \
218                 cp -r $(top_builddir)/doc/nact/$$_lc/$$_htmlsubdir/* $(distdir)/html/$$_lc/; \
219         done
220         find $(distdir)/html -type d -exec chmod 755 {} \;
221         find $(distdir)/html -type f -exec chmod 644 {} \;
222 else
223 all-html-manuals:
225 install-html-manuals:
227 uninstall-html-manuals:
229 dist-html-manuals-hook:
230 endif
232 if ENABLE_PDF_MANUALS
233 all-pdf-manuals: pdf.stamp
235 pdf.stamp: $(_DOC_C_DOCS) $(_DOC_C_FIGURES) $(_DOC_LC_DOCS) ChangeLog
236         @-for i in C $(_DOC_REAL_LINGUAS); do \
237                 _target=$$i/$(DOC_MODULE).pdf; \
238                 echo "Generating $$_target ..."; \
239                 if ! test -d $$i; then $(MKDIR_P) $$i; fi; \
240                 echo "dblatex --output $$_target $(top_srcdir)/doc/nact/$$i/$(DOC_MODULE).xml"; \
241                 dblatex --output $$_target $(top_srcdir)/doc/nact/$$i/$(DOC_MODULE).xml; \
242         done
243         touch pdf.stamp
245 # if --pdfdir has not been specified, then we default to PKGDOCDIR/pdf
246 # in all case, we append the locale as a subdirectory level
248 # as pdf are monobloc documents, we do not create a per-document subdir
249 install-pdf-manuals:
250         @-for _lc in C $(_DOC_REAL_LINGUAS); do \
251                 _srcdir=$(top_builddir)/doc/nact/$$_lc; \
252                 if test "$(pdfdir)" = "$(docdir)"; then \
253                         _destdir=$(DESTDIR)$(pkgdocdir)/pdf/$$_lc; \
254                 else \
255                         _destdir=$(DESTDIR)$(pdfdir)/$$_lc; \
256                 fi; \
257                 if ! test -d $$_destdir; then $(MKDIR_P) $$_destdir; fi; \
258                 echo $(INSTALL_DATA) "$$_srcdir/$(DOC_MODULE).pdf" "$$_destdir/$(DOC_MODULE).pdf"; \
259                 $(INSTALL_DATA) "$$_srcdir/$(DOC_MODULE).pdf" "$$_destdir/$(DOC_MODULE).pdf"; \
260         done
262 uninstall-pdf-manuals:
263         if test "$(pdfdir)" = "$(docdir)"; then \
264                 _instdir=$(DESTDIR)$(pkgdocdir)/pdf; \
265         else \
266                 _instdir=$(DESTDIR)$(pdfdir); \
267         fi; \
268         rm -fr $$_instdir
270 dist-pdf-manuals-hook:
271         for _lc in C $(_DOC_REAL_LINGUAS); do \
272                 $(MKDIR_P) $(distdir)/pdf/$$_lc; \
273                 cp $(top_builddir)/doc/nact/$$_lc/$(DOC_MODULE).pdf $(distdir)/pdf/$$_lc/; \
274         done
275         find $(distdir)/pdf -type d -exec chmod 755 {} \;
276         find $(distdir)/pdf -type f -exec chmod 644 {} \;
277 else
278 all-pdf-manuals:
280 install-pdf-manuals:
282 uninstall-pdf-manuals:
284 dist-pdf-manuals-hook:
285 endif
287 clean-local: clean-html-manuals clean-pdf-manuals
288         rm -f *~
289         rm -f *.stamp
291 distclean-local: clean-html-manuals clean-pdf-manuals
293 clean-html-manuals:
294         for lc in C $(_DOC_REAL_LINGUAS); do \
295                 rm -fr $$lc/$(DOC_MODULE); \
296                 rm -fr $$lc/$(DOC_MODULE).junk; \
297                 rm -fr $$lc/xhtml; \
298         done
300 clean-pdf-manuals:
301         for lc in C $(_DOC_REAL_LINGUAS); do \
302                 rm -f $$lc/*.pdf; \
303         done