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 SCANOBJ_DEPS = $(top_builddir)/gst/elements/libgstelements.la \
35 $(top_builddir)/gst/schedulers/libgstbasicscheduler.la
37 # Header files to ignore when scanning.
40 # Images to copy into HTML directory.
43 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
46 # Other files to distribute.
49 # CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
50 # contains GtkObjects/GObjects and you want to document signals and properties.
51 GTKDOC_CFLAGS = $(GST_CFLAGS)
52 GTKDOC_LIBS = $(GST_LIBS) $(SCANOBJ_DEPS)
54 GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
55 GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
57 # If you need to override some of the declarations, place them in this file
58 # and uncomment this line.
59 #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
63 ###########################################################################
64 # Everything below here is generic and you shouldn't need to change it.
65 ###########################################################################
67 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
73 $(DOC_MAIN_SGML_FILE) \
75 $(DOC_MODULE)-sections.txt
77 DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
78 $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
82 $(DOC_MODULE).hierarchy \
86 all-local: html-build.stamp
91 scan-build.stamp: $(HFILE_GLOB) $(SCANOBJ_DEPS)
92 @echo '*** Scanning header files ***'
93 if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
94 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" $(GTK_DOC_SCANOBJ) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
97 for i in $(SCANOBJ_FILES) ; do \
98 test -f $$i || touch $$i ; \
102 gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
103 touch scan-build.stamp
105 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
110 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
111 @echo '*** Rebuilding template files ***'
112 cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
113 touch tmpl-build.stamp
115 tmpl.stamp: tmpl-build.stamp
120 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB)
121 @echo '*** Building SGML ***'
123 gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
124 touch sgml-build.stamp
126 sgml.stamp: sgml-build.stamp
131 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
132 @echo '*** Building HTML ***'
133 test -d $(srcdir)/html || mkdir $(srcdir)/html
134 cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
135 test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
136 @echo '-- Fixing Crossreferences'
137 cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
138 touch html-build.stamp
142 rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
144 maintainer-clean-local: clean
145 cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
147 # FIXME : thomas added all sgml files and some other things to make
148 # make distcheck work
149 distclean-local: clean
150 rm -rf $(DOC_MODULE)-decl-list.txt
151 rm -rf gstreamer-*.txt
153 rm -f gstreamer.hierarchy
154 rm -f *.stamp || true
157 $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
158 (installfiles=`echo $(srcdir)/html/*.html`; \
159 if test "$$installfiles" = '$(srcdir)/html/*.html'; \
160 then echo '-- Nothing to install' ; \
162 for i in $$installfiles; do \
163 echo '-- Installing '$$i ; \
164 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
166 echo '-- Installing $(srcdir)/html/index.sgml' ; \
167 $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
171 # Require gtk-doc when making dist
177 @echo "*** gtk-doc must be installed and enabled in order to make dist"
181 dist-hook: dist-check-gtkdoc dist-hook-local
182 mkdir $(distdir)/tmpl
183 mkdir $(distdir)/sgml
184 mkdir $(distdir)/html
185 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
186 -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
187 -cp $(srcdir)/html/index.sgml $(distdir)/html
188 -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
190 images=$(HTML_IMAGES) ; \
191 for i in $$images ; do \
192 cp $(srcdir)/$$i $(distdir)/html ; \
195 .PHONY : dist-hook-local