2
2
# for GStreamer plug-ins
5
6
@echo "If you are a doc maintainer, run 'make update' to update"
6
7
@echo "the documentation files maintained in CVS"
9
@echo Other useful make targets:
11
@echo check-inspected-versions: make sure the inspected plugin info
12
@echo is up to date before a release
8
15
# update the stuff maintained by doc maintainers
17
$(MAKE) inspect-update
18
$(MAKE) scanobj-update
13
20
# We set GPATH here; this gives us semantics for GNU make
14
21
# which are more like other make's VPATH, when it comes to
70
77
$(DOC_MODULE)-decl.txt \
71
78
$(DOC_MODULE)-decl-list.txt
82
$(DOC_MODULE)-undocumented.txt \
83
$(DOC_MODULE)-undeclared.txt \
84
$(DOC_MODULE)-unused.txt
86
# FC3 seems to need -scan.c to be part of CLEANFILES for distcheck
87
# no idea why FC4 can do without
90
$(DOC_MODULE)-scan.c \
74
97
all-local: html-build.stamp
76
99
#### scan gobjects; done by documentation maintainer ####
78
101
-rm scanobj-build.stamp
79
make scanobj-build.stamp
102
$(MAKE) scanobj-build.stamp
81
104
# in the case of non-srcdir builds, the built gst directory gets added
82
105
# to gtk-doc scanning; but only then, to avoid duplicates
96
119
$(INSPECT_ENVIRONMENT) \
97
CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" \
98
CFLAGS="-g $(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" \
120
CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" \
121
CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" \
122
LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
99
123
$(GST_DOC_SCANOBJ) --type-init-func="gst_init(NULL,NULL)" \
100
124
--module=$(DOC_MODULE) --source=$(PACKAGE) && \
112
136
INSPECT_REGISTRY=$(top_builddir)/docs/plugins/inspect-registry.xml
113
137
INSPECT_ENVIRONMENT=\
114
138
GST_PLUGIN_SYSTEM_PATH= \
115
GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/sys:$(top_builddir)/ext:$(top_builddir)/plugins:$(top_builddir)/src \
139
GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/sys:$(top_builddir)/ext:$(top_builddir)/plugins:$(top_builddir)/src:$(top_builddir)/gnl \
116
140
GST_REGISTRY=$(INSPECT_REGISTRY)
118
142
# update the element and plugin XML descriptions; store in inspect/
122
146
inspect-update: inspect
123
-rm $(INSPECT_REGISTRY)
124
-rm inspect-build.stamp
125
make inspect-build.stamp
147
-rm -f $(INSPECT_REGISTRY) inspect-build.stamp
148
$(MAKE) inspect-build.stamp
127
150
# FIXME: inspect.stamp should be written to by gst-xmlinspect.py
128
# IFF the output changed; see gtkdoc-mktmpl
151
# IF the output changed; see gtkdoc-mktmpl
129
152
inspect-build.stamp:
130
153
@echo '*** Rebuilding plugin inspection files ***'
131
154
if test x"$(srcdir)" != x. ; then \
217
240
@if grep "warning:" html-build.log > /dev/null; then \
218
241
echo "ERROR"; grep "warning:" html-build.log; exit 1; fi
219
242
@rm html-build.log
243
mv html/index.sgml html/index.sgml.bak
244
$(SED) "s/ href=\"$(DOC_MODULE)\// href=\"$(DOC_MODULE)-@GST_MAJORMINOR@\//g" html/index.sgml.bak >html/index.sgml
245
rm -f html/index.sgml.bak
220
246
rm -f html/$(DOC_MAIN_SGML_FILE)
222
248
rm -f html/version.entities
225
251
@echo '-- Fixing Crossreferences'
226
252
gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
227
253
touch html-build.stamp
257
# clean files copied for nonsrcdir templates build
258
if test x"$(srcdir)" != x. ; then \
259
rm -rf $(SCANOBJ_FILES) $(SCAN_FILES); \
232
# FC3 seems to need -scan.c to be part of CLEANFILES for distcheck
233
# no idea why FC4 can do without
236
$(DOC_MODULE)-scan.c \
237
$(DOC_MODULE)-unused.txt \
241
# FIXME: these rules need a little cleaning up
266
clean-local: clean-local-gtkdoc
245
# clean files generated for tmpl build
247
# clean files copied/generated for nonsrcdir tmpl build
248
if test x"$(srcdir)" != x. ; then \
249
rm -rf $(SCANOBJ_FILES) $(SCAN_FILES); \
251
# clean files generated for xml build
253
# clean files generate for html build
256
270
distclean-local: clean
257
271
rm -rf tmpl/*.sgml.bak
258
rm -f *.stamp || true
274
MAINTAINERCLEANFILES = $(MAINTAINER_DOC_STAMPS)
261
276
# thomas: make docs parallel installable; devhelp requires majorminor too
262
277
install-data-local:
263
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
264
(installfiles=`echo ./html/*.html`; \
265
if test "$$installfiles" = './html/*.html'; \
278
(installfiles=`echo $(srcdir)/html/*.sgml $(srcdir)/html/*.html $(srcdir)/html/*.png $(srcdir)/html/*.css`; \
279
if test "$$installfiles" = '$(srcdir)/html/*.sgml $(srcdir)/html/*.html $(srcdir)/html/*.png $(srcdir)/html/*.css'; \
266
280
then echo '-- Nothing to install' ; \
282
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \
268
283
for i in $$installfiles; do \
269
284
echo '-- Installing '$$i ; \
270
285
$(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
279
294
echo '-- Installing $(srcdir)/html/$(DOC_MODULE).devhelp' ; \
280
295
$(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp \
281
296
$(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
282
echo '-- Installing $(srcdir)/html/index.sgml' ; \
283
$(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
284
if test -e $(srcdir)/html/style.css; then \
285
echo '-- Installing $(srcdir)/html/style.css' ; \
286
$(INSTALL_DATA) $(srcdir)/html/style.css $(DESTDIR)$(TARGET_DIR); \
297
if test -e $(srcdir)/html/$(DOC_MODULE).devhelp2; then \
298
$(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp2 \
299
$(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; \
301
(which gtkdoc-rebase >/dev/null && \
302
gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR)) || true ; \
290
(installfiles=`echo ./html/*.html`; \
291
if test "$$installfiles" = './html/*.html'; \
292
then echo '-- Nothing to uninstall' ; \
305
if test -d $(DESTDIR)$(TARGET_DIR); then \
306
rm -rf $(DESTDIR)$(TARGET_DIR)/*; \
307
rmdir -p $(DESTDIR)$(TARGET_DIR) 2>/dev/null || true; \
294
for i in $$installfiles; do \
295
rmfile=`basename $$i` ; \
296
echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
297
rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
299
pngfiles=`echo ./html/*.png`; \
300
if test "$$pngfiles" != './html/*.png'; then \
301
for i in $$pngfiles; do \
302
rmfile=`basename $$i` ; \
303
echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
304
rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
307
echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE).devhelp' ; \
308
rm -f $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
309
echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/index.sgml' ; \
310
rm -f $(DESTDIR)$(TARGET_DIR)/index.sgml; \
311
if test -e $(DESTDIR)$(TARGET_DIR)/style.css; then \
312
echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/style.css' ; \
313
rm -f $(DESTDIR)$(TARGET_DIR)/style.css; \
316
if test -d $(DESTDIR)$(TARGET_DIR); then rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(TARGET_DIR) 2>/dev/null; fi; true
309
echo '-- Nothing to uninstall' ; \
327
321
check: check-hierarchy
323
# wildcard is apparently not portable to other makes, hence the use of find
324
inspect_files = $(shell find $(srcdir)/inspect -name '*.xml')
326
check-inspected-versions:
327
@echo Checking plugin versions of inspected plugin data ...; \
329
for each in $(inspect_files) ; do \
330
if (grep -H '<version>' $$each | grep -v '<version>$(VERSION)'); then \
331
echo $$each should be fixed to say version $(VERSION) or be removed ; \
332
echo "sed -i -e 's/<version.*version>/<version>$(VERSION)<\/version>/'" $$each; \
331
340
# Require gtk-doc when making dist
341
350
# FIXME: decide whether we want to dist generated html or not
342
351
dist-hook: dist-check-gtkdoc dist-hook-local
343
mkdir $(distdir)/tmpl
345
352
mkdir $(distdir)/html
346
-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
347
-cp $(srcdir)/sgml/*.xml $(distdir)/xml
348
-cp $(srcdir)/html/index.sgml $(distdir)/html
349
-cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
350
-cp $(srcdir)/html/$(DOC_MODULE).devhelp $(distdir)/html
352
images=$(HTML_IMAGES) ; \
353
for i in "" $$images ; do \
354
if test "$$i" != ""; then cp $(srcdir)/$$i $(distdir)/html ; fi; \
357
.PHONY : dist-hook-local
353
cp $(srcdir)/html/* $(distdir)/html
354
-cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
355
-cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
356
cd $(distdir) && rm -f $(DISTCLEANFILES)
357
-gtkdoc-rebase --online --relative --html-dir=$(distdir)/html
359
.PHONY : dist-hook-local docs