Removed unused index.sgml file from installed set.
[platform/core/uifw/at-spi2-atk.git] / docs / reference / cspi / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 EXTRA_DIST = Makefile.am at-spi-cspi-docs.sgml at-spi-cspi-sections.txt
4
5 # Files whose declarations are to be ignored (private)
6 IGNORE_HFILES = spi-impl.h
7
8 # The name of the module.
9 DOC_MODULE=at-spi-cspi
10
11 # The top-level SGML file.
12 DOC_MAIN_SGML_FILE=at-spi-cspi-docs.sgml
13
14 # The directory containing the source code (if it contains documentation).
15 DOC_SOURCE_DIR=../../../cspi 
16
17 # Extra options to supply to gtkdoc-mkdb
18 MKDB_OPTIONS=--output-format=xml
19
20 INSTALLDIR=$(prefix)/share/gtk-doc
21
22 HTML_DIR = ${datadir}/gtk-doc/html
23
24 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
25
26 # Images to copy into HTML directory
27 HTML_IMAGES =
28
29 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
30 content_files =
31
32 # Other files to distribute
33 extra_files =
34
35 ####################################
36 # Everything below here is generic #
37 ####################################
38
39 # We set GPATH here; this gives us semantics for GNU make
40 # which are more like other make's VPATH, when it comes to
41 # whether a source that is a target of one rule is then
42 # searched for in VPATH/GPATH.
43 #
44 GPATH = $(srcdir)
45
46 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
47
48 EXTRA_DIST =                            \
49         $(content_files)                \
50         $(extra_files)                  \
51         $(HTML_IMAGES)                  \
52         $(DOC_MAIN_SGML_FILE)           \
53         $(DOC_MODULE)-sections.txt      \
54         $(DOC_MODULE)-overrides.txt
55
56 DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \           $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
57
58 SCANOBJ_FILES =                 \
59         $(DOC_MODULE).args      \
60         $(DOC_MODULE).hierarchy \
61         $(DOC_MODULE).signals
62
63 if ENABLE_GTK_DOC
64 all-local: html-build.stamp
65
66 #### scan ####
67
68 scan-build.stamp: $(HFILE_GLOB)
69         @echo '*** Scanning header files ***'
70         if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
71             CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
72                 else \
73         cd $(srcdir) ; \
74         for i in $(SCANOBJ_FILES) ; do \
75                 test -f $$i || touch $$i ; \
76         done \
77         fi
78         cd $(srcdir) && \
79           gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
80         touch scan-build.stamp
81
82 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
83         @true
84
85 #### templates ####
86
87 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
88         @echo '*** Rebuilding template files ***'
89         cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
90         touch tmpl-build.stamp
91
92 tmpl.stamp: tmpl-build.stamp
93         @true
94
95 #### sgml ####
96
97 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
98         @echo '*** Building SGML ***'
99         cd $(srcdir) && \
100         gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) $(MKDB_OPTIONS)
101         touch sgml-build.stamp
102
103 sgml.stamp: sgml-build.stamp
104         @true
105
106 #### html ####
107
108 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
109         @echo '*** Building HTML ***'
110         test -d $(srcdir)/html || mkdir $(srcdir)/html
111         cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
112         test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
113         @echo '-- Fixing Crossreferences'
114         cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
115         touch html-build.stamp
116 endif
117
118 ##############
119
120 clean-local:
121         rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
122
123 maintainer-clean-local: clean
124         cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
125
126 install-data-local:
127         $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
128         (installfiles=`echo $(srcdir)/html/*.html`; \
129         if test "$$installfiles" = '$(srcdir)/html/*.html'; \
130         then echo '-- Nothing to install' ; \
131         else \
132           for i in $$installfiles; do \
133         echo '-- Installing '$$i ; \
134         $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
135           done; \
136         fi)
137
138 #
139 # Require gtk-doc when making dist
140 #
141 if ENABLE_GTK_DOC
142 dist-check-gtkdoc:
143 else
144 dist-check-gtkdoc:
145         @echo "*** gtk-doc must be installed and enabled in order to make dist"
146         @false
147 endif
148
149 dist-hook: dist-check-gtkdoc dist-hook-local
150         mkdir $(distdir)/tmpl
151         mkdir $(distdir)/sgml
152         mkdir $(distdir)/html
153         -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
154         -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
155         -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
156
157         images=$(HTML_IMAGES) ;                 \
158         for i in $$images ; do                  \
159           cp $(srcdir)/$$i $(distdir)/html ;  \
160         done
161
162 .PHONY : html sgml templates scan dist-hook-local