1 ## Process this file with automake to produce Makefile.in
3 # This is a blank Makefile.am for using gtk-doc.
4 # Copy this to your project's API docs directory and modify the variables to
5 # suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
6 # of using the various options.
8 # The name of the module, e.g. 'glib'.
12 # The top-level SGML file. Change it if you want.
13 DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
15 # The directory containing the source code. Relative to $(srcdir).
16 # gtk-doc will search all .c & .h files beneath here for inline comments
17 # documenting functions and macros.
20 # Extra options to pass to gtkdoc-scanobj or gtkdoc-scangobj.
23 # Extra options to supply to gtkdoc-scan.
26 # Extra options to supply to gtkdoc-mkdb.
27 MKDB_OPTIONS=--sgml-mode --ignore-files="nws_portability include/gras/gras"
29 # Extra options to supply to gtkdoc-fixref.
32 # Used for dependencies.
33 HFILE_GLOB=$(shell find $(top_srcdir)/src -name "*.h")
34 CFILE_GLOB=$(shell find $(top_srcdir)/src -name "*.c")
35 #CFILE_GLOB=$(top_srcdir)/src/core/*.c
37 # Header files to ignore when scanning.
40 # Images to copy into HTML directory.
43 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
44 content_files = overview.sgml
46 # Other files to distribute.
49 # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
50 # contains GtkObjects/GObjects and you want to document signals and properties.
54 #GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
55 #GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
57 # If you need to override some of the declarations, place them in the
58 # $(DOC_MODULE)-overrides.txt file and uncomment the second line here.
60 #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
64 ###########################################################################
65 # Everything below here is generic and you shouldn't need to change it.
66 ###########################################################################
68 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
74 $(DOC_MAIN_SGML_FILE) \
75 $(DOC_MODULE)-sections.txt \
78 DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
79 $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
83 $(DOC_MODULE).hierarchy \
84 $(DOC_MODULE).interfaces \
85 $(DOC_MODULE).prerequisites \
89 all-local: html-build.stamp
93 scan-build.stamp: $(HFILE_GLOB)
94 @echo '*** Scanning header files ***'
96 gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
97 touch scan-build.stamp
99 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
104 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
105 @echo '*** Rebuilding template files ***'
106 cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
107 touch tmpl-build.stamp
109 tmpl.stamp: tmpl-build.stamp
114 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
115 @echo '*** Building SGML ***'
117 gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
118 touch sgml-build.stamp
120 sgml.stamp: sgml-build.stamp
125 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
126 @echo '*** Building HTML ***'
127 test -d $(srcdir)/html || mkdir $(srcdir)/html
128 cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
129 test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
130 @echo '-- Fixing Crossreferences'
131 cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
132 touch html-build.stamp
140 rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
142 maintainer-clean-local: clean
143 cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
146 $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
147 (installfiles=`echo $(srcdir)/html/*.html`; \
148 if test "$$installfiles" = '$(srcdir)/html/*.html'; \
149 then echo '-- Nothing to install' ; \
151 for i in $$installfiles; do \
152 echo '-- Installing '$$i ; \
153 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
155 echo '-- Installing $(srcdir)/html/index.sgml' ; \
156 $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
160 # Require gtk-doc when making dist
166 @echo "*** gtk-doc must be installed and enabled in order to make dist"
170 dist-hook: dist-check-gtkdoc dist-hook-local
171 mkdir $(distdir)/tmpl
172 mkdir $(distdir)/sgml
173 mkdir $(distdir)/html
174 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
175 -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
176 -cp $(srcdir)/html/index.sgml $(distdir)/html
177 -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
179 images=$(HTML_IMAGES) ; \
180 for i in $$images ; do \
181 cp $(srcdir)/$$i $(distdir)/html ; \
184 .PHONY : dist-hook-local