1 ## Process this file with automake to produce Makefile.in
3 EXTRA_DIST = Makefile.am atk-api.sgml atk-docs.sgml atk-sections.txt
5 # The name of the module.
8 # The top-level SGML file.
9 DOC_MAIN_SGML_FILE=atk-docs.sgml
11 # The directory containing the source code (if it contains documentation).
14 INSTALLDIR=$(prefix)/share/gtk-doc
16 HTML_DIR = ${datadir}/gtk-doc/html
18 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
20 # Images to copy into HTML directory
23 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
26 # Other files to distribute
29 dist-hook-local: all-local
31 ####################################
32 # Everything below here is generic #
33 ####################################
35 # We set GPATH here; this gives us semantics for GNU make
36 # which are more like other make's VPATH, when it comes to
37 # whether a source that is a target of one rule is then
38 # searched for in VPATH/GPATH.
42 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
48 $(DOC_MAIN_SGML_FILE) \
49 $(DOC_MODULE)-sections.txt \
50 $(DOC_MODULE)-overrides.txt
52 DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
56 $(DOC_MODULE).hierarchy \
60 all-local: html-build.stamp
64 scan-build.stamp: $(HFILE_GLOB)
65 @echo '*** Scanning header files ***'
66 if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
67 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
70 for i in $(SCANOBJ_FILES) ; do \
71 test -f $$i || touch $$i ; \
75 gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
76 touch scan-build.stamp
78 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
83 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
84 @echo '*** Rebuilding template files ***'
85 cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
86 touch tmpl-build.stamp
88 tmpl.stamp: tmpl-build.stamp
93 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
94 @echo '*** Building SGML ***'
96 gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) $(MKDB_OPTIONS)
97 touch sgml-build.stamp
99 sgml.stamp: sgml-build.stamp
104 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
105 @echo '*** Building HTML ***'
106 test -d $(srcdir)/html || mkdir $(srcdir)/html
107 cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
108 test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
109 @echo '-- Fixing Crossreferences'
110 cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
111 touch html-build.stamp
117 rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
119 maintainer-clean-local: clean
120 cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
123 $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
124 (installfiles=`echo $(srcdir)/html/*.html`; \
125 if test "$$installfiles" = '$(srcdir)/html/*.html'; \
126 then echo '-- Nothing to install' ; \
128 for i in $$installfiles; do \
129 echo '-- Installing '$$i ; \
130 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
132 echo '-- Installing $(srcdir)/html/index.sgml' ; \
133 $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
137 # Require gtk-doc when making dist
143 @echo "*** gtk-doc must be installed and enabled in order to make dist"
147 dist-hook: dist-check-gtkdoc dist-hook-local
148 mkdir $(distdir)/tmpl
149 mkdir $(distdir)/sgml
150 mkdir $(distdir)/html
151 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
152 -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
153 cp $(srcdir)/html/index.sgml $(distdir)/html
154 -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
156 images=$(HTML_IMAGES) ; \
157 for i in $$images ; do \
158 cp $(srcdir)/$$i $(distdir)/html ; \
161 .PHONY : html sgml templates scan dist-hook-local