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'.
11 # The top-level SGML file. Change it if you want.
12 DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
14 # The directory containing the source code. Relative to $(srcdir).
15 # gtk-doc will search all .c & .h files beneath here for inline comments
16 # documenting functions and macros.
17 DOC_SOURCE_DIR=../hildon-widgets
19 # Extra options to pass to gtkdoc-scanobj or gtkdoc-scangobj.
20 SCANOBJ_OPTIONS=--type-init-func="gtk_type_init(0)"
22 # Extra options to supply to gtkdoc-scan.
25 # Header files to ignore when scanning.
26 IGNORE_HFILES=*private* config.h ut md5.h hildon-volumebar-range.h hildon-volumebar-private.h \
29 # Files to ignore when making the DB.
30 IGNORE_FILES=$(IGNORE_HFILES)
32 # Extra options to supply to gtkdoc-mkdb.
33 MKDB_OPTIONS=--ignore-files="$(IGNORE_FILES)" --sgml-mode --output-format=xml
35 # Extra options to supply to gtkdoc-fixref.
38 # Used for dependencies.
39 HFILE_GLOB=$(top_srcdir)/hildon-widgets/*.h
40 CFILE_GLOB=$(top_srcdir)/hildon-widgets/*.c
44 # Images to copy into HTML directory.
47 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
50 # Other files to distribute.
53 # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
54 # contains GtkObjects/GObjects and you want to document signals and properties.
55 GTKDOC_CFLAGS = $(GTK_CFLAGS) -I$(top_srcdir) $(GNOME_VFS_CFLAGS)
56 GTKDOC_LIBS = $(GTK_LIBS) ../hildon-widgets/libhildonwidgets.la
58 GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
59 GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
61 # If you need to override some of the declarations, place them in the
62 # $(DOC_MODULE)-overrides.txt file and uncomment the second line here.
64 #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
68 ###########################################################################
69 # Everything below here is generic and you shouldn't need to change it.
70 ###########################################################################
72 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
78 $(DOC_MAIN_SGML_FILE) \
82 DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
83 $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
87 $(DOC_MODULE).hierarchy \
88 $(DOC_MODULE).interfaces \
89 $(DOC_MODULE).prerequisites \
93 all-local: html-build.stamp
97 scan-build.stamp: $(HFILE_GLOB)
98 @echo '*** Scanning header files ***'
99 if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
100 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
103 for i in $(SCANOBJ_FILES) ; do \
104 test -f $$i || touch $$i ; \
108 gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
109 touch scan-build.stamp
111 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
116 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
117 @echo '*** Rebuilding template files ***'
118 cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
119 touch tmpl-build.stamp
121 tmpl.stamp: tmpl-build.stamp
126 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
127 @echo '*** Building XML ***'
129 gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
130 touch sgml-build.stamp
132 sgml.stamp: sgml-build.stamp
137 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
138 @echo '*** Building HTML ***'
139 rm -rf $(srcdir)/html
141 cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
142 test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
143 @echo '-- Fixing Crossreferences'
144 cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
145 touch html-build.stamp
151 rm -rf *~ *.bak $(SCANOBJ_FILES) .libs *-unused.txt $(DOC_STAMPS)
153 maintainer-clean-local: clean
154 cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
157 gtkdochtmldir=$(gtkdocdir)/html
158 gtkdocpackagedir=$(gtkdochtmldir)/$(DOC_MODULE)
160 gtkdocpackage_DATA = $(wildcard $(srcdir)/html/*.html)
163 # $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
164 # (installfiles=`echo $(srcdir)/html/*.html`; \
165 # if test "$$installfiles" = '$(srcdir)/html/*.html'; \
166 # then echo '-- Nothing to install' ; \
168 # for i in $$installfiles; do \
169 # echo '-- Installing '$$i ; \
170 # $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
172 # echo '-- Installing $(srcdir)/html/index.sgml' ; \
173 # $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
177 # Require gtk-doc when making dist
183 @echo "*** gtk-doc must be installed and enabled in order to make dist"
187 dist-hook: dist-check-gtkdoc dist-hook-local
188 mkdir $(distdir)/tmpl
189 mkdir $(distdir)/sgml
190 mkdir $(distdir)/html
191 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
192 -cp $(srcdir)/xml/*.xml $(distdir)/xml
193 -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
195 images=$(HTML_IMAGES) ; \
196 for i in $$images ; do \
197 cp $(srcdir)/$$i $(distdir)/html ; \
200 .PHONY : dist-hook-local