1 ## Process this file with automake to produce Makefile.in
3 # The name of the module, e.g. 'glib'.
4 #DOC_MODULE=gstreamer-libs-@GST_MAJORMINOR@
5 DOC_MODULE=gstreamer-libs
10 html: html-build.stamp
11 include $(srcdir)/../upload.mak
15 ## $(DOC_MODULE).types \
16 # $(DOC_MODULE)-sections.txt \
17 # $(DOC_MODULE)-docs.sgml
19 # ugly hack to make -unused.sgml work
22 # cd $(srcdir)/tmpl && \
23 # ln -sf gstreamer-libs-unused.sgml \
24 # $$BUILDDIR/tmpl/gstreamer-libs-@GST_MAJORMINOR@-unused.sgml
25 # touch unused-build.stamp
27 # these rules are added to create parallel docs using GST_MAJORMINOR
28 #$(basefiles): gstreamer-libs-@GST_MAJORMINOR@%: gstreamer-libs%
31 #CLEANFILES = $(basefiles)
33 # The top-level SGML file. Change it if you want.
34 DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
36 # The directory containing the source code. Relative to $(top_srcdir).
37 # gtk-doc will search all .c & .h files beneath here for inline comments
38 # documenting functions and macros.
39 DOC_SOURCE_DIR=$(top_srcdir)/libs/gst
41 # Extra options to supply to gtkdoc-scan.
45 # there's something wrong with gstreamer-sections.txt not being in the dist
46 # maybe it doesn't resolve; we're adding it below for now
47 #EXTRA_DIST = gstreamer.types.in gstreamer.hierarchy $(DOC_MODULE)-sections.txt gstreamer-sections.txt $(DOC_MAIN_SGML_FILE)
49 # Extra options to supply to gtkdoc-mkdb.
50 MKDB_OPTIONS=--sgml-mode --ignore-files=trio
52 # Extra options to supply to gtkdoc-fixref.
53 FIXXREF_OPTIONS=--extra-dir=../gst/html
55 # Used for dependencies.
56 HFILE_GLOB=$(DOC_SOURCE_DIR)/*/*.h
57 CFILE_GLOB=$(DOC_SOURCE_DIR)/*/*.c
59 # this is a wingo addition
60 # thomasvs: another nice wingo addition would be an explanation on why
63 #SCANOBJ_DEPS = $(top_builddir)/gst/elements/libgstelements.la \
64 # $(top_builddir)/gst/schedulers/libgstbasicomegascheduler.la
65 SCANOBJ_DEPS = $(top_builddir)/libs/gst/control/libgstcontrol-@GST_MAJORMINOR@.la
67 # Header files to ignore when scanning.
70 # Images to copy into HTML directory.
73 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
76 # Other files to distribute.
79 # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
80 # contains GtkObjects/GObjects and you want to document signals and properties.
81 GTKDOC_CFLAGS = $(GST_OBJ_CFLAGS) -I$(top_builddir)
82 GTKDOC_LIBS = $(GST_OBJ_LIBS) $(SCANOBJ_DEPS)
84 GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
85 GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
87 # If you need to override some of the declarations, place them in this file
88 # and uncomment this line.
89 #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
93 ###########################################################################
94 # Everything below here is generic and you shouldn't need to change it.
95 ###########################################################################
96 # thomas: except of course that we did
98 # thomas: copied from glib-2
99 # We set GPATH here; this gives us semantics for GNU make
100 # which are more like other make's VPATH, when it comes to
101 # whether a source that is a target of one rule is then
102 # searched for in VPATH/GPATH.
106 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@
112 $(DOC_MAIN_SGML_FILE) \
113 $(DOC_MODULE).types \
114 $(DOC_MODULE)-sections.txt
121 $(srcdir)/tmpl.stamp \
122 $(srcdir)/sgml.stamp \
127 $(DOC_MODULE).hierarchy \
128 $(DOC_MODULE).interfaces \
129 $(DOC_MODULE).prerequisites \
130 .libs/$(DOC_MODULE)-scan.o \
131 $(DOC_MODULE).signals
133 CLEANFILES = $(SCANOBJ_FILES) $(DOC_MODULE)-unused.txt $(DOC_STAMPS)
136 all-local: html-build.stamp
140 # in the case of non-srcdir builds, the built gst directory gets added
141 # to gtk-doc scanning; but only then, to avoid duplicates
142 scan-build.stamp: $(HFILE_GLOB) $(SCANOBJ_DEPS) $(basefiles)
143 @echo '*** Scanning header files ***'
144 if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null; \
146 if test x"$(srcdir)" != x. ; then \
147 cp $(srcdir)/$(DOC_MODULE).types . ; \
148 chmod u+w $(DOC_MODULE).types ; \
150 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" \
151 CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" \
152 $(GTK_DOC_SCANOBJ) --type-init-func="gst_init(NULL,NULL)" \
153 --module=$(DOC_MODULE) ; \
156 for i in $(SCANOBJ_FILES) ; do \
157 test -f $$i || touch $$i ; \
160 if test "x$(top_srcdir)" != "x$(top_builddir)"; \
162 export BUILT_OPTIONS="--source-dir=$(top_builddir)/libs/gst"; \
165 $(SCAN_OPTIONS) $(EXTRA_HFILES) \
166 --module=$(DOC_MODULE) \
167 --source-dir=$(DOC_SOURCE_DIR) \
169 --ignore-headers="$(IGNORE_HFILES)"
170 touch scan-build.stamp
172 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
177 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
178 @echo '*** Rebuilding template files ***'
179 if test x"$(srcdir)" != x. ; then \
180 cp $(srcdir)/$(DOC_MODULE)-decl.txt . ; \
181 cp $(srcdir)/$(DOC_MODULE)-sections.txt . ; \
183 gtkdoc-mktmpl --module=$(DOC_MODULE)
184 touch tmpl-build.stamp
186 tmpl.stamp: tmpl-build.stamp
191 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB)
192 @echo '*** Building XML ***'
193 gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --main-sgml-file=$(srcdir)/$(DOC_MAIN_SGML_FILE) --output-format=xml $(MKDB_OPTIONS) | tee sgml-build.log
194 @if grep "WARNING:" sgml-build.log > /dev/null; then exit 1; fi
196 touch sgml-build.stamp
198 sgml.stamp: sgml-build.stamp
203 # FIXME: setting LANG=C is a hack to work with gtk-doc < 1.1, because
204 # that forces a non-utf8 locale. gtk-doc >= 1.1 solves this by calling
205 # use bytes; in gtkdoc-fixxref
206 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
207 @echo '*** Building HTML ***'
208 if test -d html; then rm -rf html; fi
210 @cp $(srcdir)/$(DOC_MAIN_SGML_FILE) html
212 cp ../version.entities html
213 cd html && gtkdoc-mkhtml $(DOC_MODULE) $(DOC_MAIN_SGML_FILE)
214 rm -f html/$(DOC_MAIN_SGML_FILE)
216 rm -f html/version.entities
217 test "x$(HTML_IMAGES)" = "x" || for i in "" $(HTML_IMAGES) ; do \
218 if test "$$i" != ""; then cp $(srcdir)/$$i html ; fi; done
219 @echo '-- Fixing Crossreferences'
220 LANG=C && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
221 touch html-build.stamp
227 rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
230 maintainer-clean-local: clean
231 cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
233 # FIXME : thomas added all sgml files and some other things to make
234 # make distcheck work
235 distclean-local: clean
236 rm -rf $(DOC_MODULE)-decl-list.txt
237 rm -rf $(DOC_MODULE)-decl.txt
238 rm -rf $(DOC_MODULE)-undocumented.txt
239 rm -rf $(DOC_MODULE)-unused.txt
240 rm -rf tmpl/*.sgml.bak
241 rm -f $(DOC_MODULE).hierarchy
242 rm -f *.stamp || true
243 if test x"$(srcdir)" != x. ; then \
244 rm -f $(DOC_MODULE)-docs.sgml ; \
245 rm -f $(DOC_MODULE).types ; \
246 rm -f $(DOC_MODULE).interfaces ; \
247 rm -f $(DOC_MODULE).prerequisites ; \
248 rm -f $(DOC_MODULE)-sections.txt ; \
249 rm -rf tmpl/*.sgml ; \
255 $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
256 (installfiles=`echo ./html/*.html`; \
257 if test "$$installfiles" = './html/*.html'; \
258 then echo '-- Nothing to install' ; \
260 for i in $$installfiles; do \
261 echo '-- Installing '$$i ; \
262 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
264 pngfiles=`echo ./html/*.png`; \
265 if test "$$pngfiles" != './html/*.png'; then \
266 for i in $$pngfiles; do \
267 echo '-- Installing '$$i ; \
268 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
271 echo '-- Installing $(srcdir)/html/$(DOC_MODULE).devhelp' ; \
272 $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp \
273 $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
274 echo '-- Installing $(srcdir)/html/index.sgml' ; \
275 $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
278 (installfiles=`echo ./html/*.html`; \
279 if test "$$installfiles" = './html/*.html'; \
280 then echo '-- Nothing to uninstall' ; \
282 for i in $$installfiles; do \
283 rmfile=`basename $$i` ; \
284 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
285 rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
287 pngfiles=`echo ./html/*.png`; \
288 if test "$$pngfiles" != './html/*.png'; then \
289 for i in $$pngfiles; do \
290 rmfile=`basename $$i` ; \
291 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
292 rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
295 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE).devhelp' ; \
296 rm -f $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
297 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/index.sgml' ; \
298 rm -f $(DESTDIR)$(TARGET_DIR)/index.sgml; \
300 if test -d $(DESTDIR)$(TARGET_DIR); then rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(TARGET_DIR); fi
303 # Require gtk-doc when making dist
309 @echo "*** gtk-doc must be installed and enabled in order to make dist"
313 dist-hook: dist-check-gtkdoc dist-hook-local
314 mkdir $(distdir)/tmpl
316 mkdir $(distdir)/html
317 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
318 -cp $(srcdir)/sgml/*.xml $(distdir)/xml
319 -cp $(srcdir)/html/index.sgml $(distdir)/html
320 -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
321 -cp $(srcdir)/html/gstreamer-libs.devhelp $(distdir)/html
323 images=$(HTML_IMAGES) ; \
324 for i in "" $$images ; do \
325 if test "$$i" != ""; then cp $(srcdir)/$$i $(distdir)/html ; fi; \
328 .PHONY : dist-hook-local