[GTK] Generate API documentation for GObject DOM bindings
[WebKit-https.git] / Tools / gtk / GNUmakefile.am
1 EXTRA_DIST += \
2         Tools/gtk/common.py \
3         Tools/gtk/generate-feature-defines-files \
4         Tools/gtk/generate-gtkdoc \
5         Tools/gtk/generate-webkitdom-doc-files \
6         Tools/gtk/gtkdoc.py
7
8 docs: docs-build.stamp
9 .PHONY : docs
10 DISTCLEANFILES += docs-build.stamp
11
12 docs_build_stamp_list = \
13         Source/WebKit/gtk/docs/webkitenvironment.xml
14
15 if ENABLE_WEBKIT1
16 docs_build_stamp_list += \
17         libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
18         Source/WebKit/gtk/docs/webkitgtk-docs.sgml \
19         Source/WebKit/gtk/docs/webkitgtk-sections.txt
20 endif
21
22 if ENABLE_WEBKIT2
23 docs_build_stamp_list += \
24         libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
25         Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml \
26         Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt
27 endif
28
29 $(top_builddir)/DerivedSources/webkitdom/docs/webkitdomgtk-docs.sgml: $(gdom_symbol_files) $(srcdir)/Tools/gtk/generate-webkitdom-doc-files
30         $(AM_V_GEN)mkdir -p $(top_builddir)/DerivedSources/webkitdom/docs \
31         && echo $(gdom_symbol_files) | $(PYTHON) $(srcdir)/Tools/gtk/generate-webkitdom-doc-files docs > $@
32
33 $(top_builddir)/DerivedSources/webkitdom/docs/webkitdomgtk-sections.txt: $(gdom_symbol_files) $(srcdir)/Tools/gtk/generate-webkitdom-doc-files
34         $(AM_V_GEN)mkdir -p $(top_builddir)/DerivedSources/webkitdom/docs \
35         && echo $(gdom_symbol_files) | $(PYTHON) $(srcdir)/Tools/gtk/generate-webkitdom-doc-files sections > $@
36
37 BUILT_SOURCES += \
38         $(top_builddir)/DerivedSources/webkitdom/docs/webkitdomgtk-docs.sgml \
39         $(top_builddir)/DerivedSources/webkitdom/docs/webkitdomgtk-sections.txt
40
41 docs_build_stamp_list += \
42         libGObjectDOMBindings.la \
43         $(top_builddir)/DerivedSources/webkitdom/docs/webkitdomgtk-docs.sgml \
44         $(top_builddir)/DerivedSources/webkitdom/docs/webkitdomgtk-sections.txt
45
46 docs-build.stamp: $(docs_build_stamp_list)
47         CC=$(CC) $(srcdir)/Tools/gtk/generate-gtkdoc
48         @touch docs-build.stamp
49
50 clean-local: doc-clean-local
51 doc-clean-local:
52         @rm -f Documentation/webkitgtk/*~ Documentation/webkitgtk*.bak
53         @rm -f Documentation/webkit2gtk/*~ Documentation/webkit2gtk*.bak
54         @rm -f Documentation/webkitdomgtk/*~ Documentation/webkitdomgtk*.bak
55
56 distclean-local: doc-distclean-local
57 doc-distclean-local:
58         @rm -rf Documentation
59 maintainer-clean-local: doc-maintainer-clean-local
60 doc-maintainer-clean-local: clean
61         @rm -rf Documentation/webkitgtk Documentation/webkit2gtk Documentation/webkitdomgtk
62         -@rmdir Documentation
63
64 install-data-local:
65 if ENABLE_WEBKIT1
66         @installfiles=`echo ./Documentation/webkitgtk/html/*`; \
67         if test "$$installfiles" = './Documentation/webkitgtk/html/*'; \
68         then echo 1>&2 'No documentation to install' ; \
69         else \
70           DOC_MODULE_VERSION=`cat ./Documentation/webkitgtk/version.xml`; \
71           if test -n "$(DOC_MODULE_VERSION)"; then \
72             installdir="$(DESTDIR)$(HTML_DIR)/webkitgtk-$(DOC_MODULE_VERSION)"; \
73           else \
74             installdir="$(DESTDIR)$(HTML_DIR)/webkitgtk"; \
75           fi; \
76           $(mkinstalldirs) $${installdir} ; \
77           for i in $$installfiles; do \
78             echo ' $(INSTALL_DATA) '$$i ; \
79             $(INSTALL_DATA) $$i $${installdir}; \
80           done; \
81           if test -n "$(DOC_MODULE_VERSION)"; then \
82             mv -f $${installdir}/webkitgtk.devhelp2 \
83               $${installdir}/webkitgtk-$(DOC_MODULE_VERSION).devhelp2; \
84           fi; \
85         fi
86 endif
87 if ENABLE_WEBKIT2
88         @installfiles=`echo ./Documentation/webkit2gtk/html/*`; \
89         if test "$$installfiles" = './Documentation/webkit2gtk/html/*'; \
90         then echo 1>&2 'No documentation to install' ; \
91         else \
92           DOC_MODULE_VERSION=`cat ./Documentation/webkit2gtk/version.xml`; \
93           if test -n "$(DOC_MODULE_VERSION)"; then \
94             installdir="$(DESTDIR)$(HTML_DIR)/webkit2gtk-$(DOC_MODULE_VERSION)"; \
95           else \
96             installdir="$(DESTDIR)$(HTML_DIR)/webkit2gtk"; \
97           fi; \
98           $(mkinstalldirs) $${installdir} ; \
99           for i in $$installfiles; do \
100             echo ' $(INSTALL_DATA) '$$i ; \
101             $(INSTALL_DATA) $$i $${installdir}; \
102           done; \
103           if test -n "$(DOC_MODULE_VERSION)"; then \
104             mv -f $${installdir}/webkit2gtk.devhelp2 \
105               $${installdir}/webkit2gtk-$(DOC_MODULE_VERSION).devhelp2; \
106           fi; \
107         fi
108 endif
109         @installfiles=`echo ./Documentation/webkitdomgtk/html/*`; \
110         if test "$$installfiles" = './Documentation/webkitdomgtk/html/*'; \
111         then echo 1>&2 'No documentation to install' ; \
112         else \
113           DOC_MODULE_VERSION=`cat ./Documentation/webkitdomgtk/version.xml`; \
114           if test -n "$(DOC_MODULE_VERSION)"; then \
115             installdir="$(DESTDIR)$(HTML_DIR)/webkitdomgtk-$(DOC_MODULE_VERSION)"; \
116           else \
117             installdir="$(DESTDIR)$(HTML_DIR)/webkitdomgtk"; \
118           fi; \
119           $(mkinstalldirs) $${installdir} ; \
120           for i in $$installfiles; do \
121             echo ' $(INSTALL_DATA) '$$i ; \
122             $(INSTALL_DATA) $$i $${installdir}; \
123           done; \
124           if test -n "$(DOC_MODULE_VERSION)"; then \
125             mv -f $${installdir}/webkitdomgtk.devhelp2 \
126               $${installdir}/webkitdomgtk-$(DOC_MODULE_VERSION).devhelp2; \
127           fi; \
128         fi
129 if ENABLE_GTK_DOC
130         @$(AM_V_GEN) PKG_CONFIG=$(PKG_CONFIG) $(PYTHON) $(srcdir)/Tools/gtk/generate-gtkdoc --rebase --virtual-root=$${DESTDIR}
131 endif
132
133 uninstall-local:
134 if ENABLE_WEBKIT1
135         @DOC_MODULE_VERSION=`cat ./Documentation/webkitgtk/version.xml`; \
136         if test -n "$(DOC_MODULE_VERSION)"; then \
137           installdir="$(DESTDIR)$(HTML_DIR)/webkitgtk-$(DOC_MODULE_VERSION)"; \
138         else \
139           installdir="$(DESTDIR)$(HTML_DIR)/webkitgtk"; \
140         fi; \
141         rm -rf $${installdir}
142 endif
143 if ENABLE_WEBKIT2
144         @DOC_MODULE_VERSION=`cat ./Documentation/webkit2gtk/version.xml`; \
145         if test -n "$(DOC_MODULE_VERSION)"; then \
146           installdir="$(DESTDIR)$(HTML_DIR)/webkit2gtk-$(DOC_MODULE_VERSION)"; \
147         else \
148           installdir="$(DESTDIR)$(HTML_DIR)/webkit2gtk"; \
149         fi; \
150         rm -rf $${installdir}
151 endif
152         @DOC_MODULE_VERSION=`cat ./Documentation/webkitdomgtk/version.xml`; \
153         if test -n "$(DOC_MODULE_VERSION)"; then \
154           installdir="$(DESTDIR)$(HTML_DIR)/webkitdomgtk-$(DOC_MODULE_VERSION)"; \
155         else \
156           installdir="$(DESTDIR)$(HTML_DIR)/webkitdomgtk"; \
157         fi; \
158         rm -rf $${installdir}
159 if ENABLE_GTK_DOC
160 noinst_DATA += docs-build.stamp
161 endif
162