a bunch of gtk-doc fixes
[platform/upstream/gstreamer.git] / docs / libs / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 # The name of the module.
4 DOC_MODULE=gstreamer-libs
5
6 # The top-level SGML file.
7 DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
8
9 # The directory containing the source code (if it contains documentation).
10 DOC_SOURCE_DIR=$(top_srcdir)/libs
11
12 EXTRA_DIST = $(DOC_MODULE)-docs.sgml $(DOC_MODULE)-sections.txt
13
14 HTML_DIR=@HTML_DIR@
15 # add major minor here for parallel installs
16 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@
17
18 if HAVE_GTK_DOC
19 html: html/book1.html
20 else
21 html:
22 endif
23
24 # rule to make the html 
25 html/book1.html: sgml/$(DOC_MODULE)-doc.bottom $(DOC_MAIN_SGML_FILE)
26         if ! test -d html ; then mkdir html ; fi
27         -cd html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
28
29 # rule to cause scanning to be done
30 $(DOC_MODULE)-decl.txt:
31         gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers=""
32
33 # rule to cause tmpls to be made
34 tmpl/$(DOC_MODULE)-unused.sgml: $(DOC_MODULE)-decl.txt $(DOC_MODULE)-sections.txt
35         gtkdoc-mktmpl --module=$(DOC_MODULE)
36
37 # rule to make sgml
38 sgml/$(DOC_MODULE)-doc.bottom: tmpl/$(DOC_MODULE)-unused.sgml
39         gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR)
40
41 all-local: html
42
43 clean-local:
44         $(RM) -rf *~ *.bak *.signals *-unused.txt *.args html sgml tmpl/*.bak $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt 
45
46 install-data-local: html
47         @$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
48         @(installfiles=`echo $(srcdir)/html/*.html`; \
49         if test "$$installfiles" = '$(srcdir)/html/*.html'; \
50         then echo '-- Nothing to install' ; \
51         else \
52           for i in $$installfiles; do \
53             echo '-- Installing '$$i ; \
54             $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
55           done; \
56           echo '-- Installing $(srcdir)/html/index.sgml' ; \
57           $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
58           echo '-- Fixing Crossreferences' ; \
59           gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(HTML_DIR)|| true; \
60         fi)
61
62 uninstall-local:
63         @echo '-- Uninstalling '$(DESTDIR)$(TARGET_DIR) ; \
64         $(RM) -rf $(DESTDIR)$(TARGET_DIR)
65
66 .PHONY : html