1 ## Process this file with automake to produce Makefile.in
3 # The name of the module, e.g. 'glib'.
6 # The top-level SGML file. Change it if you want.
7 DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
9 # The directory containing the source code. Relative to $(top_srcdir).
10 # gtk-doc will search all .c & .h files beneath here for inline comments
11 # documenting functions and macros.
12 DOC_SOURCE_DIR=$(top_srcdir)/gst
14 # Extra options to supply to gtkdoc-scan.
18 # there's something wrong with gstreamer-sections.txt not being in the dist
19 # maybe it doesn't resolve; we're adding it below for now
20 #EXTRA_DIST = gstreamer.types.in gstreamer.hierarchy $(DOC_MODULE)-sections.txt # gstreamer-sections.txt $(DOC_MAIN_SGML_FILE)
22 # Extra options to supply to gtkdoc-mkdb.
25 # Extra options to supply to gtkdoc-fixref.
28 # Used for dependencies.
29 # FIXME deal with the subdirs too...
30 HFILE_GLOB=$(DOC_SOURCE_DIR)/*.h
31 CFILE_GLOB=$(DOC_SOURCE_DIR)/*.c
33 # this is a wingo addition
34 # thomasvs: another nice wingo addition would be an explanation on why
36 SCANOBJ_DEPS = $(top_builddir)/gst/elements/libgstelements.la \
37 $(top_builddir)/gst/schedulers/libgstbasicomegascheduler.la
39 # Header files to ignore when scanning.
42 # Images to copy into HTML directory.
45 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
48 # Other files to distribute.
51 # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
52 # contains GtkObjects/GObjects and you want to document signals and properties.
53 GTKDOC_CFLAGS = $(GST_CFLAGS)
54 GTKDOC_LIBS = $(GST_LIBS) $(SCANOBJ_DEPS)
56 GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
57 GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
59 # If you need to override some of the declarations, place them in this file
60 # and uncomment this line.
61 #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
65 ###########################################################################
66 # Everything below here is generic and you shouldn't need to change it.
67 ###########################################################################
69 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
75 $(DOC_MAIN_SGML_FILE) \
77 # $(DOC_MODULE)-sections.txt
79 DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
80 $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
84 $(DOC_MODULE).hierarchy \
88 all-local: html-build.stamp
93 scan-build.stamp: $(HFILE_GLOB) $(SCANOBJ_DEPS)
94 @echo '*** Scanning header files ***'
95 if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
96 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" $(GTK_DOC_SCANOBJ) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
99 for i in $(SCANOBJ_FILES) ; do \
100 test -f $$i || touch $$i ; \
104 gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
105 touch scan-build.stamp
107 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
112 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
113 @echo '*** Rebuilding template files ***'
114 cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
115 touch tmpl-build.stamp
117 tmpl.stamp: tmpl-build.stamp
122 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB)
123 @echo '*** Building SGML ***'
125 gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
126 touch sgml-build.stamp
128 sgml.stamp: sgml-build.stamp
133 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
134 @echo '*** Building HTML ***'
135 test -d $(srcdir)/html || mkdir $(srcdir)/html
136 cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
137 test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
138 @echo '-- Fixing Crossreferences'
139 cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
140 touch html-build.stamp
144 rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
146 maintainer-clean-local: clean
147 cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
149 # FIXME : thomas added all sgml files and some other things to make
150 # make distcheck work
151 distclean-local: clean
152 rm -rf $(DOC_MODULE)-decl-list.txt
153 rm -rf gstreamer-*.txt
155 rm -f gstreamer.hierarchy
156 rm -f *.stamp || true
159 $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
160 (installfiles=`echo $(srcdir)/html/*.html`; \
161 if test "$$installfiles" = '$(srcdir)/html/*.html'; \
162 then echo '-- Nothing to install' ; \
164 for i in $$installfiles; do \
165 echo '-- Installing '$$i ; \
166 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
168 echo '-- Installing $(srcdir)/html/index.sgml' ; \
169 $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
173 # Require gtk-doc when making dist
179 @echo "*** gtk-doc must be installed and enabled in order to make dist"
183 dist-hook: dist-check-gtkdoc dist-hook-local
184 mkdir $(distdir)/tmpl
185 mkdir $(distdir)/sgml
186 mkdir $(distdir)/html
187 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
188 -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
189 -cp $(srcdir)/html/index.sgml $(distdir)/html
190 -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
192 images=$(HTML_IMAGES) ; \
193 for i in $$images ; do \
194 cp $(srcdir)/$$i $(distdir)/html ; \
197 .PHONY : dist-hook-local