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 sinclude $(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.
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 --output-format=xml --ignore-files=trio
52 # Extra options to supply to gtkdoc-fixref.
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
66 # Header files to ignore when scanning.
76 schedulers/cothreads_compat.h \
77 schedulers/gthread-cothreads.h \
79 elements/gstaggregator.h \
80 elements/gstbufferstore.h \
81 elements/gstfakesink.h \
82 elements/gstfakesrc.h \
83 elements/gstfdsink.h \
85 elements/gstfilesink.h \
86 elements/gstfilesrc.h \
87 elements/gstidentity.h \
88 elements/gstmd5sink.h \
89 elements/gstmultifilesrc.h \
90 elements/gstpipefilter.h \
91 elements/gstshaper.h \
92 elements/gststatistics.h \
94 elements/gsttypefind.h
96 # Images to copy into HTML directory.
99 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
102 # Other files to distribute.
105 # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
106 # contains GtkObjects/GObjects and you want to document signals and properties.
107 GTKDOC_CFLAGS = $(GST_CFLAGS) -I$(top_builddir)
108 GTKDOC_LIBS = $(GST_LIBS) $(SCANOBJ_DEPS)
110 GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
111 GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
113 # If you need to override some of the declarations, place them in this file
114 # and uncomment this line.
115 #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
119 ###########################################################################
120 # Everything below here is generic and you shouldn't need to change it.
121 ###########################################################################
122 # thomas: except of course that we did
124 # thomas: copied from glib-2
125 # We set GPATH here; this gives us semantics for GNU make
126 # which are more like other make's VPATH, when it comes to
127 # whether a source that is a target of one rule is then
128 # searched for in VPATH/GPATH.
132 # thomas: make docs parallel installable
133 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@
139 $(DOC_MAIN_SGML_FILE) \
140 $(DOC_MODULE).types \
141 $(DOC_MODULE)-sections.txt
143 DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
144 $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
148 $(DOC_MODULE).hierarchy \
149 $(DOC_MODULE)-scan.o \
150 $(DOC_MODULE).signals
153 all-local: html-build.stamp
159 scan-build.stamp: $(HFILE_GLOB) $(SCANOBJ_DEPS) $(basefiles)
160 @echo '*** Scanning header files ***'
161 if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
162 if test x"$(srcdir)" != x. ; then \
163 cp $(srcdir)/$(DOC_MODULE).types . ; \
165 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) ; \
168 for i in $(SCANOBJ_FILES) ; do \
169 test -f $$i || touch $$i ; \
172 gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
173 touch scan-build.stamp
175 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
180 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
181 @echo '*** Rebuilding template files ***'
182 if test x"$(srcdir)" != x. ; then \
183 cp $(srcdir)/$(DOC_MODULE)-decl.txt . ; \
184 cp $(srcdir)/$(DOC_MODULE)-sections.txt . ; \
186 gtkdoc-mktmpl --module=$(DOC_MODULE)
187 touch tmpl-build.stamp
189 tmpl.stamp: tmpl-build.stamp
194 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB)
195 @echo '*** Building SGML ***'
196 gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
197 touch sgml-build.stamp
199 sgml.stamp: sgml-build.stamp
204 # FIXME: setting LANG=C is a hack to work with gtk-doc < 1.1, because
205 # that forces a non-utf8 locale. gtk-doc >= 1.1 solves this by calling
206 # use bytes; in gtkdoc-fixxref
207 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
208 @echo '*** Building HTML ***'
209 test -d html || mkdir html
210 cd html && gtkdoc-mkhtml $(DOC_MODULE) $(srcdir)/../$(DOC_MAIN_SGML_FILE)
211 test "x$(HTML_IMAGES)" = "x" || for i in "" $(HTML_IMAGES) ; do \
212 if test "$$i" != ""; then cp $(srcdir)/$$i html ; fi; done
213 @echo '-- Fixing Crossreferences'
214 LANG=C && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
215 touch html-build.stamp
219 rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
222 maintainer-clean-local: clean
223 cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
225 # company: don't delete .sgml and -sections.txt as they're in CVS
226 # FIXME : thomas added all sgml files and some other things to make
227 # make distcheck work
228 distclean-local: clean
229 rm -rf $(DOC_MODULE)-decl-list.txt
230 rm -rf $(DOC_MODULE)-decl.txt
231 rm -rf $(DOC_MODULE)-undocumented.txt
232 rm -rf $(DOC_MODULE)-unused.txt
233 rm -rf tmpl/*.sgml.bak
234 rm -f $(DOC_MODULE).hierarchy
235 rm -f *.stamp || true
236 if test x"$(srcdir)" != x. ; then \
237 rm -f $(DOC_MODULE)-docs.sgml ; \
238 rm -f $(DOC_MODULE).types ; \
239 rm -f $(DOC_MODULE).interfaces ; \
240 rm -f $(DOC_MODULE).prerequisites ; \
241 rm -f $(DOC_MODULE)-sections.txt ; \
242 rm -rf tmpl/*.sgml ; \
246 # thomas: make docs parallel installable; devhelp requires majorminor too
249 $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
250 (installfiles=`echo ./html/*.html`; \
251 if test "$$installfiles" = './html/*.html'; \
252 then echo '-- Nothing to install' ; \
254 for i in $$installfiles; do \
255 echo '-- Installing '$$i ; \
256 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
258 pngfiles=`echo ./html/*.png`; \
259 if test "$$pngfiles" != './html/*.png'; then \
260 for i in $$pngfiles; do \
261 echo '-- Installing '$$i ; \
262 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
265 echo '-- Installing $(srcdir)/html/$(DOC_MODULE).devhelp' ; \
266 $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp \
267 $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
268 echo '-- Installing $(srcdir)/html/index.sgml' ; \
269 $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
272 (installfiles=`echo ./html/*.html`; \
273 if test "$$installfiles" = './html/*.html'; \
274 then echo '-- Nothing to uninstall' ; \
276 for i in $$installfiles; do \
277 rmfile=`basename $$i` ; \
278 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
279 rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
281 pngfiles=`echo ./html/*.png`; \
282 if test "$$pngfiles" != './html/*.png'; then \
283 for i in $$pngfiles; do \
284 rmfile=`basename $$i` ; \
285 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
286 rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
289 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE).devhelp' ; \
290 rm -f $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
291 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/index.sgml' ; \
292 rm -f $(DESTDIR)$(TARGET_DIR)/index.sgml; \
294 if test -d $(DESTDIR)$(TARGET_DIR); then rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(TARGET_DIR); fi
301 # Require gtk-doc when making dist
307 @echo "*** gtk-doc must be installed and enabled in order to make dist"
311 dist-hook: dist-check-gtkdoc dist-hook-local
312 mkdir $(distdir)/tmpl
314 mkdir $(distdir)/html
315 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
316 -cp $(srcdir)/sgml/*.xml $(distdir)/xml
317 -cp $(srcdir)/html/index.sgml $(distdir)/html
318 -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
320 images=$(HTML_IMAGES) ; \
321 for i in "" $$images ; do \
322 if test "$$i" != ""; then cp $(srcdir)/$$i $(distdir)/html ; fi; \
325 .PHONY : dist-hook-local