source: trunk/third/gstreamer/docs/libs/Makefile.am @ 21448

Revision 21448, 10.6 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r21447, which included commits to RCS files with non-trunk default branches.
Line 
1## Process this file with automake to produce Makefile.in
2
3# The name of the module, e.g. 'glib'.
4#DOC_MODULE=gstreamer-libs-@GST_MAJORMINOR@
5DOC_MODULE=gstreamer-libs
6
7# for upload.mak
8DOC=gstreamer-libs
9FORMATS=html
10html: html-build.stamp
11include $(srcdir)/../upload.mak
12
13# generated basefiles
14#basefiles = \
15##              $(DOC_MODULE).types \
16#               $(DOC_MODULE)-sections.txt \
17#               $(DOC_MODULE)-docs.sgml
18
19# ugly hack to make -unused.sgml work
20#unused-build.stamp:
21#       BUILDDIR=`pwd` && \
22#       cd $(srcdir)/tmpl && \
23#       ln -sf gstreamer-libs-unused.sgml \
24#               $$BUILDDIR/tmpl/gstreamer-libs-@GST_MAJORMINOR@-unused.sgml
25#       touch unused-build.stamp
26
27# these rules are added to create parallel docs using GST_MAJORMINOR
28#$(basefiles): gstreamer-libs-@GST_MAJORMINOR@%: gstreamer-libs%
29#       cp $< $@
30
31#CLEANFILES = $(basefiles)
32
33# The top-level SGML file. Change it if you want.
34DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
35
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.
39DOC_SOURCE_DIR=$(top_srcdir)/libs/gst
40
41# Extra options to supply to gtkdoc-scan.
42SCAN_OPTIONS=--deprecated-guards="GST_DISABLE_DEPRECATED"
43
44# FIXME :
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)
48
49# Extra options to supply to gtkdoc-mkdb.
50MKDB_OPTIONS=--sgml-mode --ignore-files=trio
51
52# Extra options to supply to gtkdoc-fixref.
53FIXXREF_OPTIONS=--extra-dir=../gst/html
54
55# Used for dependencies.
56HFILE_GLOB=$(DOC_SOURCE_DIR)/*/*.h
57CFILE_GLOB=$(DOC_SOURCE_DIR)/*/*.c
58
59# this is a wingo addition
60# thomasvs: another nice wingo addition would be an explanation on why
61# this is useful ;)
62
63#SCANOBJ_DEPS = $(top_builddir)/gst/elements/libgstelements.la \
64#       $(top_builddir)/gst/schedulers/libgstbasicomegascheduler.la
65SCANOBJ_DEPS = $(top_builddir)/libs/gst/control/libgstcontrol-@GST_MAJORMINOR@.la
66
67# Header files to ignore when scanning.
68IGNORE_HFILES = \
69        gstgetbits_inl.h \
70        dp-private.h
71
72# Images to copy into HTML directory.
73HTML_IMAGES =
74
75# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
76content_files =
77
78# Other files to distribute.
79extra_files =
80
81# CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
82# contains GtkObjects/GObjects and you want to document signals and properties.
83GTKDOC_CFLAGS = $(GST_OBJ_CFLAGS) -I$(top_builddir)
84GTKDOC_LIBS = $(GST_OBJ_LIBS) $(SCANOBJ_DEPS)
85
86GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
87GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
88
89# If you need to override some of the declarations, place them in this file
90# and uncomment this line.
91#DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
92
93
94
95###########################################################################
96# Everything below here is generic and you shouldn't need to change it.
97###########################################################################
98# thomas: except of course that we did
99
100# thomas: copied from glib-2
101# We set GPATH here; this gives us semantics for GNU make
102# which are more like other make's VPATH, when it comes to
103# whether a source that is a target of one rule is then
104# searched for in VPATH/GPATH.
105#
106GPATH = $(srcdir)
107
108TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@
109
110EXTRA_DIST =                            \
111        $(content_files)                \
112        $(extra_files)                  \
113        $(HTML_IMAGES)                  \
114        $(DOC_MAIN_SGML_FILE)           \
115        $(DOC_MODULE).types             \
116        $(DOC_MODULE)-sections.txt
117
118DOC_STAMPS =                            \
119        scan-build.stamp                \
120        tmpl-build.stamp                \
121        sgml-build.stamp                \
122        html-build.stamp                \
123        $(srcdir)/tmpl.stamp            \
124        $(srcdir)/sgml.stamp            \
125        $(srcdir)/html.stamp
126
127SCANOBJ_FILES =                         \
128        $(DOC_MODULE).args              \
129        $(DOC_MODULE).hierarchy         \
130        $(DOC_MODULE).interfaces        \
131        $(DOC_MODULE).prerequisites     \
132        .libs/$(DOC_MODULE)-scan.o      \
133        $(DOC_MODULE).signals
134
135CLEANFILES = $(SCANOBJ_FILES) $(DOC_MODULE)-unused.txt $(DOC_STAMPS)
136
137if HAVE_GTK_DOC
138all-local: html-build.stamp
139
140#### scan ####
141
142# in the case of non-srcdir builds, the built gst directory gets added
143# to gtk-doc scanning; but only then, to avoid duplicates
144scan-build.stamp: $(HFILE_GLOB) $(SCANOBJ_DEPS) $(basefiles)
145        @echo '*** Scanning header files ***'
146        if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null;  \
147        then                                                            \
148            if test x"$(srcdir)" != x. ; then                           \
149                cp $(srcdir)/$(DOC_MODULE).types . ;                    \
150                chmod u+w $(DOC_MODULE).types ;                         \
151            fi ;                                                        \
152            CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)"                         \
153            CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)"          \
154            $(GTK_DOC_SCANOBJ) --type-init-func="gst_init(NULL,NULL)"   \
155                --module=$(DOC_MODULE) ;                                \
156        else                                                            \
157            cd $(srcdir) ;                                              \
158            for i in $(SCANOBJ_FILES) ; do                              \
159               test -f $$i || touch $$i ;                               \
160            done                                                        \
161        fi
162        if test "x$(top_srcdir)" != "x$(top_builddir)";                 \
163        then                                                            \
164          export BUILT_OPTIONS="--source-dir=$(top_builddir)/libs/gst"; \
165        fi;                                                             \
166        gtkdoc-scan                                                     \
167                $(SCAN_OPTIONS) $(EXTRA_HFILES)                         \
168                --module=$(DOC_MODULE)                                  \
169                --source-dir=$(DOC_SOURCE_DIR)                          \
170                $$BUILT_OPTIONS                                         \
171                --ignore-headers="$(IGNORE_HFILES)"
172        touch scan-build.stamp
173
174$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
175        @true
176
177#### templates ####
178
179tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
180        @echo '*** Rebuilding template files ***'
181        if test x"$(srcdir)" != x. ; then \
182            cp $(srcdir)/$(DOC_MODULE)-decl.txt . ; \
183            cp $(srcdir)/$(DOC_MODULE)-sections.txt . ; \
184        fi
185        gtkdoc-mktmpl --module=$(DOC_MODULE)
186        touch tmpl-build.stamp
187
188tmpl.stamp: tmpl-build.stamp
189        @true
190
191#### sgml ####
192
193sgml-build.stamp: tmpl.stamp $(CFILE_GLOB)
194        @echo '*** Building XML ***'
195        gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --main-sgml-file=$(srcdir)/$(DOC_MAIN_SGML_FILE) --output-format=xml $(MKDB_OPTIONS) | tee sgml-build.log
196        @if grep "WARNING:" sgml-build.log > /dev/null; then exit 1; fi
197        rm sgml-build.log
198        touch sgml-build.stamp
199
200sgml.stamp: sgml-build.stamp
201        @true
202
203#### html ####
204
205# FIXME: setting LANG=C is a hack to work with gtk-doc < 1.1, because
206# that forces a non-utf8 locale.  gtk-doc >= 1.1 solves this by calling
207# use bytes; in gtkdoc-fixxref
208html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
209        @echo '*** Building HTML ***'
210        if test -d html; then rm -rf html; fi
211        mkdir html
212        @cp $(srcdir)/$(DOC_MAIN_SGML_FILE) html
213        cp -pr xml html
214        cp ../version.entities html
215        cd html && gtkdoc-mkhtml $(DOC_MODULE) $(DOC_MAIN_SGML_FILE)
216        rm -f html/$(DOC_MAIN_SGML_FILE)
217        rm -rf html/xml
218        rm -f html/version.entities
219        test "x$(HTML_IMAGES)" = "x" || for i in "" $(HTML_IMAGES) ; do \
220            if test "$$i" != ""; then cp $(srcdir)/$$i html ; fi; done
221        @echo '-- Fixing Crossreferences'
222        LANG=C && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
223        touch html-build.stamp
224else
225all-local:
226endif
227
228clean-local:
229        rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
230        rm -rf xml html
231
232maintainer-clean-local: clean
233        cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
234
235# FIXME : thomas added all sgml files and some other things to make
236# make distcheck work
237distclean-local: clean
238        rm -rf $(DOC_MODULE)-decl-list.txt
239        rm -rf $(DOC_MODULE)-decl.txt
240        rm -rf $(DOC_MODULE)-undocumented.txt
241        rm -rf $(DOC_MODULE)-unused.txt
242        rm -rf tmpl/*.sgml.bak
243        rm -f $(DOC_MODULE).hierarchy
244        rm -f *.stamp || true
245        if test x"$(srcdir)" != x. ; then \
246            rm -f $(DOC_MODULE)-docs.sgml ; \
247            rm -f $(DOC_MODULE).types ; \
248            rm -f $(DOC_MODULE).interfaces ; \
249            rm -f $(DOC_MODULE).prerequisites ; \
250            rm -f $(DOC_MODULE)-sections.txt ; \
251            rm -rf tmpl/*.sgml ; \
252        fi
253        rm -f *.o
254
255
256install-data-local:
257        $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
258        (installfiles=`echo ./html/*.html`; \
259        if test "$$installfiles" = './html/*.html'; \
260        then echo '-- Nothing to install' ; \
261        else \
262          for i in $$installfiles; do \
263            echo '-- Installing '$$i ; \
264            $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
265          done; \
266          pngfiles=`echo ./html/*.png`; \
267          if test "$$pngfiles" != './html/*.png'; then \
268            for i in $$pngfiles; do \
269              echo '-- Installing '$$i ; \
270              $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
271            done; \
272          fi; \
273          echo '-- Installing $(srcdir)/html/$(DOC_MODULE).devhelp' ; \
274          $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp \
275            $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
276          echo '-- Installing $(srcdir)/html/index.sgml' ; \
277          $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
278                if test -e $(srcdir)/html/style.css; then \
279                        echo '-- Installing $(srcdir)/html/style.css' ; \
280                        $(INSTALL_DATA) $(srcdir)/html/style.css $(DESTDIR)$(TARGET_DIR); \
281                fi; \
282        fi)
283uninstall-local:
284        (installfiles=`echo ./html/*.html`; \
285        if test "$$installfiles" = './html/*.html'; \
286        then echo '-- Nothing to uninstall' ; \
287        else \
288          for i in $$installfiles; do \
289            rmfile=`basename $$i` ; \
290            echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
291            rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
292          done; \
293          pngfiles=`echo ./html/*.png`; \
294          if test "$$pngfiles" != './html/*.png'; then \
295            for i in $$pngfiles; do \
296              rmfile=`basename $$i` ; \
297              echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
298              rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
299            done; \
300          fi; \
301          echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE).devhelp' ; \
302          rm -f $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
303          echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/index.sgml' ; \
304          rm -f $(DESTDIR)$(TARGET_DIR)/index.sgml; \
305                if test -e $(DESTDIR)$(TARGET_DIR)/style.css; then \
306                        echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/style.css' ; \
307                        rm -f $(DESTDIR)$(TARGET_DIR)/style.css; \
308                fi; \
309        fi)
310        if test -d $(DESTDIR)$(TARGET_DIR); then rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(TARGET_DIR) 2>/dev/null; fi
311
312#
313# Require gtk-doc when making dist
314#
315if HAVE_GTK_DOC
316dist-check-gtkdoc:
317else
318dist-check-gtkdoc:
319        @echo "*** gtk-doc must be installed and enabled in order to make dist"
320        @false
321endif
322
323dist-hook: dist-check-gtkdoc dist-hook-local
324        mkdir $(distdir)/tmpl
325        mkdir $(distdir)/xml
326        mkdir $(distdir)/html
327        -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
328        -cp $(srcdir)/sgml/*.xml $(distdir)/xml
329        -cp $(srcdir)/html/index.sgml $(distdir)/html
330        -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
331        -cp $(srcdir)/html/gstreamer-libs.devhelp $(distdir)/html
332
333        images=$(HTML_IMAGES) ;               \
334        for i in "" $$images ; do                     \
335          if test "$$i" != ""; then cp $(srcdir)/$$i $(distdir)/html ; fi; \
336        done
337
338.PHONY : dist-hook-local
Note: See TracBrowser for help on using the repository browser.