Update paths for doxygen
[geany-mirror.git] / doc / Makefile.am
blob83772a319d772d1277bd20cb8c0ed19f15b26dbd
1 man_MANS=geany.1
3 if INSTALL_HTML_DOCS
4 htmldocimagesdir = $(docdir)/html/images
5 dist_htmldocimages_DATA = \
6         images/build_menu_commands_dialog.png \
7         images/find_dialog.png \
8         images/find_in_files_dialog.png \
9         images/main_window.png \
10         images/pref_dialog_edit_completions.png \
11         images/pref_dialog_edit_display.png \
12         images/pref_dialog_edit_features.png \
13         images/pref_dialog_edit_indentation.png \
14         images/pref_dialog_files.png \
15         images/pref_dialog_gen_misc.png \
16         images/pref_dialog_gen_startup.png \
17         images/pref_dialog_interface_interface.png \
18         images/pref_dialog_interface_notebook.png \
19         images/pref_dialog_interface_toolbar.png \
20         images/pref_dialog_keys.png \
21         images/pref_dialog_printing.png \
22         images/pref_dialog_templ.png \
23         images/pref_dialog_tools.png \
24         images/pref_dialog_various.png \
25         images/pref_dialog_vte.png \
26         images/replace_dialog.png
27 endif
29 doc_DATA = \
30         $(top_srcdir)/AUTHORS \
31         $(top_srcdir)/ChangeLog \
32         $(top_srcdir)/COPYING \
33         $(top_srcdir)/NEWS \
34         $(top_srcdir)/README \
35         $(top_srcdir)/THANKS \
36         $(top_srcdir)/TODO
38 DOCDIR = $(DESTDIR)$(docdir)
40 EXTRA_DIST = \
41         geany.html \
42         geany.css \
43         geany.txt \
44         geany.1 \
45         makefile.win32
47 # HTML user manual and hacking file
48 if WITH_RST2HTML
50 geany.html: $(srcdir)/geany.css $(srcdir)/geany.txt
51         $(AM_V_GEN)$(RST2HTML) -stg --stylesheet=$(srcdir)/geany.css $(srcdir)/geany.txt $@
53 hacking.html: $(srcdir)/geany.css $(top_srcdir)/HACKING
54         $(AM_V_GEN)$(RST2HTML) -stg --stylesheet=$(srcdir)/geany.css $(top_srcdir)/HACKING $@
56 all-local: geany.html hacking.html
58 # clean on 'maintainer-clean' rather than 'clean' in case it was not
59 # built by Make but rather part of the distribution.  This is fine even
60 # then, as configure will properly require what is needed to build it
61 # again if it is missing.
62 maintainer-clean-local: maintainer-clean-html-local
63 maintainer-clean-html-local:
64         -rm -f geany.html
66 clean-local: clean-html-local
67 clean-html-local:
68         -rm -f hacking.html
70 endif
72 # PDF user manual
73 if WITH_RST2PDF
75 geany-$(VERSION).pdf: geany.txt
76         $(AM_V_GEN)$(RST2PDF) $(srcdir)/geany.txt -o $@
78 all-local: geany-$(VERSION).pdf
80 clean-local: clean-pdf-local
81 clean-pdf-local:
82         -rm -f geany-$(VERSION).pdf
84 endif
86 # API Documentation
87 if WITH_DOXYGEN
89 doxygen_sources = \
90         $(srcdir)/plugins.dox \
91         $(srcdir)/pluginsignals.c \
92         $(srcdir)/pluginsymbols.c \
93         $(srcdir)/stash-example.c \
94         $(srcdir)/stash-gui-example.c
96 EXTRA_DIST += $(doxygen_sources)
98 doxygen_dependencies = \
99         $(doxygen_sources) \
100         $(top_srcdir)/src/*.[ch] \
101         $(top_srcdir)/plugins/geanyplugin.h \
102         $(top_srcdir)/src/tagmanager/tm_source_file.[ch] \
103         $(top_srcdir)/src/tagmanager/tm_workspace.[ch] \
104         $(top_srcdir)/src/tagmanager/tm_tag.h \
105         $(top_srcdir)/src/tagmanager/tm_parser.h
107 Doxyfile.stamp: Doxyfile $(doxygen_dependencies)
108         $(AM_V_GEN)$(DOXYGEN) Doxyfile && echo "" > $@
110 ALL_LOCAL_TARGETS = Doxyfile.stamp
111 CLEAN_LOCAL_TARGETS = clean-api-docs-local
113 clean-api-docs-local:
114         -rm -rf reference/ Doxyfile.stamp doxygen_*
116 if ENABLE_GTKDOC_HEADER
118 # set WARN_IF_UNDOCUMENTED because apparently doxygens warns for undocumented stuff
119 # in headers (even though it's correctly documented in the corresponding .c file) only
120 # for xml output
121 Doxyfile-gi: Doxyfile
122         $(AM_V_GEN)$(SED) \
123                 -e 's,gironly=@internal,gironly=,' \
124                 -e 's,^\(GENERATE_HTML.*\)YES,\1NO,' \
125                 -e 's,^\(GENERATE_XML.*\)NO,\1YES,' \
126                 -e 's,^\(WARN_IF_UNDOCUMENTED.*\)YES,\1NO,' \
127                 -e 's,^\(SORT_MEMBER_DOCS.*\)YES,\1NO,' \
128                 -e 's,^\(SORT_BRIEF_DOCS.*\)YES,\1NO,' \
129                 $< > $@ || { $(RM) $@ && exit 1; }
131 # we depend on Doxyfile.stamp not have this run in parallel with it to avoid
132 # concurrent Doxygen runs, which might overwrite each other's files
133 Doxyfile-gi.stamp: Doxyfile-gi Doxyfile.stamp $(doxygen_dependencies)
134         $(AM_V_GEN)$(DOXYGEN) Doxyfile-gi && echo "" > $@
136 geany-gtkdoc.h: Doxyfile-gi.stamp $(top_srcdir)/scripts/gen-api-gtkdoc.py
137         $(AM_V_GEN)$(top_srcdir)/scripts/gen-api-gtkdoc.py xml -d $(builddir) -o $@ \
138                         --sci-output geany-sciwrappers-gtkdoc.h
140 geany-sciwrappers-gtkdoc.h: geany-gtkdoc.h
142 geany_gtkdocincludedir = $(includedir)/geany/gtkdoc
143 nodist_geany_gtkdocinclude_HEADERS = geany-gtkdoc.h geany-sciwrappers-gtkdoc.h
145 ALL_LOCAL_TARGETS += geany-gtkdoc.h geany-sciwrappers-gtkdoc.h
146 CLEAN_LOCAL_TARGETS += clean-gtkdoc-header-local
148 clean-gtkdoc-header-local:
149         -rm -rf xml/ Doxyfile-gi Doxyfile-gi.stamp geany-gtkdoc.h geany-sciwrappers-gtkdoc.h
151 endif
153 all-local: $(ALL_LOCAL_TARGETS)
154 clean-local: $(CLEAN_LOCAL_TARGETS)
156 endif
158 uninstall-local:
159         rm -f $(DOCDIR)/html/index.html
160         rm -f $(DOCDIR)/manual.txt
161         rm -f $(DOCDIR)/ScintillaLicense.txt
163 # manually install some files under another name
164 install-data-local:
165 if INSTALL_HTML_DOCS
166         $(mkinstalldirs) $(DOCDIR)/html
167 #       as we don't install with the automated mechanism so we can rename the file,
168 #       we need to find the source file in the right location (either builddir or srcdir)
169         dir=$(builddir); test -f "$$dir/geany.html" || dir=$(srcdir); \
170         $(INSTALL_DATA) "$$dir/geany.html" $(DOCDIR)/html/index.html
171 endif
172         $(mkinstalldirs) $(DOCDIR)
173         $(INSTALL_DATA) $(srcdir)/geany.txt $(DOCDIR)/manual.txt
174         $(INSTALL_DATA) $(top_srcdir)/scintilla/License.txt $(DOCDIR)/ScintillaLicense.txt