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 # $(shell echo $(top_builddir)/gst/autoplug/*.la) \
55 # $(top_builddir)/gst/types/libgsttypes.la \
57 GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
58 GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
60 # If you need to override some of the declarations, place them in this file
61 # and uncomment this line.
62 #DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
66 ###########################################################################
67 # Everything below here is generic and you shouldn't need to change it.
68 ###########################################################################
70 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
76 $(DOC_MAIN_SGML_FILE) \
78 $(DOC_MODULE)-sections.txt
80 DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
81 $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
85 $(DOC_MODULE).hierarchy \
89 all-local: html-build.stamp
94 scan-build.stamp: $(HFILE_GLOB) $(SCANOBJ_DEPS)
95 @echo '*** Scanning header files ***'
96 if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
97 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" $(GTK_DOC_SCANOBJ) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
100 for i in $(SCANOBJ_FILES) ; do \
101 test -f $$i || touch $$i ; \
105 gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
106 touch scan-build.stamp
108 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
113 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
114 @echo '*** Rebuilding template files ***'
115 cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
116 touch tmpl-build.stamp
118 tmpl.stamp: tmpl-build.stamp
123 sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
124 @echo '*** Building SGML ***'
126 gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
127 touch sgml-build.stamp
129 sgml.stamp: sgml-build.stamp
134 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
135 @echo '*** Building HTML ***'
136 test -d $(srcdir)/html || mkdir $(srcdir)/html
137 cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
138 test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
139 @echo '-- Fixing Crossreferences'
140 cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
141 touch html-build.stamp
145 rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
147 maintainer-clean-local: clean
148 cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
150 # FIXME : thomas added all sgml files and some other things to make
151 # make distcheck work
152 distclean-local: clean
153 rm -rf $(DOC_MODULE)-decl-list.txt
154 rm -rf gstreamer-*.txt
156 rm -f gstreamer.hierarchy
157 rm -f *.stamp || true
160 $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
161 (installfiles=`echo $(srcdir)/html/*.html`; \
162 if test "$$installfiles" = '$(srcdir)/html/*.html'; \
163 then echo '-- Nothing to install' ; \
165 for i in $$installfiles; do \
166 echo '-- Installing '$$i ; \
167 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
169 echo '-- Installing $(srcdir)/html/index.sgml' ; \
170 $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
174 # Require gtk-doc when making dist
180 @echo "*** gtk-doc must be installed and enabled in order to make dist"
184 dist-hook: dist-check-gtkdoc dist-hook-local
185 mkdir $(distdir)/tmpl
186 mkdir $(distdir)/sgml
187 mkdir $(distdir)/html
188 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
189 -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
190 -cp $(srcdir)/html/index.sgml $(distdir)/html
191 -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
193 images=$(HTML_IMAGES) ; \
194 for i in $$images ; do \
195 cp $(srcdir)/$$i $(distdir)/html ; \
198 .PHONY : dist-hook-local