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
9 ## $(DOC_MODULE).types \
10 # $(DOC_MODULE)-sections.txt \
11 # $(DOC_MODULE)-docs.sgml
13 # ugly hack to make -unused.sgml work
16 # cd $(srcdir)/tmpl && \
17 # ln -sf gstreamer-libs-unused.sgml \
18 # $$BUILDDIR/tmpl/gstreamer-libs-@GST_MAJORMINOR@-unused.sgml
19 # touch unused-build.stamp
21 # these rules are added to create parallel docs using GST_MAJORMINOR
22 #$(basefiles): gstreamer-libs-@GST_MAJORMINOR@%: gstreamer-libs%
25 #CLEANFILES = $(basefiles)
27 # The top-level SGML file. Change it if you want.
28 DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
30 # The directory containing the source code. Relative to $(top_srcdir).
31 # gtk-doc will search all .c & .h files beneath here for inline comments
32 # documenting functions and macros.
33 DOC_SOURCE_DIR=$(top_srcdir)/libs/gst
35 # Extra options to supply to gtkdoc-scan.
39 # there's something wrong with gstreamer-sections.txt not being in the dist
40 # maybe it doesn't resolve; we're adding it below for now
41 #EXTRA_DIST = gstreamer.types.in gstreamer.hierarchy $(DOC_MODULE)-sections.txt gstreamer-sections.txt $(DOC_MAIN_SGML_FILE)
43 # Extra options to supply to gtkdoc-mkdb.
44 MKDB_OPTIONS=--sgml-mode --output-format=xml --ignore-files=trio
46 # Extra options to supply to gtkdoc-fixref.
47 FIXXREF_OPTIONS=--extra-dir=../gst/html
49 # Used for dependencies.
50 HFILE_GLOB=$(DOC_SOURCE_DIR)/*/*.h
51 CFILE_GLOB=$(DOC_SOURCE_DIR)/*/*.c
53 # this is a wingo addition
54 # thomasvs: another nice wingo addition would be an explanation on why
57 #SCANOBJ_DEPS = $(top_builddir)/gst/elements/libgstelements.la \
58 # $(top_builddir)/gst/schedulers/libgstbasicomegascheduler.la
59 SCANOBJ_DEPS = $(top_builddir)/libs/gst/control/libgstcontrol-@GST_MAJORMINOR@.la
61 # Header files to ignore when scanning.
64 # Images to copy into HTML directory.
67 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
70 # Other files to distribute.
73 # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
74 # contains GtkObjects/GObjects and you want to document signals and properties.
75 GTKDOC_CFLAGS = $(GST_CFLAGS) -I$(top_builddir)
76 GTKDOC_LIBS = $(GST_LIBS) $(SCANOBJ_DEPS)
78 GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
79 GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
81 # If you need to override some of the declarations, place them in this file
82 # and uncomment this line.
83 #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
87 ###########################################################################
88 # Everything below here is generic and you shouldn't need to change it.
89 ###########################################################################
90 # thomas: except of course that we did
92 # thomas: copied from glib-2
93 # We set GPATH here; this gives us semantics for GNU make
94 # which are more like other make's VPATH, when it comes to
95 # whether a source that is a target of one rule is then
96 # searched for in VPATH/GPATH.
100 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@
106 $(DOC_MAIN_SGML_FILE) \
107 $(DOC_MODULE).types \
108 $(DOC_MODULE)-sections.txt
110 DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
111 $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
115 $(DOC_MODULE).hierarchy \
116 $(DOC_MODULE).signals
119 all-local: html-build.stamp
125 scan-build.stamp: $(HFILE_GLOB) $(SCANOBJ_DEPS) $(basefiles)
126 @echo '*** Scanning header files ***'
127 if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
128 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" $(GTK_DOC_SCANOBJ) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
129 if test x"$(srcdir)" != x. ; then \
130 cp $(srcdir)/$(DOC_MODULE).types . ; \
132 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" $(GTK_DOC_SCANOBJ) --module=$(DOC_MODULE) ; \
135 for i in $(SCANOBJ_FILES) ; do \
136 test -f $$i || touch $$i ; \
139 gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
140 touch scan-build.stamp
142 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
147 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
148 @echo '*** Rebuilding template files ***'
149 if test x"$(srcdir)" != x. ; then \
150 cp $(srcdir)/$(DOC_MODULE)-decl.txt . ; \
151 cp $(srcdir)/$(DOC_MODULE)-sections.txt . ; \
153 gtkdoc-mktmpl --module=$(DOC_MODULE)
154 touch tmpl-build.stamp
156 tmpl.stamp: tmpl-build.stamp
161 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB)
162 @echo '*** Building SGML ***'
163 gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
164 touch sgml-build.stamp
166 sgml.stamp: sgml-build.stamp
171 # FIXME: setting LANG=C is a hack to work with gtk-doc < 1.1, because
172 # that forces a non-utf8 locale. gtk-doc >= 1.1 solves this by calling
173 # use bytes; in gtkdoc-fixxref
174 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
175 @echo '*** Building HTML ***'
176 test -d html || mkdir html
177 cd html && gtkdoc-mkhtml $(DOC_MODULE) $(srcdir)/../$(DOC_MAIN_SGML_FILE)
178 test "x$(HTML_IMAGES)" = "x" || for i in $(HTML_IMAGES) ; do \
179 cp $(srcdir)/$$i html ; done
180 @echo '-- Fixing Crossreferences'
181 LANG=C && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
182 touch html-build.stamp
186 rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
189 maintainer-clean-local: clean
190 cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
192 # FIXME : thomas added all sgml files and some other things to make
193 # make distcheck work
194 distclean-local: clean
195 rm -rf $(DOC_MODULE)-decl-list.txt
196 rm -rf $(DOC_MODULE)-decl.txt
197 rm -rf $(DOC_MODULE)-undocumented.txt
198 rm -rf $(DOC_MODULE)-unused.txt
199 rm -rf tmpl/*.sgml.bak
200 rm -f $(DOC_MODULE).hierarchy
201 rm -f *.stamp || true
202 if test x"$(srcdir)" != x. ; then \
203 rm -f $(DOC_MODULE)-docs.sgml ; \
204 rm -f $(DOC_MODULE).types ; \
205 rm -f $(DOC_MODULE).interfaces ; \
206 rm -f $(DOC_MODULE).prerequisites ; \
207 rm -f $(DOC_MODULE)-sections.txt ; \
208 rm -rf tmpl/*.sgml ; \
215 $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
216 (installfiles=`echo $(srcdir)/html/*.html $(srcdir)/html/*.png`; \
217 if test "$$installfiles" = '$(srcdir)/html/*.html'; \
218 then echo '-- Nothing to install' ; \
220 for i in $$installfiles; do \
221 echo '-- Installing '$$i ; \
222 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
224 echo '-- Installing $(srcdir)/html/$(DOC_MODULE).devhelp' ; \
225 $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp \
226 $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
227 echo '-- Installing $(srcdir)/html/index.sgml' ; \
228 $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
231 (installfiles=`echo $(srcdir)/html/*.html $(srcdir)/html/*.png`; \
232 if test "$$installfiles" = '$(srcdir)/html/*.html'; \
233 then echo '-- Nothing to uninstall' ; \
235 for i in $$installfiles; do \
236 rmfile=`basename $$i` ; \
237 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
238 rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
240 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE).devhelp' ; \
241 rm -f $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
242 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/index.sgml' ; \
243 rm -f $(DESTDIR)$(TARGET_DIR)/index.sgml; \
245 rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(TARGET_DIR)
252 # Require gtk-doc when making dist
258 @echo "*** gtk-doc must be installed and enabled in order to make dist"
262 dist-hook: dist-check-gtkdoc dist-hook-local
263 mkdir $(distdir)/tmpl
265 mkdir $(distdir)/html
266 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
267 -cp $(srcdir)/sgml/*.xml $(distdir)/xml
268 -cp $(srcdir)/html/index.sgml $(distdir)/html
269 -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
271 images=$(HTML_IMAGES) ; \
272 for i in $$images ; do \
273 cp $(srcdir)/$$i $(distdir)/html ; \
276 .PHONY : dist-hook-local