1 ## Process this fillocatee with automake to generate Makefile.in
3 # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 # Building a PDF using Apache FOP only works with fop-0.20.5 for now.
21 htmldir = ${prefix}/share/doc/gnash
22 infodir = ${prefix}/share/info
23 man1dir = ${mandir}/man1
28 docdir = $(datadir)/$(PACKAGE)/doc/$(docname)/$(lang)
29 omf_dest_dir=$(datadir)/omf/$(PACKAGE)
30 scrollkeeper_localstate_dir = $(localstatedir)/scrollkeeper
32 # These are the top level files for each manual.
37 # These are the files needed to build the Gnash user
49 usermanual/installation.xml \
50 usermanual/revisions.xml \
51 usermanual/usage.xml \
52 usermanual/glossary.xml \
53 usermanual/specification.xml \
54 usermanual/gnashrc.xml \
55 usermanual/acknowledgments.xml \
56 usermanual/conventions.xml
58 # These are the files needed to build the Gnash reference
62 refmanual/as_value.xml \
63 refmanual/building.xml \
64 refmanual/code_dependencies.xml \
65 refmanual/codestyle.xml \
66 refmanual/configuration.xml \
67 refmanual/cross_compiling.xml \
68 refmanual/custompath_configuration.xml \
69 refmanual/documentation_dependencies.xml \
70 refmanual/feature_configuration.xml \
71 refmanual/install.xml \
72 refmanual/internals.xml \
73 refmanual/logging.xml \
74 refmanual/memory.xml \
75 refmanual/new_as_class.xml \
76 refmanual/object.xml \
77 refmanual/plugin.xml \
78 refmanual/revisions.xml \
80 refmanual/sources.xml \
81 refmanual/testing_dependencies.xml \
82 refmanual/extensions/extensions.xml \
83 refmanual/extensions/fileext.xml \
84 refmanual/extensions/gtkext.xml \
85 refmanual/extensions/mysqlext.xml
93 preformatted/gnashuser.html.in \
94 preformatted/gprocessor.1.in \
95 preformatted/cygnal.1.in \
96 preformatted/gnash.1.in \
97 preformatted/gnash_ref.info.in \
98 preformatted/soldumper.1.in \
99 preformatted/flvdumper.1.in \
100 preformatted/gnashref.html.in \
101 preformatted/gnash_user.info.in \
102 preformatted/rtmpget.1.in \
103 preformatted/findmicrophones.1.in \
104 preformatted/findwebcams.1.in \
105 preformatted/gtk-gnash.1.in \
106 preformatted/kde4-gnash.1.in
107 # preformatted/dumpshm.1.in
109 #noinst_SCRIPT = gen-doc.sh
110 # We list the texi and info pages twice, as differing versions of the
111 # docbook-utils transform the name at different steps in the process.
112 # This is an easy way to handle it either way, since we only need it as
125 MANSRC = $(MANPAGES:.1=.man-xml)
126 INFOS = gnash_user.info gnash_ref.info
127 HTMLS = $(XML_MAIN:.xml=.html)
128 PDFS = $(XML_MAIN:.xml=.pdf)
129 TEXIS = gnash_user.texi gnashuser.texi gnash_ref.texi gnashref.texi
131 all-local: info html man link-extra-man
133 gnashuser.html gnashuser.pdf gnash_user.info: gnashuser.xml $(USERMAN) $(COMMON)
134 gnashref.html gnashref.pdf gnash_ref.info: gnashref.xml $(REFMAN) $(COMMON)
136 # Convienience rules for developers of these manuals. By default
137 # all output formats are built if the Docbook tools are installed
138 # and working correctly.
148 # Gnash uses suffix rules to build all the various supported
149 # output formats. This section contains all the code that does
150 # the document convesion from docbook to whatever. Note that
151 # all of these are conditional, as the tools may not be
152 # installed on all systems, and on some systems, getting a fully
153 # working Docbook tools system can problematic. In this case
154 # preformatted versions are in the top level packaging/doc
155 # directory, so we just link to them so they can be installed.
156 # While it's a bit of a pain in the neck for developers to
157 # keep the preformatted versions up to date, it's much easier
158 # for end users because the documentation in xml, html, and info
159 # formats is always available.
161 SUFFIXES = .xml .html .texi .pdf .info .1 .fo .man-xml .in
165 -$(FOP) -xsl $(docbook_styles)/fo/docbook.xsl -xml $< -pdf $@
169 $(XSLTPROC) --output $@ --nonet $(docbook_styles)/fo/docbook.xsl $<
172 $(PDFXMLTEX) -interaction=nonstopmode $<
182 -$(XSLTPROC) --output $@ --nonet $(docbook_styles)/html/docbook.xsl $<
185 @if test -d $(srcdir)/preformatted; then \
186 echo "WARNING: Linking to preformatted version of $@, it could be out of date."; \
187 $(LN_S) -f $(srcdir)/preformatted/$@.in ./$@; \
193 # The first test seems to be the default for Fedora/Redhat/Centos based distributions,
194 # which use a wrapper script for jade.
195 # Ubuntu/Debian uses a real perl script that actually does the real work
198 -if test x$(DB2X_TEXI) != x; then \
199 out=`echo $* | sed -e 's:gnash:gnash_:'`; \
200 $(DB2X_TEXI) --encoding=us-ascii//TRANSLIT --string-param directory-description="Gnash" --string-param output-file=$${out} $<; \
201 $(MAKEINFO) --force $${out}.texi; \
204 $(DB2X_XSLTPROC) -s texi $< --output $${basefile}.txml; \
205 $(DB2X_TEXIXML) --info --encoding=us-ascii//TRANSLIT $${basefile}.txml ; \
206 rm $${basefile}.txml; \
212 -$(MAKEINFO) --force $<
219 -if test x$(DB2X_MAN) != x; then \
222 $(DB2X_XSLTPROC) -s man $? -o $*.mxml; \
223 $(DB2X_MANXML) --solinks $*.mxml; \
227 @if test -d $(srcdir)/preformatted; then \
228 echo "WARNING: Linking to preformatted version of $@, it could be out of date."; \
229 $(LN_S) -f $(srcdir)/preformatted/$@.in ./$@; \
235 gnash.1: $(srcdir)/gnash.man-xml
236 gprocessor.1: $(srcdir)/gprocessor.man-xml
237 #dumpshm.1: $(srcdir)/dumpshm.man-xml
238 soldumper.1: $(srcdir)/soldumper.man-xml
239 flvdumper.1: $(srcdir)/flvdumper.man-xml
240 cygnal.1: $(srcdir)/cygnal.man-xml
241 findmicrophones.1: $(srcdir)/findmicrophones.man-xml
242 findwebcams.1: $(srcdir)/findwebcams.man-xml
245 gnash_user.info: gnashuser.texi
246 gnash_ref.info: gnashref.texi
247 gnashuser.texi gnash_user.texi: images gnashuser.xml
248 gnashref.texi gnash_ref.texi: gnashref.xml
250 gnash_user.info: gnashuser.xml
251 -@if test -d $(srcdir)/preformatted; then \
252 echo "WARNING: Linking to preformatted version of $@, it could be out of date."; \
253 $(LN_S) -f $(srcdir)/preformatted/gnash_user.info.in ./gnash_user.info; \
255 gnash_ref.info: gnashref.xml
256 -@if test -d $(srcdir)/preformatted; then \
257 echo "WARNING: Linking to preformatted version of $@, it could be out of date."; \
258 $(LN_S) -f $(srcdir)/preformatted/gnash_ref.info.in ./gnash_ref.info; \
260 gnashref.html: gnashref.xml
261 -@if test -d $(srcdir)/preformatted; then \
262 echo "WARNING: Linking to preformatted version of $@, it could be out of date."; \
263 $(LN_S) -f $(srcdir)/preformatted/gnashref.html.in ./gnashref.html; \
265 gnashuser.html: gnashref.xml
266 -@if test -d $(srcdir)/preformatted; then \
267 echo "WARNING: Linking to preformatted version of $@, it could be out of date."; \
268 $(LN_S) -f $(srcdir)/preformatted/gnashuser.html.in ./gnashuser.html; \
273 @xmllint $(srcdir)/gnashuser.xml
276 @xmllint $(srcdir)/gnashref.xml
278 # This target adds the images to the dist file, which is
279 # produced by the dist-bzip2, dist-gzip, or snapshot targets.
280 # distdir is a built in target for Automake.
282 test -d "$(distdir)/images" || $(mkinstalldirs) "$(distdir)/images"
283 -@for file in $(srcdir)/images/*.png $(srcdir)/images/*.txt; do \
284 basefile="`basename $${file}`"; \
285 if test ! -e $(distdir)/images/$${basefile}; then \
286 $(INSTALL_DATA) $$file $(distdir)/images/; \
290 # When we build in a seperate build tree, we need links to the images
291 # subdirectory to have them be included in the final output.
293 -@if test ! -e images; then \
294 $(LN_S) -f $(srcdir)/images images; \
298 # Installing documentation can be a complex process, as we build
299 # multiple output formats. This section contains all of the
300 # Makefile targets that are used to install or uninstall the
303 install-html-hook: $(HTMLS)
304 -@test -d "$(DESTDIR)$(htmldir)" || $(mkinstalldirs) "$(DESTDIR)$(htmldir)"
305 -$(INSTALL_DATA) gnashuser.html $(DESTDIR)$(htmldir)
306 -$(INSTALL_DATA) gnashref.html $(DESTDIR)$(htmldir)
307 @test -d "$(DESTDIR)$(htmldir)/images" || $(mkinstalldirs) "$(DESTDIR)$(htmldir)/images"
308 -for file in $(srcdir)/images/*.png; do \
309 basefile=`echo $$file | sed -e 's,^.*/,,'`; \
310 $(INSTALL_DATA) $$file $(DESTDIR)$(htmldir)/images/$$basefile; \
313 # There are two versions of install-info, with unfortunately different options.
314 # Rather than test the version at configure time, we do it at runtime instead
315 # so we can switch versions at installation time.
316 install-info-hook: $(INFOS)
318 -@test -d "$(DESTDIR)$(infodir)" || $(mkinstalldirs) "$(DESTDIR)$(infodir)"
319 -for i in *.info; do \
320 $(INSTALL_DATA) "$$i" $(DESTDIR)$(infodir)/"$$i"; \
322 type="`file $(INSTALL_INFO) | grep -ic "perl " 2>&1`"; \
323 if test $${type} -gt 0; then \
324 $(INSTALL_INFO) --menuentry="\"Gnash User Manual\"" --quiet --description="\"Gnash User Manual\"" --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gnash_user.info; \
325 $(INSTALL_INFO) --menuentry="\"Gnash Reference Manual\"" --quiet --description="\"Gnash Reference Manual\"" --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gnash_ref.info; \
327 $(INSTALL_INFO) --entry="\"Gnash User Manual: (gnash_user) Gnash User Manual\"" --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gnash_user.info; \
328 $(INSTALL_INFO) --entry="\"Gnash Reference Manual (gnash_ref) Gnash Reference Manual\"" --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gnash_ref.info; \
331 echo "Using preformtted output file,"
332 -$(LN_S) -f $(srcdir)/preformatted/gnash_user.info.in gnash_user.info
333 -$(LN_S) -f $(srcdir)/preformatted/gnash_ref.info.in gnash_ref.info
334 -$(INSTALL_INFO) --entry="\"Gnash User Manual: (gnash_user) Gnash User Manual\"" --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gnash_user.info
335 -$(INSTALL_INFO) --entry="\"Gnash Reference Manual (gnash_ref) Gnash Reference Manual\"" --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/gnash_ref.info
340 -$(INSTALL_INFO) --dir-file=$(DESTDIR)$(infodir)/dir --remove $(DESTDIR)$(infodir)/gnash_user.info
341 -$(INSTALL_INFO) --dir-file=$(DESTDIR)$(infodir)/dir --remove $(DESTDIR)$(infodir)/gnash_ref.info
343 -$(RM) $(DESTDIR)$(infodir)/gnash_user.info
344 -$(RM) $(DESTDIR)$(infodir)/gnash_ref.info
347 -$(RM) $(DESTDIR)$(htmldir)/gnashuser.html
348 -$(RM) $(DESTDIR)$(htmldir)/gnashref.html
349 -$(RM) $(DESTDIR)$(htmldir)/images/*png
352 -$(RM) $(DESTDIR)$(htmldir)/gnashuser.html
354 # install-data-hook: install-data-hook-omf
355 # uninstall-local: uninstall-local-doc uninstall-local-omf
357 # gtk-gnash.1 and kde4-gnash.1 are special, as they are created by
358 # the --solinks option to the docbook2 tools for creating man pages.
359 install-man1: $(MANPAGES)
360 -test -d "$(DESTDIR)$(man1dir)/" || $(mkinstalldirs) "$(DESTDIR)$(man1dir)/"
361 -$(INSTALL_DATA) gtk-gnash.1 $(DESTDIR)$(man1dir)/gtk-gnash.1
362 -$(INSTALL_DATA) kde4-gnash.1 $(DESTDIR)$(man1dir)/kde4-gnash.1
363 -for file in $(MANPAGES); do \
364 $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$file; \
368 -for file in $(MANPAGES); do \
369 $(RM) $(DESTDIR)$(man1dir)/$$file; \
372 # the gtk-gnash.1 and kde4-gnash.1 manpages are generated as aliases
373 # for the gnash.1 man page, so we can't use the suffix rules to build
374 # them, but we need to install the ".so gnash.1" manpages also, or
375 # they aren;t in the tarball.
377 -@if test ! -e gtk-gnash.1; then \
378 echo "WARNING: Linking to preformatted version of gtk-gnash.1, it could be out of date."; \
379 $(LN_S) -f $(srcdir)/preformatted/gtk-gnash.1.in gtk-gnash.1; \
381 -@if test ! -e kde4-gnash.1; then \
382 echo "WARNING: Linking to preformatted version of kde4-gnash.1, it could be out of date."; \
383 $(LN_S) -f $(srcdir)/preformatted/kde4-gnash.1.in kde4-gnash.1; \
386 install-data-hook: $(MANPAGES) install-man1 install-info-hook install-html-hook
387 uninstall-hook: uninstall-info-hook uninstall-html-hook
388 -$(RM) -f $(DESTDIR)$(man1dir)/*.1
391 # GNOME Help support, which currently isn't supported
392 # by the Gnash GTK GUI.
397 # INSTALL_DATA_HOOK += omf install-data-omf-hook
398 # UNINSTALL_HOOK += uninstall-omf-hook
403 omf_timestamp: $(omffile)
404 for file in $(omffile); do \
405 $(SCROLLINSTALL) $(docdir)/$(docname).xml $(srcdir)/$$file $$file.out; \
409 install-data-omf-hook:
410 $(mkinstalldirs) $(DESTDIR)$(omf_dest_dir)
411 for file in $(omffile); do \
412 $(INSTALL_DATA) $$file.out $(DESTDIR)$(omf_dest_dir)/$$file; \
414 -$(SCROLLUPDATE) -v -o $(DESTDIR)$(omf_dest_dir)
417 -for file in $(omffile); do \
418 $(RM) $(DESTDIR)$(omf_dest_dir)/$$file; \
420 -rmdir $(DESTDIR)$(omf_dest_dir)
443 # This updates the copies of the manuals that are stored preformatted
444 # so not everyone needs to get Docbook working well enough to produce
445 # the documentation. This should only be used by developers after
446 # making changes to a documentation source file.
449 -@for type in 1 html info; do \
450 for i in *.$${type}; do \
451 name=$${i/\.$${type}/.$${type}.in}; \
452 diff=`diff --brief $$i $(srcdir)/preformatted/$${name}`; \
453 if test ! x"$${diff}" = x; then \
454 echo "Updating the preformatted/$${name}"; \
455 cp $$i $(srcdir)/preformatted/$${name}; \
461 # Always execute these targets as they have no real dependencies.
462 .PHONY: images install-info-hook uninstall-info-hook install-html-hook uninstall-html-hook uninstall-data-hook install-data-hook images install-man1 update-preformats