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.
69 # Images to copy into HTML directory.
72 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
75 # Other files to distribute.
78 # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
79 # contains GtkObjects/GObjects and you want to document signals and properties.
80 GTKDOC_CFLAGS = $(GST_CFLAGS) -I$(top_builddir)
81 GTKDOC_LIBS = $(GST_LIBS) $(SCANOBJ_DEPS)
83 GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
84 GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
86 # If you need to override some of the declarations, place them in this file
87 # and uncomment this line.
88 #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
92 ###########################################################################
93 # Everything below here is generic and you shouldn't need to change it.
94 ###########################################################################
95 # thomas: except of course that we did
97 # thomas: copied from glib-2
98 # We set GPATH here; this gives us semantics for GNU make
99 # which are more like other make's VPATH, when it comes to
100 # whether a source that is a target of one rule is then
101 # searched for in VPATH/GPATH.
105 # thomas: make docs parallel installable
106 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@
112 $(DOC_MAIN_SGML_FILE) \
113 $(DOC_MODULE).types \
114 $(DOC_MODULE)-sections.txt
116 DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
117 $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
121 $(DOC_MODULE).hierarchy \
122 $(DOC_MODULE)-scan.o \
123 $(DOC_MODULE).signals
126 all-local: html-build.stamp
132 scan-build.stamp: $(HFILE_GLOB) $(SCANOBJ_DEPS) $(basefiles)
133 @echo '*** Scanning header files ***'
134 if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
135 if test x"$(srcdir)" != x. ; then \
136 cp $(srcdir)/$(DOC_MODULE).types . ; \
138 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) ; \
141 for i in $(SCANOBJ_FILES) ; do \
142 test -f $$i || touch $$i ; \
145 gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
146 touch scan-build.stamp
148 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
153 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
154 @echo '*** Rebuilding template files ***'
155 if test x"$(srcdir)" != x. ; then \
156 cp $(srcdir)/$(DOC_MODULE)-decl.txt . ; \
157 cp $(srcdir)/$(DOC_MODULE)-sections.txt . ; \
159 gtkdoc-mktmpl --module=$(DOC_MODULE)
160 touch tmpl-build.stamp
162 tmpl.stamp: tmpl-build.stamp
167 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB)
168 @echo '*** Building SGML ***'
169 gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
170 touch sgml-build.stamp
172 sgml.stamp: sgml-build.stamp
177 # FIXME: setting LANG=C is a hack to work with gtk-doc < 1.1, because
178 # that forces a non-utf8 locale. gtk-doc >= 1.1 solves this by calling
179 # use bytes; in gtkdoc-fixxref
180 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
181 @echo '*** Building HTML ***'
182 test -d html || mkdir html
183 cd html && gtkdoc-mkhtml $(DOC_MODULE) $(srcdir)/../$(DOC_MAIN_SGML_FILE)
184 test "x$(HTML_IMAGES)" = "x" || for i in "" $(HTML_IMAGES) ; do \
185 if test "$$i" != ""; then cp $(srcdir)/$$i html ; fi; done
186 @echo '-- Fixing Crossreferences'
187 LANG=C && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
188 touch html-build.stamp
192 rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
195 maintainer-clean-local: clean
196 cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
198 # company: don't delete .sgml and -sections.txt as they're in CVS
199 # FIXME : thomas added all sgml files and some other things to make
200 # make distcheck work
201 distclean-local: clean
202 rm -rf $(DOC_MODULE)-decl-list.txt
203 rm -rf $(DOC_MODULE)-decl.txt
204 rm -rf $(DOC_MODULE)-undocumented.txt
205 rm -rf $(DOC_MODULE)-unused.txt
206 rm -rf tmpl/*.sgml.bak
207 rm -f $(DOC_MODULE).hierarchy
208 rm -f *.stamp || true
209 if test x"$(srcdir)" != x. ; then \
210 rm -f $(DOC_MODULE)-docs.sgml ; \
211 rm -f $(DOC_MODULE).types ; \
212 rm -f $(DOC_MODULE).interfaces ; \
213 rm -f $(DOC_MODULE).prerequisites ; \
214 rm -f $(DOC_MODULE)-sections.txt ; \
215 rm -rf tmpl/*.sgml ; \
219 # thomas: make docs parallel installable; devhelp requires majorminor too
222 $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
223 (installfiles=`echo ./html/*.html`; \
224 if test "$$installfiles" = './html/*.html'; \
225 then echo '-- Nothing to install' ; \
227 for i in $$installfiles; do \
228 echo '-- Installing '$$i ; \
229 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
231 pngfiles=`echo ./html/*.png`; \
232 if test "$$pngfiles" != './html/*.png'; then \
233 for i in $$pngfiles; do \
234 echo '-- Installing '$$i ; \
235 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
238 echo '-- Installing $(srcdir)/html/$(DOC_MODULE).devhelp' ; \
239 $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp \
240 $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
241 echo '-- Installing $(srcdir)/html/index.sgml' ; \
242 $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
245 (installfiles=`echo ./html/*.html`; \
246 if test "$$installfiles" = './html/*.html'; \
247 then echo '-- Nothing to uninstall' ; \
249 for i in $$installfiles; do \
250 rmfile=`basename $$i` ; \
251 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
252 rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
254 pngfiles=`echo ./html/*.png`; \
255 if test "$$pngfiles" != './html/*.png'; then \
256 for i in $$pngfiles; do \
257 rmfile=`basename $$i` ; \
258 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
259 rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
262 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE).devhelp' ; \
263 rm -f $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
264 echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/index.sgml' ; \
265 rm -f $(DESTDIR)$(TARGET_DIR)/index.sgml; \
267 if test -d $(DESTDIR)$(TARGET_DIR); then rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(TARGET_DIR); fi
274 # Require gtk-doc when making dist
280 @echo "*** gtk-doc must be installed and enabled in order to make dist"
284 dist-hook: dist-check-gtkdoc dist-hook-local
285 mkdir $(distdir)/tmpl
287 mkdir $(distdir)/html
288 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
289 -cp $(srcdir)/sgml/*.xml $(distdir)/xml
290 -cp $(srcdir)/html/index.sgml $(distdir)/html
291 -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
293 images=$(HTML_IMAGES) ; \
294 for i in "" $$images ; do \
295 if test "$$i" != ""; then cp $(srcdir)/$$i $(distdir)/html ; fi; \
298 .PHONY : dist-hook-local