2 ## Process this file with automake to create Makefile.in.
4 # The name of the module.
5 DOC_MODULE=gnome-vfs-2.0
7 # The top-level SGML file.
8 DOC_MAIN_SGML_FILE=gnome-vfs-2.0-docs.sgml
10 # The directory containing the source code. Relative to $(srcdir)
11 DOC_SOURCE_DIR=../libgnomevfs
13 # Extra options to supply to gtkdoc-scan
16 # Extra options to supply to gtkdoc-mkdb
17 MKDB_OPTIONS=--output-format=xml
19 # Extra options to supply to gtkdoc-fixref
22 # Used for dependencies
23 HFILE_GLOB=$(top_srcdir)/libgnomevfs/*.h
24 CFILE_GLOB=$(top_srcdir)/libgnomevfs/*.c
28 gnome-vfs-async-job-map.h \
30 gnome-vfs-cancellable-ops.h \
31 gnome-vfs-configuration.h \
32 gnome-vfs-handle-private.h \
34 gnome-vfs-job-queue.h \
35 gnome-vfs-job-slave.h \
37 gnome-vfs-metadata-private.h \
38 gnome-vfs-mime-magic.h \
39 gnome-vfs-mime-private.h \
40 gnome-vfs-mime-sniff-buffer.h \
41 gnome-vfs-mime-sniff-buffer-private.h \
42 gnome-vfs-module-callback-private.h \
43 gnome-vfs-monitor-private.h \
44 gnome-vfs-private-utils.h \
48 gnome-vfs-ssl-private.h \
49 gnome-vfs-thread-pool.h
52 # Extra files to add when scanning
55 # Images to copy into HTML directory
58 # Non-autogenerated SGML files to be included in $(DOC_MAIN_SGML_FILE)
60 writing-modules.sgml \
65 # CFLAGS and LDFLAGS for compiling scan program. Only needed
66 # if $(DOC_MODULE).types is non-empty.
70 # Commands for compiling and linking
71 GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
72 GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
75 # mkdir $(distdir)/TEXT; \
76 # for f in $(srcdir)/TEXT/* ; do \
77 # test -f $$f && cp -p $$f $(distdir)/TEXT; \
81 ####################################
82 # Everything below here is generic #
83 ####################################
85 # ... except for TARGET_DIR, which we override
87 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
93 $(DOC_MAIN_SGML_FILE) \
95 $(DOC_MODULE)-sections.txt \
96 $(DOC_MODULE)-overrides.txt
98 DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
99 $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp
103 $(DOC_MODULE).hierarchy \
104 $(DOC_MODULE).signals
107 all-local: html-build.stamp
111 scan-build.stamp: $(HFILE_GLOB)
112 @echo '*** Scanning header files ***'
113 if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
114 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
117 for i in $(SCANOBJ_FILES) ; do \
118 test -f $$i || touch $$i ; \
122 gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
123 touch scan-build.stamp
125 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
130 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
131 @echo '*** Rebuilding template files ***'
132 cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
133 touch tmpl-build.stamp
135 tmpl.stamp: tmpl-build.stamp
136 touch $(srcdir)/tmpl.stamp
140 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
141 @echo '*** Building SGML ***'
143 gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) $(MKDB_OPTIONS)
144 touch sgml-build.stamp
146 sgml.stamp: sgml-build.stamp
147 touch $(srcdir)/sgml.stamp
151 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
152 @echo '*** Building HTML ***'
153 test -d $(srcdir)/html || mkdir $(srcdir)/html
154 cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
155 test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
156 @echo '-- Fixing Crossreferences'
157 cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
158 touch html-build.stamp
164 rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
166 maintainer-clean-local: clean
167 cd $(srcdir) && rm -rf xml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
170 $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
171 (installfiles=`echo $(srcdir)/html/*`; \
172 if test "$$installfiles" = '$(srcdir)/html/*'; \
173 then echo '-- Nothing to install' ; \
175 for i in $$installfiles; do \
176 echo '-- Installing '$$i ; \
177 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
179 echo '-- Installing $(srcdir)/html/index.sgml' ; \
180 $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
184 # Require gtk-doc when making dist
190 @echo "*** gtk-doc must be installed and enabled in order to make dist"
194 dist-hook: dist-check-gtkdoc dist-hook-local
195 test -d $(distdir)/tmpl || mkdir $(distdir)/tmpl
196 test -d $(distdir)/xml || mkdir $(distdir)/xml
197 test -d $(distdir)/html || mkdir $(distdir)/html
198 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
199 -cp $(srcdir)/xml/*.xml $(distdir)/xml
200 -cp $(srcdir)/html/index.sgml $(distdir)/html
201 -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
203 images=$(HTML_IMAGES) ; \
204 for i in $$images ; do \
205 cp $(srcdir)/$$i $(distdir)/html ; \
208 .PHONY : dist-hook-local