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
60 # Header files to ignore when scanning.
63 # Images to copy into HTML directory.
66 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
69 # Other files to distribute.
72 # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
73 # contains GtkObjects/GObjects and you want to document signals and properties.
74 GTKDOC_CFLAGS = $(GST_CFLAGS)
75 GTKDOC_LIBS = $(GST_LIBS) $(SCANOBJ_DEPS)
77 GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
78 GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
80 # If you need to override some of the declarations, place them in this file
81 # and uncomment this line.
82 #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
86 ###########################################################################
87 # Everything below here is generic and you shouldn't need to change it.
88 ###########################################################################
89 # thomas: except of course that we did
91 # thomas: copied from glib-2
92 # We set GPATH here; this gives us semantics for GNU make
93 # which are more like other make's VPATH, when it comes to
94 # whether a source that is a target of one rule is then
95 # searched for in VPATH/GPATH.
99 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@
105 $(DOC_MAIN_SGML_FILE) \
106 # $(DOC_MODULE).types \
107 $(DOC_MODULE)-sections.txt
109 DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
110 $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
114 $(DOC_MODULE).hierarchy \
115 $(DOC_MODULE).signals
118 all-local: html-build.stamp
124 scan-build.stamp: $(HFILE_GLOB) $(SCANOBJ_DEPS) $(basefiles)
125 @echo '*** Scanning header files ***'
126 if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
127 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" $(GTK_DOC_SCANOBJ) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
130 for i in $(SCANOBJ_FILES) ; do \
131 test -f $$i || touch $$i ; \
135 gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
136 touch scan-build.stamp
138 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
143 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
144 @echo '*** Rebuilding template files ***'
145 cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
146 touch tmpl-build.stamp
148 tmpl.stamp: tmpl-build.stamp
153 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB)
154 @echo '*** Building SGML ***'
156 gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
157 touch sgml-build.stamp
159 sgml.stamp: sgml-build.stamp
164 # FIXME: setting LANG=C is a hack to work with gtk-doc < 1.1, because
165 # that forces a non-utf8 locale. gtk-doc >= 1.1 solves this by calling
166 # use bytes; in gtkdoc-fixxref
167 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
168 @echo '*** Building HTML ***'
169 test -d $(srcdir)/html || mkdir $(srcdir)/html
170 cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
171 test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
172 @echo '-- Fixing Crossreferences'
173 cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
174 touch html-build.stamp
178 rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
181 maintainer-clean-local: clean
182 cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
184 # FIXME : thomas added all sgml files and some other things to make
185 # make distcheck work
186 distclean-local: clean
187 rm -rf $(DOC_MODULE)-decl-list.txt
188 rm -rf $(DOC_MODULE)-*.txt
190 rm -f $(DOC_MODULE).hierarchy
191 rm -f *.stamp || true
194 $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
195 (installfiles=`echo $(srcdir)/html/*.html $(srcdir)/html/*.png`; \
196 if test "$$installfiles" = '$(srcdir)/html/*.html'; \
197 then echo '-- Nothing to install' ; \
199 for i in $$installfiles; do \
200 echo '-- Installing '$$i ; \
201 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
203 echo '-- Installing $(srcdir)/html/$(DOC_MODULE).devhelp' ; \
204 $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp \
205 $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
206 echo '-- Installing $(srcdir)/html/index.sgml' ; \
207 $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
211 # Require gtk-doc when making dist
217 @echo "*** gtk-doc must be installed and enabled in order to make dist"
221 dist-hook: dist-check-gtkdoc dist-hook-local
222 mkdir $(distdir)/tmpl
224 mkdir $(distdir)/html
225 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
226 -cp $(srcdir)/sgml/*.xml $(distdir)/xml
227 -cp $(srcdir)/html/index.sgml $(distdir)/html
228 -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
230 images=$(HTML_IMAGES) ; \
231 for i in $$images ; do \
232 cp $(srcdir)/$$i $(distdir)/html ; \
235 .PHONY : dist-hook-local