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.
72 # Images to copy into HTML directory.
75 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
78 # Other files to distribute.
81 # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
82 # contains GtkObjects/GObjects and you want to document signals and properties.
83 GTKDOC_CFLAGS = $(GST_OBJ_CFLAGS) -I$(top_builddir)
84 GTKDOC_LIBS = $(GST_OBJ_LIBS) $(SCANOBJ_DEPS)
86 GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
87 GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
89 # If you need to override some of the declarations, place them in this file
90 # and uncomment this line.
91 #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
95 ###########################################################################
96 # Everything below here is generic and you shouldn't need to change it.
97 ###########################################################################
98 # thomas: except of course that we did
100 # thomas: copied from glib-2
101 # We set GPATH here; this gives us semantics for GNU make
102 # which are more like other make's VPATH, when it comes to
103 # whether a source that is a target of one rule is then
104 # searched for in VPATH/GPATH.
108 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@
114 $(DOC_MAIN_SGML_FILE) \
115 $(DOC_MODULE).types \
116 $(DOC_MODULE)-sections.txt
123 $(srcdir)/tmpl.stamp \
124 $(srcdir)/sgml.stamp \
129 $(DOC_MODULE).hierarchy \
130 $(DOC_MODULE).interfaces \
131 $(DOC_MODULE).prerequisites \
132 .libs/$(DOC_MODULE)-scan.o \
133 $(DOC_MODULE).signals
135 CLEANFILES = $(SCANOBJ_FILES) $(DOC_MODULE)-unused.txt $(DOC_STAMPS)
138 all-local: html-build.stamp
142 # in the case of non-srcdir builds, the built gst directory gets added
143 # to gtk-doc scanning; but only then, to avoid duplicates
144 scan-build.stamp: $(HFILE_GLOB) $(SCANOBJ_DEPS) $(basefiles)
145 @echo '*** Scanning header files ***'
146 if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null; \
148 if test x"$(srcdir)" != x. ; then \
149 cp $(srcdir)/$(DOC_MODULE).types . ; \
150 chmod u+w $(DOC_MODULE).types ; \
152 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" \
153 CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" \
154 $(GTK_DOC_SCANOBJ) --type-init-func="gst_init(NULL,NULL)" \
155 --module=$(DOC_MODULE) ; \
158 for i in $(SCANOBJ_FILES) ; do \
159 test -f $$i || touch $$i ; \
162 if test "x$(top_srcdir)" != "x$(top_builddir)"; \
164 export BUILT_OPTIONS="--source-dir=$(top_builddir)/libs/gst"; \
167 $(SCAN_OPTIONS) $(EXTRA_HFILES) \
168 --module=$(DOC_MODULE) \
169 --source-dir=$(DOC_SOURCE_DIR) \
171 --ignore-headers="$(IGNORE_HFILES)"
172 touch scan-build.stamp
174 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
179 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
180 @echo '*** Rebuilding template files ***'
181 if test x"$(srcdir)" != x. ; then \
182 cp $(srcdir)/$(DOC_MODULE)-decl.txt . ; \
183 cp $(srcdir)/$(DOC_MODULE)-sections.txt . ; \
185 gtkdoc-mktmpl --module=$(DOC_MODULE)
186 touch tmpl-build.stamp
188 tmpl.stamp: tmpl-build.stamp
193 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB)
194 @echo '*** Building XML ***'
195 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
196 @if grep "WARNING:" sgml-build.log > /dev/null; then exit 1; fi
198 touch sgml-build.stamp
200 sgml.stamp: sgml-build.stamp
205 # FIXME: setting LANG=C is a hack to work with gtk-doc < 1.1, because
206 # that forces a non-utf8 locale. gtk-doc >= 1.1 solves this by calling
207 # use bytes; in gtkdoc-fixxref
208 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
209 @echo '*** Building HTML ***'
210 if test -d html; then rm -rf html; fi
212 @cp $(srcdir)/$(DOC_MAIN_SGML_FILE) html
214 cp ../version.entities html
215 cd html && gtkdoc-mkhtml $(DOC_MODULE) $(DOC_MAIN_SGML_FILE)
216 rm -f html/$(DOC_MAIN_SGML_FILE)
218 rm -f html/version.entities
219 test "x$(HTML_IMAGES)" = "x" || for i in "" $(HTML_IMAGES) ; do \
220 if test "$$i" != ""; then cp $(srcdir)/$$i html ; fi; done
221 @echo '-- Fixing Crossreferences'
222 LANG=C && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
223 touch html-build.stamp
229 rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
232 maintainer-clean-local: clean
233 cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
235 # FIXME : thomas added all sgml files and some other things to make
236 # make distcheck work
237 distclean-local: clean
238 rm -rf $(DOC_MODULE)-decl-list.txt
239 rm -rf $(DOC_MODULE)-decl.txt
240 rm -rf $(DOC_MODULE)-undocumented.txt
241 rm -rf $(DOC_MODULE)-unused.txt
242 rm -rf tmpl/*.sgml.bak
243 rm -f $(DOC_MODULE).hierarchy
244 rm -f *.stamp || true
245 if test x"$(srcdir)" != x. ; then \
246 rm -f $(DOC_MODULE)-docs.sgml ; \
247 rm -f $(DOC_MODULE).types ; \
248 rm -f $(DOC_MODULE).interfaces ; \
249 rm -f $(DOC_MODULE).prerequisites ; \
250 rm -f $(DOC_MODULE)-sections.txt ; \
251 rm -rf tmpl/*.sgml ; \
257 $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
258 (installfiles=`echo ./html/*.html`; \
259 if test "$$installfiles" = './html/*.html'; \
260 then echo '-- Nothing to install' ; \
262 for i in $$installfiles; do \
263 echo '-- Installing '$$i ; \
264 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
266 pngfiles=`echo ./html/*.png`; \
267 if test "$$pngfiles" != './html/*.png'; then \
268 for i in $$pngfiles; do \
269 echo '-- Installing '$$i ; \
270 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
273 echo '-- Installing $(srcdir)/html/$(DOC_MODULE).devhelp' ; \
274 $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp \
275 $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
276 echo '-- Installing $(srcdir)/html/index.sgml' ; \
277 $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
280 (installfiles=`echo ./html/*.html`; \
281 if test "$$installfiles" = './html/*.html'; \
282 then echo '-- Nothing to uninstall' ; \
284 for i in $$installfiles; do \
285 rmfile=`basename $$i` ; \
286 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
287 rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
289 pngfiles=`echo ./html/*.png`; \
290 if test "$$pngfiles" != './html/*.png'; then \
291 for i in $$pngfiles; do \
292 rmfile=`basename $$i` ; \
293 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
294 rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
297 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE).devhelp' ; \
298 rm -f $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
299 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/index.sgml' ; \
300 rm -f $(DESTDIR)$(TARGET_DIR)/index.sgml; \
302 if test -d $(DESTDIR)$(TARGET_DIR); then rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(TARGET_DIR) 2>/dev/null; fi
305 # Require gtk-doc when making dist
311 @echo "*** gtk-doc must be installed and enabled in order to make dist"
315 dist-hook: dist-check-gtkdoc dist-hook-local
316 mkdir $(distdir)/tmpl
318 mkdir $(distdir)/html
319 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
320 -cp $(srcdir)/sgml/*.xml $(distdir)/xml
321 -cp $(srcdir)/html/index.sgml $(distdir)/html
322 -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
323 -cp $(srcdir)/html/gstreamer-libs.devhelp $(distdir)/html
325 images=$(HTML_IMAGES) ; \
326 for i in "" $$images ; do \
327 if test "$$i" != ""; then cp $(srcdir)/$$i $(distdir)/html ; fi; \
330 .PHONY : dist-hook-local