1 ## Process this file with automake to produce Makefile.in
3 EXTRA_DIST = Makefile.am at-spi-cspi-docs.sgml at-spi-cspi-sections.txt
5 # Files whose declarations are to be ignored (private)
6 IGNORE_HFILES = spi-impl.h
8 # The name of the module.
11 # The top-level SGML file.
12 DOC_MAIN_SGML_FILE=at-spi-cspi-docs.sgml
14 # The directory containing the source code (if it contains documentation).
15 DOC_SOURCE_DIR=../../../cspi
17 # Extra options to supply to gtkdoc-mkdb
18 MKDB_OPTIONS=--output-format=xml
20 INSTALLDIR=$(prefix)/share/gtk-doc
22 HTML_DIR = ${datadir}/gtk-doc/html
24 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
26 # Images to copy into HTML directory
29 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
32 # Other files to distribute
35 ####################################
36 # Everything below here is generic #
37 ####################################
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.
46 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
52 $(DOC_MAIN_SGML_FILE) \
53 $(DOC_MODULE)-sections.txt \
54 $(DOC_MODULE)-overrides.txt
56 DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
60 $(DOC_MODULE).hierarchy \
64 all-local: html-build.stamp
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) ; \
74 for i in $(SCANOBJ_FILES) ; do \
75 test -f $$i || touch $$i ; \
79 gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
80 touch scan-build.stamp
82 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
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
92 tmpl.stamp: tmpl-build.stamp
97 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
98 @echo '*** Building SGML ***'
100 gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) $(MKDB_OPTIONS)
101 touch sgml-build.stamp
103 sgml.stamp: sgml-build.stamp
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
121 rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
123 maintainer-clean-local: clean
124 cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
127 $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
128 (installfiles=`echo $(srcdir)/html/*.html`; \
129 if test "$$installfiles" = '$(srcdir)/html/*.html'; \
130 then echo '-- Nothing to install' ; \
132 for i in $$installfiles; do \
133 echo '-- Installing '$$i ; \
134 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
136 echo '-- Installing $(srcdir)/html/index.sgml' ; \
137 $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
141 # Require gtk-doc when making dist
147 @echo "*** gtk-doc must be installed and enabled in order to make dist"
151 dist-hook: dist-check-gtkdoc dist-hook-local
152 mkdir $(distdir)/tmpl
153 mkdir $(distdir)/sgml
154 mkdir $(distdir)/html
155 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
156 -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
157 -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
159 images=$(HTML_IMAGES) ; \
160 for i in $$images ; do \
161 cp $(srcdir)/$$i $(distdir)/html ; \
164 .PHONY : html sgml templates scan dist-hook-local