1 ## Process this file with automake to produce Makefile.in
3 # The name of the module, e.g. 'glib'.
4 # DOC_MODULE=gstreamer-@GST_MAJORMINOR@
10 html: html-build.stamp
11 include $(srcdir)/../upload.mak
15 # gstreamer-@GST_MAJORMINOR@.types \
16 # gstreamer-@GST_MAJORMINOR@-sections.txt \
17 # gstreamer-@GST_MAJORMINOR@-docs.sgml
19 # ugly hack to make -unused.sgml work
22 # cd $(srcdir)/tmpl && \
23 # ln -sf gstreamer-unused.sgml \
24 # $$BUILDDIR/tmpl/gstreamer-@GST_MAJORMINOR@-unused.sgml
25 # touch unused-build.stamp
27 # these rules are added to create parallel docs using GST_MAJORMINOR
28 #$(basefiles): gstreamer-@GST_MAJORMINOR@%: gstreamer%
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)/gst
41 # Extra options to supply to gtkdoc-scan.
44 # Extra options to supply to gtkdoc-mkdb.
45 MKDB_OPTIONS=--sgml-mode --ignore-files=parse
47 # Extra options to supply to gtkdoc-fixref.
50 # Used for dependencies.
51 HFILE_GLOB=$(DOC_SOURCE_DIR)/*.h
52 CFILE_GLOB=$(DOC_SOURCE_DIR)/*.c
54 # this is a wingo addition
55 # thomasvs: another nice wingo addition would be an explanation on why
58 #SCANOBJ_DEPS = $(top_builddir)/gst/elements/libgstelements.la \
59 # $(top_builddir)/gst/schedulers/libgstbasicomegascheduler.la
61 # Header files to ignore when scanning. Use base file name, no paths
76 elements/gstaggregator.h \
77 elements/gstbufferstore.h \
78 elements/gstfakesink.h \
79 elements/gstfakesrc.h \
80 elements/gstfdsink.h \
82 elements/gstfilesink.h \
83 elements/gstfilesrc.h \
84 elements/gstidentity.h \
85 elements/gstmd5sink.h \
86 elements/gstmultifilesrc.h \
87 elements/gstpipefilter.h \
88 elements/gstshaper.h \
89 elements/gststatistics.h \
91 elements/gsttypefind.h
93 # Images to copy into HTML directory.
96 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
99 # Other files to distribute.
102 # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
103 # contains GtkObjects/GObjects and you want to document signals and properties.
104 GTKDOC_CFLAGS = $(GST_CFLAGS) -I$(top_builddir)
105 GTKDOC_LIBS = $(GST_LIBS) $(SCANOBJ_DEPS)
107 GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
108 GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
110 # If you need to override some of the declarations, place them in this file
111 # and uncomment this line.
112 #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
116 ###########################################################################
117 # Everything below here is generic and you shouldn't need to change it.
118 ###########################################################################
119 # thomas: except of course that we did
121 # thomas: copied from glib-2
122 # We set GPATH here; this gives us semantics for GNU make
123 # which are more like other make's VPATH, when it comes to
124 # whether a source that is a target of one rule is then
125 # searched for in VPATH/GPATH.
129 # thomas: make docs parallel installable
130 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@
136 $(DOC_MAIN_SGML_FILE) \
137 $(DOC_MODULE).types \
138 $(DOC_MODULE)-sections.txt
140 DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
141 $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
145 $(DOC_MODULE).hierarchy \
146 $(DOC_MODULE).interfaces \
147 $(DOC_MODULE).prerequisites \
148 $(DOC_MODULE)-scan.o \
149 $(DOC_MODULE).signals
151 CLEANFILES = $(SCANOBJ_FILES) $(DOC_MODULE)-unused.txt $(DOC_STAMPS)
154 all-local: html-build.stamp
158 # in the case of non-srcdir builds, the built gst directory gets added
159 # to gtk-doc scanning; but only then, to avoid duplicates
160 scan-build.stamp: $(HFILE_GLOB) $(SCANOBJ_DEPS) $(basefiles)
161 @echo '*** Scanning header files ***'
162 if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
163 if test x"$(srcdir)" != x. ; then \
164 cp $(srcdir)/$(DOC_MODULE).types . ; \
165 chmod u+w $(DOC_MODULE).types ; \
167 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" $(GTK_DOC_SCANOBJ) --type-init-func="gst_init(NULL,NULL)" --module=$(DOC_MODULE) ; \
170 for i in $(SCANOBJ_FILES) ; do \
171 test -f $$i || touch $$i ; \
174 if test "x$(top_srcdir)" != "x$(top_builddir)"; \
176 export BUILT_OPTIONS="--source-dir=$(top_builddir)/gst"; \
179 $(SCAN_OPTIONS) $(EXTRA_HFILES) \
180 --module=$(DOC_MODULE) \
181 --source-dir=$(DOC_SOURCE_DIR) \
183 --ignore-headers="$(IGNORE_HFILES)"
184 touch scan-build.stamp
186 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
191 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
192 @echo '*** Rebuilding template files ***'
193 if test x"$(srcdir)" != x. ; then \
194 cp $(srcdir)/$(DOC_MODULE)-sections.txt . ; \
195 touch $(DOC_MODULE)-decl.txt ; \
197 gtkdoc-mktmpl --module=$(DOC_MODULE) | tee tmpl-build.log
198 @if grep "WARNING:" tmpl-build.log > /dev/null; then exit 1; fi
200 touch tmpl-build.stamp
202 tmpl.stamp: tmpl-build.stamp
207 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB)
208 @echo '*** Building XML ***'
209 gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --main-sgml-file=$(DOC_MAIN_SGML_FILE) --output-format=xml $(MKDB_OPTIONS) | tee sgml-build.log
210 @if grep "WARNING:" sgml-build.log > /dev/null; then exit 1; fi
212 touch sgml-build.stamp
214 sgml.stamp: sgml-build.stamp
219 # FIXME: setting LANG=C is a hack to work with gtk-doc < 1.1, because
220 # that forces a non-utf8 locale. gtk-doc >= 1.1 solves this by calling
221 # use bytes; in gtkdoc-fixxref
222 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
223 @echo '*** Building HTML ***'
224 test -d html || mkdir html
225 cd html && gtkdoc-mkhtml $(DOC_MODULE) $(srcdir)/../$(DOC_MAIN_SGML_FILE)
226 test "x$(HTML_IMAGES)" = "x" || for i in "" $(HTML_IMAGES) ; do \
227 if test "$$i" != ""; then cp $(srcdir)/$$i html ; fi; done
228 @echo '-- Fixing Crossreferences'
229 LANG=C && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
230 touch html-build.stamp
238 maintainer-clean-local: clean
239 cd $(srcdir) && rm -rf xml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
241 # company: don't delete .sgml and -sections.txt as they're in CVS
242 # FIXME : thomas added all sgml files and some other things to make
243 # make distcheck work
244 distclean-local: clean
245 rm -rf $(DOC_MODULE)-decl-list.txt
246 rm -rf $(DOC_MODULE)-decl.txt
247 rm -rf $(DOC_MODULE)-undocumented.txt
248 rm -rf $(DOC_MODULE)-unused.txt
249 rm -rf tmpl/*.sgml.bak
250 rm -f $(DOC_MODULE).hierarchy
251 rm -f *.stamp || true
252 if test x"$(srcdir)" != x. ; then \
253 rm -f $(DOC_MODULE)-docs.sgml ; \
254 rm -f $(DOC_MODULE).types ; \
255 rm -f $(DOC_MODULE).interfaces ; \
256 rm -f $(DOC_MODULE).prerequisites ; \
257 rm -f $(DOC_MODULE)-sections.txt ; \
258 rm -rf tmpl/*.sgml ; \
262 # thomas: make docs parallel installable; devhelp requires majorminor too
265 $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
266 (installfiles=`echo ./html/*.html`; \
267 if test "$$installfiles" = './html/*.html'; \
268 then echo '-- Nothing to install' ; \
270 for i in $$installfiles; do \
271 echo '-- Installing '$$i ; \
272 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
274 pngfiles=`echo ./html/*.png`; \
275 if test "$$pngfiles" != './html/*.png'; then \
276 for i in $$pngfiles; do \
277 echo '-- Installing '$$i ; \
278 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
281 echo '-- Installing $(srcdir)/html/$(DOC_MODULE).devhelp' ; \
282 $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp \
283 $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
284 echo '-- Installing $(srcdir)/html/index.sgml' ; \
285 $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
288 (installfiles=`echo ./html/*.html`; \
289 if test "$$installfiles" = './html/*.html'; \
290 then echo '-- Nothing to uninstall' ; \
292 for i in $$installfiles; do \
293 rmfile=`basename $$i` ; \
294 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
295 rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
297 pngfiles=`echo ./html/*.png`; \
298 if test "$$pngfiles" != './html/*.png'; then \
299 for i in $$pngfiles; do \
300 rmfile=`basename $$i` ; \
301 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
302 rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
305 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE).devhelp' ; \
306 rm -f $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
307 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/index.sgml' ; \
308 rm -f $(DESTDIR)$(TARGET_DIR)/index.sgml; \
310 if test -d $(DESTDIR)$(TARGET_DIR); then rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(TARGET_DIR); fi
318 # Require gtk-doc when making dist
324 @echo "*** gtk-doc must be installed and enabled in order to make dist"
328 dist-hook: dist-check-gtkdoc dist-hook-local
329 mkdir $(distdir)/tmpl
331 mkdir $(distdir)/html
332 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
333 -cp $(srcdir)/sgml/*.xml $(distdir)/xml
334 -cp $(srcdir)/html/index.sgml $(distdir)/html
335 -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
337 images=$(HTML_IMAGES) ; \
338 for i in "" $$images ; do \
339 if test "$$i" != ""; then cp $(srcdir)/$$i $(distdir)/html ; fi; \
342 .PHONY : dist-hook-local