1 From 1de7f6ab2d4bc1af69f06079cf0f4e2cbbfdc178 Mon Sep 17 00:00:00 2001
2 From: Stefan Kost <ensonic@users.sf.net>
3 Date: Mon, 14 Feb 2011 12:48:23 +0200
4 Subject: [PATCH] plugin-docs: add a proper disclean rules
6 Sync the dist clean rules with gtk-doc.m4. We need them e.g. in gst-plugins-bad
7 where we have also libs/interfaces.
9 gtk-doc-plugins.mak | 13 +++++++++++++
10 1 file changed, 13 insertions(+)
12 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
13 index 0fad6dd..4f5ea46 100644
14 --- a/gtk-doc-plugins.mak
15 +++ b/gtk-doc-plugins.mak
16 @@ -245,7 +245,20 @@ clean-local: clean-local-gtkdoc
20 + rm -f $(REPORT_FILES) \
21 + $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
22 rm -rf tmpl/*.sgml.bak
23 + rm -f $(DOC_MODULE).hierarchy
24 + rm -f *.stamp || true
25 + if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
26 + rm -f $(DOC_MODULE)-docs.sgml ; \
27 + rm -f $(DOC_MODULE).types ; \
28 + rm -f $(DOC_MODULE).interfaces ; \
29 + rm -f $(DOC_MODULE)-overrides.txt ; \
30 + rm -f $(DOC_MODULE).prerequisites ; \
31 + rm -f $(DOC_MODULE)-sections.txt ; \
32 + rm -rf tmpl/*.sgml ; \
36 MAINTAINERCLEANFILES = $(MAINTAINER_DOC_STAMPS)
37 From 082cc2d54e10d1f868a3581c5bc8fc8dfe002bdc Mon Sep 17 00:00:00 2001
38 From: Stefan Kost <ensonic@users.sf.net>
39 Date: Thu, 24 Mar 2011 18:15:34 +0200
40 Subject: [PATCH] plugin-docs: don't hardcode the inspect dir all over the
44 gtk-doc-plugins.mak | 11 ++++++-----
45 1 file changed, 6 insertions(+), 5 deletions(-)
47 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
48 index 4f5ea46..177b009 100644
49 --- a/gtk-doc-plugins.mak
50 +++ b/gtk-doc-plugins.mak
51 @@ -88,6 +88,7 @@ CLEANFILES = \
55 +INSPECT_DIR = inspect
58 all-local: html-build.stamp
59 @@ -105,7 +106,7 @@ INSPECT_ENVIRONMENT=\
61 # update the element and plugin XML descriptions; store in inspect/
64 + @-mkdir -p $(INSPECT_DIR)
66 #### scan gobjects; done by documentation maintainer ####
68 @@ -132,7 +133,7 @@ scanobj-build.stamp: $(SCANOBJ_DEPS) $(basefiles) inspect
69 CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS) $(WARNING_CFLAGS)" \
70 LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
71 $(GST_DOC_SCANOBJ) --type-init-func="gst_init(NULL,NULL)" \
72 - --module=$(DOC_MODULE) --source=$(PACKAGE) --inspect-dir="inspect" && \
73 + --module=$(DOC_MODULE) --source=$(PACKAGE) --inspect-dir=$(INSPECT_DIR) && \
75 $(top_srcdir)/common/scangobj-merge.py $(DOC_MODULE); \
77 @@ -170,7 +171,7 @@ tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections
79 gtkdoc-mktmpl --module=$(DOC_MODULE) | tee tmpl-build.log
81 - $(top_srcdir)/common/mangle-tmpl.py $(srcdir)/inspect tmpl
82 + $(top_srcdir)/common/mangle-tmpl.py $(srcdir)/$(INSPECT_DIR) tmpl
83 @cat $(DOC_MODULE)-unused.txt
85 touch tmpl-build.stamp
86 @@ -184,7 +185,7 @@ tmpl.stamp: tmpl-build.stamp
87 sgml-build.stamp: tmpl.stamp scan-build.stamp $(CFILE_GLOB) $(top_srcdir)/common/plugins.xsl $(expand_content_files)
88 @echo '*** Building XML ***'
90 - @for a in $(srcdir)/inspect/*.xml; do \
91 + @for a in $(srcdir)/$(INSPECT_DIR)/*.xml; do \
92 xsltproc --stringparam module $(MODULE) \
93 $(top_srcdir)/common/plugins.xsl $$a > xml/`basename $$a`; done
94 @for f in $(EXAMPLE_CFILES); do \
95 @@ -311,7 +312,7 @@ check-hierarchy: $(DOC_MODULE).hierarchy
96 check: check-hierarchy
98 # wildcard is apparently not portable to other makes, hence the use of find
99 -inspect_files = $(shell find $(srcdir)/inspect -name '*.xml')
100 +inspect_files = $(shell find $(srcdir)/$(INSPECT_DIR) -name '*.xml')
102 check-inspected-versions:
103 @echo Checking plugin versions of inspected plugin data ...; \
104 From 892f89ec16bb5567b5b3ff4c9650c383bf915943 Mon Sep 17 00:00:00 2001
105 From: Stefan Kost <ensonic@users.sf.net>
106 Date: Thu, 24 Mar 2011 18:19:09 +0200
107 Subject: [PATCH] plugin-docs: set neutral local to minimize changes
110 gtk-doc-plugins.mak | 1 +
111 1 file changed, 1 insertion(+)
113 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
114 index 177b009..5fd05d3 100644
115 --- a/gtk-doc-plugins.mak
116 +++ b/gtk-doc-plugins.mak
117 @@ -98,6 +98,7 @@ all-local: html-build.stamp
118 # only look at the plugins in this module when building inspect .xml stuff
119 INSPECT_REGISTRY=$(top_builddir)/docs/plugins/inspect-registry.xml
120 INSPECT_ENVIRONMENT=\
122 GST_PLUGIN_SYSTEM_PATH= \
123 GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/sys:$(top_builddir)/ext:$(top_builddir)/plugins:$(top_builddir)/src:$(top_builddir)/gnl \
124 GST_REGISTRY=$(INSPECT_REGISTRY) \
125 From 2c5887e800d4e7df74fe526a22a48a7eb8d26aa0 Mon Sep 17 00:00:00 2001
126 From: Stefan Kost <ensonic@users.sf.net>
127 Date: Thu, 24 Mar 2011 18:20:16 +0200
128 Subject: [PATCH] plugin-docs: remove -undocumented from scan files
130 It is a report file. Clear the report files in addition instead.
132 gtk-doc-plugins.mak | 4 ++--
133 1 file changed, 2 insertions(+), 2 deletions(-)
135 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
136 index 5fd05d3..6539d67 100644
137 --- a/gtk-doc-plugins.mak
138 +++ b/gtk-doc-plugins.mak
139 @@ -69,7 +69,6 @@ SCANOBJ_FILES_O = \
141 $(DOC_MODULE)-sections.txt \
142 $(DOC_MODULE)-overrides.txt \
143 - $(DOC_MODULE)-undocumented.txt \
144 $(DOC_MODULE)-decl.txt \
145 $(DOC_MODULE)-decl-list.txt
147 @@ -235,7 +234,8 @@ clean-local-gtkdoc:
149 # clean files copied for nonsrcdir templates build
150 if test x"$(srcdir)" != x. ; then \
151 - rm -rf $(SCANOBJ_FILES) $(SCAN_FILES) $(MAINTAINER_DOC_STAMPS); \
152 + rm -rf $(SCANOBJ_FILES) $(SCAN_FILES) $(REPORT_FILES) \
153 + $(MAINTAINER_DOC_STAMPS); \
157 commit d6e3fe913375e82a83fbc3fbdf8b26b8ce8bf97c
158 Author: Stefan Kost <ensonic@users.sf.net>
159 Date: Thu Mar 24 11:35:09 2011 +0200
161 spelling: fix spelling in comment and message
163 diff --git a/mangle-tmpl.py b/mangle-tmpl.py
164 index 76ca1f5..bd4f948 100644
167 @@ -8,7 +8,7 @@ insert/overwrite Short Description and Long Description
169 # FIXME: right now it uses pygst and scans on its own;
170 # we really should use inspect/*.xml instead since the result of
171 -# gst-xmlinspect.py is commited by the docs maintainer, who can be
172 +# gst-xmlinspect.py is committed by the docs maintainer, who can be
173 # expected to have pygst, but this step should be done for every docs build,
174 # so no pygst allowed
176 diff --git a/scangobj-merge.py b/scangobj-merge.py
177 index 51660ea..4e8f870 100755
178 --- a/scangobj-merge.py
179 +++ b/scangobj-merge.py
180 @@ -261,7 +261,7 @@ def main(argv):
184 - sys.stderr.write('Pleae provide a documentation module name\n')
185 + sys.stderr.write('Please provide a documentation module name\n')
188 print "Merging scangobj output for %s" % modulename
189 commit b3fd32a3f3a09d193bffc80c4e5d75b082b26545
190 Author: Stefan Kost <ensonic@users.sf.net>
191 Date: Thu Mar 24 18:22:14 2011 +0200
193 plugin-docs: update comments
195 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
196 index 6539d67..4794cbd 100644
197 --- a/gtk-doc-plugins.mak
198 +++ b/gtk-doc-plugins.mak
199 @@ -113,10 +113,6 @@ scanobj-update:
200 -rm scanobj-build.stamp
201 $(MAKE) scanobj-build.stamp
203 -# in the case of non-srcdir builds, the built gst directory gets added
204 -# to gtk-doc scanning; but only then, to avoid duplicates
205 -# FIXME: since we don't have the scan step as part of the build anymore,
206 -# we could remove that
207 # TODO: finish elite script that updates the output files of this step
208 # instead of rewriting them, so that multiple maintainers can generate
209 # a collective set of args and signals
210 @@ -158,7 +154,7 @@ scan-build.stamp: $(HFILE_GLOB) $(EXTRA_HFILES) $(basefiles) scanobj-build.stamp
212 #### update templates; done on every build ####
214 -### FIXME: make this error out again when docs are fixed for 0.9
215 +### FIXME: make this error out again when docs are fixed for 0.X
216 # in a non-srcdir build, we need to copy files from the previous step
217 # and the files from previous runs of this step
218 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
219 commit c8568952b85ce51ff78779b8615d64267754c816
220 Author: Stefan Kost <ensonic@users.sf.net>
221 Date: Thu Mar 24 18:23:15 2011 +0200
223 plugin-docs: use the DOC_SOURCE_DIR from Makefile.am instead of an arbitrary one
225 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
226 index 4794cbd..176236d 100644
227 --- a/gtk-doc-plugins.mak
228 +++ b/gtk-doc-plugins.mak
229 @@ -140,15 +140,11 @@ $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(SCANOBJ_FILES_O): scan-build.stamp
231 ### scan headers; done on every build ###
232 scan-build.stamp: $(HFILE_GLOB) $(EXTRA_HFILES) $(basefiles) scanobj-build.stamp
233 - if test "x$(top_srcdir)" != "x$(top_builddir)" && \
234 - test -d "$(top_builddir)/gst"; \
236 - export BUILT_OPTIONS="--source-dir=$(top_builddir)/gst"; \
238 + @echo '*** Scanning header files ***'
240 $(SCAN_OPTIONS) $(EXTRA_HFILES) \
241 --module=$(DOC_MODULE) \
243 + --source-dir=$(DOC_SOURCE_DIR) \
244 --ignore-headers="$(IGNORE_HFILES)"; \
245 touch scan-build.stamp
247 commit 614d05e43e1f18bbe78f6ac9109446a53dda556b
248 Author: Stefan Kost <ensonic@users.sf.net>
249 Date: Thu Mar 24 18:24:03 2011 +0200
251 plugin-docs: add 'inpsect' target to phony
253 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
254 index 176236d..01ba4f9 100644
255 --- a/gtk-doc-plugins.mak
256 +++ b/gtk-doc-plugins.mak
257 @@ -366,7 +366,7 @@ dist-hook: dist-check-gtkdoc dist-hook-local
258 cd $(distdir) && rm -f $(DISTCLEANFILES)
259 -gtkdoc-rebase --online --relative --html-dir=$(distdir)/html
261 -.PHONY : dist-hook-local docs check-outdated-docs
262 +.PHONY : dist-hook-local docs check-outdated-docs inspect
264 # avoid spurious build errors when distchecking with -jN
266 commit eea0633818502584d7d5e920f317415ac5372473
267 Author: Stefan Kost <ensonic@users.sf.net>
268 Date: Thu Mar 24 18:38:28 2011 +0200
270 plugin-docs: be less noisy
272 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
273 index 01ba4f9..88db415 100644
274 --- a/gtk-doc-plugins.mak
275 +++ b/gtk-doc-plugins.mak
276 @@ -155,7 +155,7 @@ scan-build.stamp: $(HFILE_GLOB) $(EXTRA_HFILES) $(basefiles) scanobj-build.stamp
277 # and the files from previous runs of this step
278 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
279 @echo '*** Rebuilding template files ***'
280 - if test x"$(srcdir)" != x. ; then \
281 + @if test x"$(srcdir)" != x. ; then \
282 for f in $(SCANOBJ_FILES) $(SCAN_FILES); \
284 if test -e $(srcdir)/$$f; then cp $(srcdir)/$$f . ; fi; \
285 @@ -165,7 +165,7 @@ tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections
287 $(top_srcdir)/common/mangle-tmpl.py $(srcdir)/$(INSPECT_DIR) tmpl
288 @cat $(DOC_MODULE)-unused.txt
289 - rm -f tmpl-build.log
290 + @rm -f tmpl-build.log
291 touch tmpl-build.stamp
293 tmpl.stamp: tmpl-build.stamp
294 commit 6aaa286970e59ed89bd69544f2ee10551f377cb6
295 Author: Stefan Kost <ensonic@users.sf.net>
296 Date: Thu Mar 24 18:38:55 2011 +0200
298 plugin-docs: also allow updating docs in out-of-srcdir setup
300 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
301 index 88db415..a1d81ba 100644
302 --- a/gtk-doc-plugins.mak
303 +++ b/gtk-doc-plugins.mak
304 @@ -118,21 +118,26 @@ scanobj-update:
305 # a collective set of args and signals
306 scanobj-build.stamp: $(SCANOBJ_DEPS) $(basefiles) inspect
307 @echo '*** Scanning GObjects ***'
308 + @if test x"$(srcdir)" != x. ; then \
309 + for f in $(SCANOBJ_FILES) $(SCAN_FILES); \
311 + cp $(srcdir)/$$f . ; \
314 + $(INSPECT_ENVIRONMENT) \
315 + CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" \
316 + CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS) $(WARNING_CFLAGS)" \
317 + LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
318 + $(GST_DOC_SCANOBJ) --type-init-func="gst_init(NULL,NULL)" \
319 + --module=$(DOC_MODULE) --source=$(PACKAGE) --inspect-dir=$(INSPECT_DIR) && \
321 + $(top_srcdir)/common/scangobj-merge.py $(DOC_MODULE); \
322 if test x"$(srcdir)" != x. ; then \
323 for f in $(SCANOBJ_FILES); \
325 - cp $(srcdir)/$$f . ; \
326 + cmp -s ./$$f $(srcdir)/$$f || cp ./$$f $(srcdir)/ ; \
329 - $(INSPECT_ENVIRONMENT) \
330 - CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" \
331 - CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS) $(WARNING_CFLAGS)" \
332 - LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
333 - $(GST_DOC_SCANOBJ) --type-init-func="gst_init(NULL,NULL)" \
334 - --module=$(DOC_MODULE) --source=$(PACKAGE) --inspect-dir=$(INSPECT_DIR) && \
336 - $(top_srcdir)/common/scangobj-merge.py $(DOC_MODULE); \
339 touch scanobj-build.stamp
341 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(SCANOBJ_FILES_O): scan-build.stamp
342 @@ -158,7 +163,7 @@ tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections
343 @if test x"$(srcdir)" != x. ; then \
344 for f in $(SCANOBJ_FILES) $(SCAN_FILES); \
346 - if test -e $(srcdir)/$$f; then cp $(srcdir)/$$f . ; fi; \
347 + if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi; \
350 gtkdoc-mktmpl --module=$(DOC_MODULE) | tee tmpl-build.log
351 commit 193b7176e61160d78a967884f1b20af76d1c7379
352 Author: Stefan Kost <ensonic@users.sf.net>
353 Date: Fri Mar 25 14:51:45 2011 +0200
355 distcheck: fix distcheck
357 Clean inspect files. Don't leave *{args,signals}.new files.
359 diff --git a/gstdoc-scangobj b/gstdoc-scangobj
360 index f6b6ffe..e7a0f76 100755
361 --- a/gstdoc-scangobj
362 +++ b/gstdoc-scangobj
363 @@ -1563,9 +1563,9 @@ if (!defined($ENV{"GTK_DOC_KEEP_INTERMEDIATE"})) {
366 #&UpdateFileIfChanged ($old_signals_filename, $new_signals_filename, 0);
367 +unlink $new_signals_filename;
368 &UpdateFileIfChanged ($old_hierarchy_filename, $new_hierarchy_filename, 0);
369 &UpdateFileIfChanged ($old_interfaces_filename, $new_interfaces_filename, 0);
370 &UpdateFileIfChanged ($old_prerequisites_filename, $new_prerequisites_filename, 0);
371 #&UpdateFileIfChanged ($old_args_filename, $new_args_filename, 0);
374 +unlink $new_args_filename;
375 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
376 index a1d81ba..0c0019c 100644
377 --- a/gtk-doc-plugins.mak
378 +++ b/gtk-doc-plugins.mak
379 @@ -121,7 +121,7 @@ scanobj-build.stamp: $(SCANOBJ_DEPS) $(basefiles) inspect
380 @if test x"$(srcdir)" != x. ; then \
381 for f in $(SCANOBJ_FILES) $(SCAN_FILES); \
383 - cp $(srcdir)/$$f . ; \
384 + if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi; \
387 $(INSPECT_ENVIRONMENT) \
388 @@ -163,7 +163,7 @@ tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections
389 @if test x"$(srcdir)" != x. ; then \
390 for f in $(SCANOBJ_FILES) $(SCAN_FILES); \
392 - if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi; \
393 + if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi; \
396 gtkdoc-mktmpl --module=$(DOC_MODULE) | tee tmpl-build.log
397 @@ -257,6 +257,7 @@ distclean-local:
398 rm -f $(DOC_MODULE).prerequisites ; \
399 rm -f $(DOC_MODULE)-sections.txt ; \
400 rm -rf tmpl/*.sgml ; \
401 + rm -rf $(INSPECT_DIR); \
405 commit c3cafe123f3a363d337a29ad32fdd6d3631f52c0
406 Author: Stefan Kost <ensonic@users.sf.net>
407 Date: Mon Apr 4 15:36:58 2011 +0300
409 gtk-doc-plugins.mak: don't cat the ununsed symbols
411 This is very noisy, we can check this during make check and anyway this list is
412 avavilable in the report file. Was introduced with commit 9a5025a2.
414 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
415 index c0ff7b3..ca6a351 100644
416 --- a/gtk-doc-plugins.mak
417 +++ b/gtk-doc-plugins.mak
418 @@ -169,7 +169,6 @@ tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections
419 gtkdoc-mktmpl --module=$(DOC_MODULE) | tee tmpl-build.log
421 $(top_srcdir)/common/mangle-tmpl.py $(srcdir)/$(INSPECT_DIR) tmpl
422 - @cat $(DOC_MODULE)-unused.txt
423 @rm -f tmpl-build.log
424 touch tmpl-build.stamp
426 commit 7d0f44aebde4240464c22f919a207194461b36bb
427 Author: Stefan Kost <ensonic@users.sf.net>
428 Date: Mon May 2 13:54:58 2011 +0300
430 gtk-doc.mak: remove non-sense setup.stamp and use setup-build.stamp
432 In gtk-doc some tools producs .stamp where the makefile rules produce -build.stamp.
434 diff --git a/gtk-doc.mak b/gtk-doc.mak
435 index 91edeee..70f0a9b 100644
438 @@ -28,7 +28,6 @@ DOC_STAMPS = \
446 @@ -52,7 +51,7 @@ all-local: html-build.stamp
450 -setup.stamp: $(content_files)
451 +setup-build.stamp: $(content_files)
452 -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
453 cp -p $(abs_srcdir)/$(DOC_MAIN_SGML_FILE) \
454 $(abs_srcdir)/$(DOC_MODULE)-overrides.txt \
455 @@ -66,7 +65,7 @@ setup.stamp: $(content_files)
460 + @touch setup-build.stamp
464 @@ -108,7 +107,7 @@ $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)
467 ### FIXME: make this error out again when docs are complete
468 -sgml-build.stamp: setup.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(expand_content_files)
469 +sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(expand_content_files)
470 @echo '*** Building XML ***'
471 gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) --output-format=xml $(MKDB_OPTIONS) | tee sgml-build.log
472 @if grep "WARNING:" sgml-build.log > /dev/null; then true; fi # exit 1; fi
473 commit daf0b077ae954cb07e7809176886383f0aeca8cf
474 Author: Stefan Kost <ensonic@users.sf.net>
475 Date: Mon May 2 14:22:53 2011 +0300
477 gtk-doc*.mak: be a lot less noisy when building the docs.
479 Don't echo the command we run.
481 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
482 index ca6a351..0286e84 100644
483 --- a/gtk-doc-plugins.mak
484 +++ b/gtk-doc-plugins.mak
485 @@ -146,7 +146,7 @@ $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(SCANOBJ_FILES_O): scan-build.stamp
486 ### scan headers; done on every build ###
487 scan-build.stamp: $(HFILE_GLOB) $(EXTRA_HFILES) $(basefiles) scanobj-build.stamp
488 @echo '*** Scanning header files ***'
491 $(SCAN_OPTIONS) $(EXTRA_HFILES) \
492 --module=$(DOC_MODULE) \
493 --source-dir=$(DOC_SOURCE_DIR) \
494 @@ -166,11 +166,11 @@ tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections
495 if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi; \
498 - gtkdoc-mktmpl --module=$(DOC_MODULE) | tee tmpl-build.log
500 + @gtkdoc-mktmpl --module=$(DOC_MODULE) | tee tmpl-build.log
502 $(top_srcdir)/common/mangle-tmpl.py $(srcdir)/$(INSPECT_DIR) tmpl
503 @rm -f tmpl-build.log
504 - touch tmpl-build.stamp
505 + @touch tmpl-build.stamp
507 tmpl.stamp: tmpl-build.stamp
509 @@ -186,7 +186,7 @@ sgml-build.stamp: tmpl.stamp scan-build.stamp $(CFILE_GLOB) $(top_srcdir)/common
510 $(top_srcdir)/common/plugins.xsl $$a > xml/`basename $$a`; done
511 @for f in $(EXAMPLE_CFILES); do \
512 $(PYTHON) $(top_srcdir)/common/c-to-xml.py $$f > xml/element-`basename $$f .c`.xml; done
515 --module=$(DOC_MODULE) \
516 --source-dir=$(DOC_SOURCE_DIR) \
517 --expand-content-files="$(expand_content_files)" \
518 @@ -196,9 +196,9 @@ sgml-build.stamp: tmpl.stamp scan-build.stamp $(CFILE_GLOB) $(top_srcdir)/common
521 @if grep "WARNING:" sgml-build.log > /dev/null; then true; fi # exit 1; fi
522 - cp ../version.entities xml
524 - touch sgml-build.stamp
525 + @cp ../version.entities xml
527 + @touch sgml-build.stamp
529 sgml.stamp: sgml-build.stamp
531 @@ -207,29 +207,29 @@ sgml.stamp: sgml-build.stamp
533 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
534 @echo '*** Building HTML ***'
535 - if test -d html; then rm -rf html; fi
537 - cp $(srcdir)/$(DOC_MAIN_SGML_FILE) html
538 + @if test -d html; then rm -rf html; fi
540 + @cp $(srcdir)/$(DOC_MAIN_SGML_FILE) html
541 @for f in $(content_files); do cp $(srcdir)/$$f html; done
543 - cp ../version.entities html
544 - cd html && gtkdoc-mkhtml $(DOC_MODULE) $(DOC_MAIN_SGML_FILE)
545 - mv html/index.sgml html/index.sgml.bak
546 - $(SED) "s/ href=\"$(DOC_MODULE)\// href=\"$(DOC_MODULE)-@GST_MAJORMINOR@\//g" html/index.sgml.bak >html/index.sgml
547 - rm -f html/index.sgml.bak
548 - rm -f html/$(DOC_MAIN_SGML_FILE)
550 - rm -f html/version.entities
551 - test "x$(HTML_IMAGES)" = "x" || for i in "" $(HTML_IMAGES) ; do \
553 + @cp ../version.entities html
554 + @cd html && gtkdoc-mkhtml $(DOC_MODULE) $(DOC_MAIN_SGML_FILE)
555 + @mv html/index.sgml html/index.sgml.bak
556 + @$(SED) "s/ href=\"$(DOC_MODULE)\// href=\"$(DOC_MODULE)-@GST_MAJORMINOR@\//g" html/index.sgml.bak >html/index.sgml
557 + @rm -f html/index.sgml.bak
558 + @rm -f html/$(DOC_MAIN_SGML_FILE)
560 + @rm -f html/version.entities
561 + @test "x$(HTML_IMAGES)" = "x" || for i in "" $(HTML_IMAGES) ; do \
562 if test "$$i" != ""; then cp $(srcdir)/$$i html ; fi; done
563 @echo '-- Fixing Crossreferences'
564 - gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
565 - touch html-build.stamp
566 + @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
567 + @touch html-build.stamp
570 - rm -rf xml tmpl html
571 + @rm -rf xml tmpl html
572 # clean files copied for nonsrcdir templates build
573 - if test x"$(srcdir)" != x. ; then \
574 + @if test x"$(srcdir)" != x. ; then \
575 rm -rf $(SCANOBJ_FILES) $(SCAN_FILES) $(REPORT_FILES) \
576 $(MAINTAINER_DOC_STAMPS); \
578 @@ -239,16 +239,16 @@ clean-local-gtkdoc:
581 clean-local: clean-local-gtkdoc
588 - rm -f $(REPORT_FILES) \
589 + @rm -f $(REPORT_FILES) \
590 $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
591 - rm -rf tmpl/*.sgml.bak
592 - rm -f $(DOC_MODULE).hierarchy
593 - rm -f *.stamp || true
594 - if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
595 + @rm -rf tmpl/*.sgml.bak
596 + @rm -f $(DOC_MODULE).hierarchy
597 + @rm -f *.stamp || true
598 + @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
599 rm -f $(DOC_MODULE)-docs.sgml ; \
600 rm -f $(DOC_MODULE).types ; \
601 rm -f $(DOC_MODULE).interfaces ; \
602 @@ -258,7 +258,7 @@ distclean-local:
603 rm -rf tmpl/*.sgml ; \
604 rm -rf $(INSPECT_DIR); \
609 MAINTAINERCLEANFILES = $(MAINTAINER_DOC_STAMPS)
611 diff --git a/gtk-doc.mak b/gtk-doc.mak
612 index 70f0a9b..545f6d1 100644
615 @@ -73,7 +73,7 @@ setup-build.stamp: $(content_files)
616 # to gtk-doc scanning; but only then, to avoid duplicates
617 scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
618 @echo '*** Scanning header files ***'
619 - if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null; \
620 + @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null; \
622 GST_PLUGIN_SYSTEM_PATH=`cd $(top_builddir) && pwd` \
624 @@ -89,7 +89,7 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
625 test -f $$i || touch $$i ; \
628 - if test "x$(top_srcdir)" != "x$(top_builddir)"; \
629 + @if test "x$(top_srcdir)" != "x$(top_builddir)"; \
631 export BUILT_OPTIONS="--source-dir=$(DOC_BUILD_DIR)"; \
633 @@ -99,7 +99,7 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
634 --source-dir=$(DOC_SOURCE_DIR) \
636 --ignore-headers="$(IGNORE_HFILES)"
637 - touch scan-build.stamp
638 + @touch scan-build.stamp
640 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
642 @@ -109,11 +109,11 @@ $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)
643 ### FIXME: make this error out again when docs are complete
644 sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(expand_content_files)
645 @echo '*** Building XML ***'
646 - gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) --output-format=xml $(MKDB_OPTIONS) | tee sgml-build.log
647 + @gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) --output-format=xml $(MKDB_OPTIONS) | tee sgml-build.log
648 @if grep "WARNING:" sgml-build.log > /dev/null; then true; fi # exit 1; fi
649 - cp ../version.entities xml
651 - touch sgml-build.stamp
652 + @cp ../version.entities xml
654 + @touch sgml-build.stamp
656 sgml.stamp: sgml-build.stamp
658 @@ -124,28 +124,28 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
659 @echo '*** Building HTML ***'
663 - cp ../version.entities ./
665 + @cp ../version.entities ./
666 @mkhtml_options=""; \
667 - gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \
668 + @gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \
669 if test "$(?)" = "0"; then \
670 mkhtml_options=--path="$(abs_srcdir)"; \
672 cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
673 - mv html/index.sgml html/index.sgml.bak
674 - $(SED) "s/ href=\"$(DOC_MODULE)\// href=\"$(DOC_MODULE)-@GST_MAJORMINOR@\//g" html/index.sgml.bak >html/index.sgml
675 - rm -f html/index.sgml.bak
677 - rm -f version.entities
678 - test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) $(abs_builddir)/html )
679 + @mv html/index.sgml html/index.sgml.bak
680 + @$(SED) "s/ href=\"$(DOC_MODULE)\// href=\"$(DOC_MODULE)-@GST_MAJORMINOR@\//g" html/index.sgml.bak >html/index.sgml
681 + @rm -f html/index.sgml.bak
683 + @rm -f version.entities
684 + @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) $(abs_builddir)/html )
685 @echo '-- Fixing Crossreferences'
686 - gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
687 - touch html-build.stamp
688 + @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
689 + @touch html-build.stamp
692 - rm -rf xml tmpl html
693 + @rm -rf xml tmpl html
694 # clean files copied for nonsrcdir templates build
695 - if test x"$(srcdir)" != x. ; then \
696 + @if test x"$(srcdir)" != x. ; then \
697 rm -rf $(DOC_MODULE).types; \
700 @@ -154,16 +154,16 @@ clean-local-gtkdoc:
703 clean-local: clean-local-gtkdoc
710 - rm -f $(REPORT_FILES) \
711 + @rm -f $(REPORT_FILES) \
712 $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
713 - rm -rf tmpl/*.sgml.bak
714 - rm -f $(DOC_MODULE).hierarchy
715 - rm -f *.stamp || true
716 - if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
717 + @rm -rf tmpl/*.sgml.bak
718 + @rm -f $(DOC_MODULE).hierarchy
719 + @rm -f *.stamp || true
720 + @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
721 rm -f $(DOC_MODULE)-docs.sgml ; \
722 rm -f $(DOC_MODULE).types ; \
723 rm -f $(DOC_MODULE).interfaces ; \
724 @@ -172,10 +172,10 @@ distclean-local:
725 rm -f $(DOC_MODULE)-sections.txt ; \
726 rm -rf tmpl/*.sgml ; \
731 maintainer-clean-local: clean
732 - cd $(srcdir) && rm -rf html \
733 + @cd $(srcdir) && rm -rf html \
734 xml $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
736 # thomas: make docs parallel installable; devhelp requires majorminor too
737 commit b641dc323156d830a62b83033347952a2cc1de43
738 Author: Stefan Kost <ensonic@users.sf.net>
739 Date: Mon May 2 14:33:14 2011 +0300
741 gtk-doc*.mak: don't tee build log output to files
743 We can use gtkdoc-check if we want to have an automated way of e.g. failing
744 dist-check on incomplete docs.
746 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
747 index 0286e84..b7258f7 100644
748 --- a/gtk-doc-plugins.mak
749 +++ b/gtk-doc-plugins.mak
750 @@ -166,10 +166,9 @@ tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections
751 if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi; \
754 - @gtkdoc-mktmpl --module=$(DOC_MODULE) | tee tmpl-build.log
755 + @gtkdoc-mktmpl --module=$(DOC_MODULE)
757 $(top_srcdir)/common/mangle-tmpl.py $(srcdir)/$(INSPECT_DIR) tmpl
758 - @rm -f tmpl-build.log
759 @touch tmpl-build.stamp
761 tmpl.stamp: tmpl-build.stamp
762 @@ -193,11 +192,8 @@ sgml-build.stamp: tmpl.stamp scan-build.stamp $(CFILE_GLOB) $(top_srcdir)/common
763 --main-sgml-file=$(srcdir)/$(DOC_MAIN_SGML_FILE) \
764 --output-format=xml \
765 --ignore-files="$(IGNORE_HFILES) $(IGNORE_CFILES)" \
767 - | tee sgml-build.log
768 - @if grep "WARNING:" sgml-build.log > /dev/null; then true; fi # exit 1; fi
770 @cp ../version.entities xml
772 @touch sgml-build.stamp
774 sgml.stamp: sgml-build.stamp
775 diff --git a/gtk-doc.mak b/gtk-doc.mak
776 index 545f6d1..3dc6139 100644
779 @@ -109,10 +109,8 @@ $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)
780 ### FIXME: make this error out again when docs are complete
781 sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(expand_content_files)
782 @echo '*** Building XML ***'
783 - @gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) --output-format=xml $(MKDB_OPTIONS) | tee sgml-build.log
784 - @if grep "WARNING:" sgml-build.log > /dev/null; then true; fi # exit 1; fi
785 + @gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) --output-format=xml $(MKDB_OPTIONS)
786 @cp ../version.entities xml
788 @touch sgml-build.stamp
790 sgml.stamp: sgml-build.stamp
791 commit 7c67405b1299f8d1ff3f7cb97d90c637bed529ea
792 Author: Stefan Kost <ensonic@users.sf.net>
793 Date: Mon May 2 14:36:42 2011 +0300
795 gtk-doc.mak: update setup, cleanup rules
797 Simplify files the rules (sync'ed to upstream).
799 diff --git a/gtk-doc.mak b/gtk-doc.mak
800 index 3dc6139..b03b2db 100644
803 @@ -53,17 +53,13 @@ all-local: html-build.stamp
805 setup-build.stamp: $(content_files)
806 -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
807 - cp -p $(abs_srcdir)/$(DOC_MAIN_SGML_FILE) \
808 - $(abs_srcdir)/$(DOC_MODULE)-overrides.txt \
809 - $(abs_srcdir)/$(DOC_MODULE)-sections.txt \
810 - $(abs_srcdir)/$(DOC_MODULE).types \
811 - $(abs_builddir)/; \
812 - if test "x$(content_files)" != "x" ; then \
813 - for file in $(content_files) ; do \
814 - test -f $(abs_srcdir)/$$file || \
815 - cp -p $(abs_srcdir)/$$file $(abs_builddir)/; \
818 + files=`echo $(DOC_MAIN_SGML_FILE) $(DOC_OVERRIDES) $(DOC_MODULE)-sections.txt $(DOC_MODULE).types $(content_files)`; \
819 + if test "x$$files" != "x" ; then \
820 + for file in $$files ; do \
821 + test -f $(abs_srcdir)/$$file && \
822 + cp -pu $(abs_srcdir)/$$file $(abs_builddir)/ || true; \
826 @touch setup-build.stamp
828 @@ -162,10 +158,10 @@ distclean-local:
829 @rm -f $(DOC_MODULE).hierarchy
830 @rm -f *.stamp || true
831 @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
832 - rm -f $(DOC_MODULE)-docs.sgml ; \
833 + rm -f $(DOC_MAIN_SGML_FILE) ; \
834 + rm -f $(DOC_OVERRIDES) ; \
835 rm -f $(DOC_MODULE).types ; \
836 rm -f $(DOC_MODULE).interfaces ; \
837 - rm -f $(DOC_MODULE)-overrides.txt ; \
838 rm -f $(DOC_MODULE).prerequisites ; \
839 rm -f $(DOC_MODULE)-sections.txt ; \
840 rm -rf tmpl/*.sgml ; \
841 commit fd3507359e845119d199b348c7779b987cee1c45
842 Author: Stefan Kost <ensonic@users.sf.net>
843 Date: Mon May 2 15:24:57 2011 +0300
845 gtk-doc*.mak: echo build style in a automake a like way
847 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
848 index b7258f7..766d1d5 100644
849 --- a/gtk-doc-plugins.mak
850 +++ b/gtk-doc-plugins.mak
851 @@ -117,7 +117,7 @@ scanobj-update:
852 # instead of rewriting them, so that multiple maintainers can generate
853 # a collective set of args and signals
854 scanobj-build.stamp: $(SCANOBJ_DEPS) $(basefiles) inspect
855 - @echo '*** Scanning GObjects ***'
856 + @echo " DOC Introspecting gobjects"
857 @if test x"$(srcdir)" != x. ; then \
858 for f in $(SCANOBJ_FILES) $(SCAN_FILES); \
860 @@ -145,7 +145,7 @@ $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(SCANOBJ_FILES_O): scan-build.stamp
862 ### scan headers; done on every build ###
863 scan-build.stamp: $(HFILE_GLOB) $(EXTRA_HFILES) $(basefiles) scanobj-build.stamp
864 - @echo '*** Scanning header files ***'
865 + @echo ' DOC Scanning header files'
867 $(SCAN_OPTIONS) $(EXTRA_HFILES) \
868 --module=$(DOC_MODULE) \
869 @@ -159,7 +159,7 @@ scan-build.stamp: $(HFILE_GLOB) $(EXTRA_HFILES) $(basefiles) scanobj-build.stamp
870 # in a non-srcdir build, we need to copy files from the previous step
871 # and the files from previous runs of this step
872 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
873 - @echo '*** Rebuilding template files ***'
874 + @echo ' DOC Rebuilding template files'
875 @if test x"$(srcdir)" != x. ; then \
876 for f in $(SCANOBJ_FILES) $(SCAN_FILES); \
878 @@ -178,7 +178,7 @@ tmpl.stamp: tmpl-build.stamp
880 ### FIXME: make this error out again when docs are fixed for 0.9
881 sgml-build.stamp: tmpl.stamp scan-build.stamp $(CFILE_GLOB) $(top_srcdir)/common/plugins.xsl $(expand_content_files)
882 - @echo '*** Building XML ***'
883 + @echo ' DOC Building XML'
885 @for a in $(srcdir)/$(INSPECT_DIR)/*.xml; do \
886 xsltproc --stringparam module $(MODULE) \
887 @@ -202,7 +202,7 @@ sgml.stamp: sgml-build.stamp
888 #### build html; done on every step ####
890 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
891 - @echo '*** Building HTML ***'
892 + @echo ' DOC Building HTML'
893 @if test -d html; then rm -rf html; fi
895 @cp $(srcdir)/$(DOC_MAIN_SGML_FILE) html
896 @@ -218,7 +218,7 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
897 @rm -f html/version.entities
898 @test "x$(HTML_IMAGES)" = "x" || for i in "" $(HTML_IMAGES) ; do \
899 if test "$$i" != ""; then cp $(srcdir)/$$i html ; fi; done
900 - @echo '-- Fixing Crossreferences'
901 + @echo ' DOC Fixing cross-references'
902 @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
903 @touch html-build.stamp
905 diff --git a/gtk-doc.mak b/gtk-doc.mak
906 index b03b2db..5ee5e7d 100644
909 @@ -53,6 +53,7 @@ all-local: html-build.stamp
911 setup-build.stamp: $(content_files)
912 -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
913 + echo ' DOC Preparing build'; \
914 files=`echo $(DOC_MAIN_SGML_FILE) $(DOC_OVERRIDES) $(DOC_MODULE)-sections.txt $(DOC_MODULE).types $(content_files)`; \
915 if test "x$$files" != "x" ; then \
916 for file in $$files ; do \
917 @@ -68,9 +69,19 @@ setup-build.stamp: $(content_files)
918 # in the case of non-srcdir builds, the built gst directory gets added
919 # to gtk-doc scanning; but only then, to avoid duplicates
920 scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
921 - @echo '*** Scanning header files ***'
922 - @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null; \
923 + @echo ' DOC Scanning header files'
924 + @if test "x$(top_srcdir)" != "x$(top_builddir)"; \
926 + export BUILT_OPTIONS="--source-dir=$(DOC_BUILD_DIR)"; \
929 + $(SCAN_OPTIONS) $(EXTRA_HFILES) \
930 + --module=$(DOC_MODULE) \
931 + --source-dir=$(DOC_SOURCE_DIR) \
933 + --ignore-headers="$(IGNORE_HFILES)"
934 + @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null; then \
935 + echo " DOC Introspecting gobjects"; \
936 GST_PLUGIN_SYSTEM_PATH=`cd $(top_builddir) && pwd` \
938 GST_REGISTRY=doc-registry.xml \
939 @@ -85,16 +96,6 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
940 test -f $$i || touch $$i ; \
943 - @if test "x$(top_srcdir)" != "x$(top_builddir)"; \
945 - export BUILT_OPTIONS="--source-dir=$(DOC_BUILD_DIR)"; \
948 - $(SCAN_OPTIONS) $(EXTRA_HFILES) \
949 - --module=$(DOC_MODULE) \
950 - --source-dir=$(DOC_SOURCE_DIR) \
952 - --ignore-headers="$(IGNORE_HFILES)"
953 @touch scan-build.stamp
955 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
956 @@ -104,7 +105,7 @@ $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)
958 ### FIXME: make this error out again when docs are complete
959 sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(expand_content_files)
960 - @echo '*** Building XML ***'
961 + @echo ' DOC Building XML'
962 @gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) --output-format=xml $(MKDB_OPTIONS)
963 @cp ../version.entities xml
964 @touch sgml-build.stamp
965 @@ -115,7 +116,7 @@ sgml.stamp: sgml-build.stamp
968 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
969 - @echo '*** Building HTML ***'
970 + @echo ' DOC Building HTML'
974 @@ -132,7 +133,7 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
976 @rm -f version.entities
977 @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) $(abs_builddir)/html )
978 - @echo '-- Fixing Crossreferences'
979 + @echo ' DOC Fixing cross-references'
980 @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
981 @touch html-build.stamp
983 commit 9e5bbd508588961696e70c38e764492e0312ec4c
984 Author: Stefan Kost <ensonic@users.sf.net>
985 Date: Wed May 18 15:58:48 2011 +0300
987 scangobj, make: behave according to build verbosity
989 Add --verbose parameter to scangobj (like upstream gtk-doc). Check the flags in
990 the makefile and pass them to the gtkdoc tools.
992 diff --git a/gstdoc-scangobj b/gstdoc-scangobj
993 index 74748fa..fa7532a 100755
994 --- a/gstdoc-scangobj
995 +++ b/gstdoc-scangobj
996 @@ -43,6 +43,7 @@ require "gtkdoc-common.pl";
1003 my $TYPE_INIT_FUNC="g_type_init ()";
1004 @@ -55,10 +56,11 @@ my $TYPE_INIT_FUNC="g_type_init ()";
1005 'type-init-func' => \$TYPE_INIT_FUNC,
1006 'output-dir' => \$OUTPUT_DIR,
1007 'inspect-dir' => \$INSPECT_DIR,
1008 + 'verbose' => \$VERBOSE,
1009 'version' => \$PRINT_VERSION,
1010 'help' => \$PRINT_HELP);
1012 -GetOptions(\%optctl, "module=s", "source=s", "types:s", "output-dir:s", "inspect-dir:s", "nogtkinit", "type-init-func:s", "version", "help");
1013 +GetOptions(\%optctl, "module=s", "source=s", "types:s", "output-dir:s", "inspect-dir:s", "nogtkinit", "type-init-func:s", "verbose", "version", "help");
1016 # Do nothing. This just avoids a warning.
1017 @@ -75,15 +77,19 @@ if (!$MODULE) {
1021 - print "gstdoc-scangobj version 1.5\n";
1022 - print "\n--module=MODULE_NAME Name of the doc module being parsed";
1023 - print "\n--source=SOURCE_NAME Name of the source module for plugins";
1024 - print "\n--types=FILE The name of the file to store the types in";
1025 - print "\n--type-init-func=FUNC The init function to call instead of g_type_init ()";
1026 - print "\n--output-dir=DIRNAME The directory where the results are stored";
1027 - print "\n--inspect-dir=DIRNAME The directory where the plugin inspect data is stored";
1028 - print "\n--version Print the version of this program";
1029 - print "\n--help Print this help\n";
1031 +gstdoc-scangobj version 1.5 - introspect gstreamer-plugins
1033 +--module=MODULE_NAME Name of the doc module being parsed
1034 +--source=SOURCE_NAME Name of the source module for plugins
1035 +--types=FILE The name of the file to store the types in
1036 +--type-init-func=FUNC The init function to call instead of g_type_init()
1037 +--output-dir=DIRNAME The directory where the results are stored
1038 +--inspect-dir=DIRNAME The directory where the plugin inspect data is stored
1039 +--verbose Print extra output while processing
1040 +--version Print the version of this program
1041 +--help Print this help
1046 @@ -1546,15 +1552,20 @@ if ($CC =~ /libtool/) {
1047 $o_file = "$MODULE-scan.o"
1050 -print "gtk-doc: Compiling scanner\n";
1051 -$command = "$CC $CFLAGS -c -o $o_file $MODULE-scan.c";
1052 -system($command) == 0 or die "Compilation of scanner failed: $!\n";
1054 +if (!defined($VERBOSE) or $VERBOSE eq "0") {
1055 + $stdout=">/dev/null";
1058 +# Compiling scanner
1059 +$command = "$CC $stdout $CFLAGS -c -o $o_file $MODULE-scan.c";
1060 +system("($command)") == 0 or die "Compilation of scanner failed: $!\n";
1062 -print "gtk-doc: Linking scanner\n";
1063 -$command = "$LD -o $MODULE-scan $o_file $LDFLAGS";
1065 +$command = "$LD $stdout -o $MODULE-scan $o_file $LDFLAGS";
1066 system($command) == 0 or die "Linking of scanner failed: $!\n";
1068 -print "gtk-doc: Running scanner $MODULE-scan\n";
1069 +# Running scanner $MODULE-scan ";
1070 system("sh -c ./$MODULE-scan") == 0 or die "Scan failed: $!\n";
1072 if (!defined($ENV{"GTK_DOC_KEEP_INTERMEDIATE"})) {
1073 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
1074 index 766d1d5..0a6a83a 100644
1075 --- a/gtk-doc-plugins.mak
1076 +++ b/gtk-doc-plugins.mak
1077 @@ -124,12 +124,17 @@ scanobj-build.stamp: $(SCANOBJ_DEPS) $(basefiles) inspect
1078 if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi; \
1081 + scanobj_options=""; \
1082 + if test "x$(V)" = "x1"; then \
1083 + scanobj_options="--verbose"; \
1085 $(INSPECT_ENVIRONMENT) \
1086 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" \
1087 CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS) $(WARNING_CFLAGS)" \
1088 LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
1089 - $(GST_DOC_SCANOBJ) --type-init-func="gst_init(NULL,NULL)" \
1090 + $(GST_DOC_SCANOBJ) $$scanobj_options --type-init-func="gst_init(NULL,NULL)" \
1091 --module=$(DOC_MODULE) --source=$(PACKAGE) --inspect-dir=$(INSPECT_DIR) && \
1092 + echo " DOC Merging introspection data" && \
1094 $(top_srcdir)/common/scangobj-merge.py $(DOC_MODULE); \
1095 if test x"$(srcdir)" != x. ; then \
1096 @@ -209,7 +214,11 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
1097 @for f in $(content_files); do cp $(srcdir)/$$f html; done
1099 @cp ../version.entities html
1100 - @cd html && gtkdoc-mkhtml $(DOC_MODULE) $(DOC_MAIN_SGML_FILE)
1101 + @mkhtml_options=""; \
1102 + if test "x$(V)" = "x1"; then \
1103 + mkhtml_options="--verbose"; \
1105 + cd html && gtkdoc-mkhtml $$mkhtml_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE)
1106 @mv html/index.sgml html/index.sgml.bak
1107 @$(SED) "s/ href=\"$(DOC_MODULE)\// href=\"$(DOC_MODULE)-@GST_MAJORMINOR@\//g" html/index.sgml.bak >html/index.sgml
1108 @rm -f html/index.sgml.bak
1109 commit 3d5bfa5966c6f5908a34de75f828846f65ea6353
1110 Author: Stefan Kost <ensonic@users.sf.net>
1111 Date: Wed May 18 22:16:50 2011 +0300
1113 docs: don't install devhelp (1) files anymore
1115 Next gtk-doc release is dropping them too.
1117 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
1118 index 0a6a83a..5c565d3 100644
1119 --- a/gtk-doc-plugins.mak
1120 +++ b/gtk-doc-plugins.mak
1121 @@ -285,9 +285,7 @@ install-data-local:
1122 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
1125 - echo '-- Installing $(builddir)/html/$(DOC_MODULE).devhelp' ; \
1126 - $(INSTALL_DATA) $(builddir)/html/$(DOC_MODULE).devhelp \
1127 - $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
1128 + echo '-- Installing $(builddir)/html/$(DOC_MODULE).devhelp2' ; \
1129 if test -e $(builddir)/html/$(DOC_MODULE).devhelp2; then \
1130 $(INSTALL_DATA) $(builddir)/html/$(DOC_MODULE).devhelp2 \
1131 $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; \
1132 diff --git a/gtk-doc.mak b/gtk-doc.mak
1133 index 5ee5e7d..3664710 100644
1136 @@ -184,9 +184,7 @@ install-data-local:
1137 echo '-- Installing '$$i ; \
1138 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
1140 - echo '-- Installing $(builddir)/html/$(DOC_MODULE).devhelp' ; \
1141 - $(INSTALL_DATA) $(builddir)/html/$(DOC_MODULE).devhelp \
1142 - $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
1143 + echo '-- Installing $(builddir)/html/$(DOC_MODULE).devhelp2' ; \
1144 if test -e $(builddir)/html/$(DOC_MODULE).devhelp2; then \
1145 $(INSTALL_DATA) $(builddir)/html/$(DOC_MODULE).devhelp2 \
1146 $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; \
1147 commit f65a9edaaf4315bc68870eafde4480f488f1ee2e
1148 Author: Stefan Kost <ensonic@users.sf.net>
1149 Date: Wed May 18 23:00:32 2011 +0300
1151 docs: further reduce delta to upstream makefiles
1153 Also remove some cruft (e.g. the FC3 comments simplay don't make sense (anymore)
1154 - the scanner is removing its own files).
1156 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
1157 index 5c565d3..eab32ee 100644
1158 --- a/gtk-doc-plugins.mak
1159 +++ b/gtk-doc-plugins.mak
1160 @@ -55,12 +55,12 @@ DOC_STAMPS = \
1162 # files generated/updated by gtkdoc-scangobj
1164 - $(DOC_MODULE).signals \
1165 + $(DOC_MODULE).args \
1166 $(DOC_MODULE).hierarchy \
1167 $(DOC_MODULE).interfaces \
1168 $(DOC_MODULE).prerequisites \
1169 - $(DOC_MODULE).types \
1170 - $(DOC_MODULE).args
1171 + $(DOC_MODULE).signals \
1172 + $(DOC_MODULE).types
1175 .libs/$(DOC_MODULE)-scan.o
1176 @@ -78,11 +78,8 @@ REPORT_FILES = \
1177 $(DOC_MODULE)-undeclared.txt \
1178 $(DOC_MODULE)-unused.txt
1180 -# FC3 seems to need -scan.c to be part of CLEANFILES for distcheck
1181 -# no idea why FC4 can do without
1183 $(SCANOBJ_FILES_O) \
1184 - $(DOC_MODULE)-scan.c \
1187 inspect-registry.xml
1188 @@ -160,7 +157,6 @@ scan-build.stamp: $(HFILE_GLOB) $(EXTRA_HFILES) $(basefiles) scanobj-build.stamp
1190 #### update templates; done on every build ####
1192 -### FIXME: make this error out again when docs are fixed for 0.X
1193 # in a non-srcdir build, we need to copy files from the previous step
1194 # and the files from previous runs of this step
1195 tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
1196 @@ -179,9 +175,8 @@ tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections
1197 tmpl.stamp: tmpl-build.stamp
1200 -#### build xml; done on every build ####
1203 -### FIXME: make this error out again when docs are fixed for 0.9
1204 sgml-build.stamp: tmpl.stamp scan-build.stamp $(CFILE_GLOB) $(top_srcdir)/common/plugins.xsl $(expand_content_files)
1205 @echo ' DOC Building XML'
1207 @@ -204,11 +199,11 @@ sgml-build.stamp: tmpl.stamp scan-build.stamp $(CFILE_GLOB) $(top_srcdir)/common
1208 sgml.stamp: sgml-build.stamp
1211 -#### build html; done on every step ####
1214 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
1215 @echo ' DOC Building HTML'
1216 - @if test -d html; then rm -rf html; fi
1219 @cp $(srcdir)/$(DOC_MAIN_SGML_FILE) html
1220 @for f in $(content_files); do cp $(srcdir)/$$f html; done
1221 diff --git a/gtk-doc.mak b/gtk-doc.mak
1222 index 3664710..63e8957 100644
1225 @@ -103,7 +103,6 @@ $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)
1229 -### FIXME: make this error out again when docs are complete
1230 sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(expand_content_files)
1231 @echo ' DOC Building XML'
1232 @gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) --output-format=xml $(MKDB_OPTIONS)
1233 commit b77dc098f9eb23abd50ded3ce9e34199c7b0c16c
1234 Author: Stefan Kost <ensonic@users.sf.net>
1235 Date: Wed May 18 23:07:16 2011 +0300
1237 docs: only use --verbose on gtkdoc-mkhtml where supported
1239 This would require gtk-doc >=1.18 (unreleased yet) and we don't want to do that
1242 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
1243 index ad06a19..cdf19ee 100644
1244 --- a/gtk-doc-plugins.mak
1245 +++ b/gtk-doc-plugins.mak
1246 @@ -207,8 +207,11 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
1248 @cp ../version.entities html
1249 @mkhtml_options=""; \
1250 - if test "x$(V)" = "x1"; then \
1251 - mkhtml_options="--verbose"; \
1252 + gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \
1253 + if test "$(?)" = "0"; then \
1254 + if test "x$(V)" = "x1"; then \
1255 + mkhtml_options="$$mkhtml_options --verbose"; \
1258 cd html && gtkdoc-mkhtml $$mkhtml_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE)
1259 @mv html/index.sgml html/index.sgml.bak
1260 diff --git a/gtk-doc.mak b/gtk-doc.mak
1261 index 63e8957..b37ad4b 100644
1264 @@ -121,6 +121,12 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
1266 @cp ../version.entities ./
1267 @mkhtml_options=""; \
1268 + gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \
1269 + if test "$(?)" = "0"; then \
1270 + if test "x$(V)" = "x1"; then \
1271 + mkhtml_options="$$mkhtml_options --verbose"; \
1274 @gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \
1275 if test "$(?)" = "0"; then \
1276 mkhtml_options=--path="$(abs_srcdir)"; \
1277 From 2de221ce94b657f9c9a75aa3cc0cb84dbb5da78b Mon Sep 17 00:00:00 2001
1278 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= <olivier.crete@collabora.co.uk>
1279 Date: Mon, 28 Jan 2013 20:28:09 +0100
1280 Subject: [PATCH] gtk-doc*.mak: Put the API version in the html book name
1282 This causes devhelp2 files to get a version. Due to that devhelp can show it
1283 along with the 0.10 version.
1285 gtk-doc-plugins.mak | 11 ++++-------
1286 gtk-doc.mak | 11 ++++-------
1287 2 files changed, 8 insertions(+), 14 deletions(-)
1289 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
1290 index f69d9d7..f19e7d7 100644
1291 --- a/gtk-doc-plugins.mak
1292 +++ b/gtk-doc-plugins.mak
1293 @@ -222,10 +222,7 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
1294 mkhtml_options="$$mkhtml_options --verbose"; \
1297 - cd html && gtkdoc-mkhtml $$mkhtml_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE)
1298 - @mv html/index.sgml html/index.sgml.bak
1299 - @$(SED) "s/ href=\"$(DOC_MODULE)\// href=\"$(DOC_MODULE)-@GST_MAJORMINOR@\//g" html/index.sgml.bak >html/index.sgml
1300 - @rm -f html/index.sgml.bak
1301 + cd html && gtkdoc-mkhtml $$mkhtml_options $(DOC_MODULE)-@GST_MAJORMINOR@ $(DOC_MAIN_SGML_FILE)
1302 @rm -f html/$(DOC_MAIN_SGML_FILE)
1304 @rm -f html/version.entities
1305 @@ -289,9 +286,9 @@ install-data-local:
1306 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
1309 - echo '-- Installing $(builddir)/html/$(DOC_MODULE).devhelp2' ; \
1310 - if test -e $(builddir)/html/$(DOC_MODULE).devhelp2; then \
1311 - $(INSTALL_DATA) $(builddir)/html/$(DOC_MODULE).devhelp2 \
1312 + echo '-- Installing $(builddir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2' ; \
1313 + if test -e $(builddir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; then \
1314 + $(INSTALL_DATA) $(builddir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2 \
1315 $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; \
1317 $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR) || true ; \
1318 diff --git a/gtk-doc.mak b/gtk-doc.mak
1319 index 17cee71..9d76889 100644
1322 @@ -130,10 +130,7 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
1323 if test "$(?)" = "0"; then \
1324 mkhtml_options=--path="$(abs_srcdir)"; \
1326 - cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
1327 - @mv html/index.sgml html/index.sgml.bak
1328 - @$(SED) "s/ href=\"$(DOC_MODULE)\// href=\"$(DOC_MODULE)-@GST_MAJORMINOR@\//g" html/index.sgml.bak >html/index.sgml
1329 - @rm -f html/index.sgml.bak
1330 + cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE)-@GST_MAJORMINOR@ ../$(DOC_MAIN_SGML_FILE)
1332 @rm -f version.entities
1333 @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) $(abs_builddir)/html )
1334 @@ -189,9 +186,9 @@ install-data-local:
1335 echo '-- Installing '$$i ; \
1336 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
1338 - echo '-- Installing $(builddir)/html/$(DOC_MODULE).devhelp2' ; \
1339 - if test -e $(builddir)/html/$(DOC_MODULE).devhelp2; then \
1340 - $(INSTALL_DATA) $(builddir)/html/$(DOC_MODULE).devhelp2 \
1341 + echo '-- Installing $(builddir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2' ; \
1342 + if test -e $(builddir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; then \
1343 + $(INSTALL_DATA) $(builddir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2 \
1344 $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; \
1346 $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR) || true ; \
1347 From d37af32e2d6d1b546af72978f8441a84996ab3ea Mon Sep 17 00:00:00 2001
1348 From: Stefan Sauer <ensonic@users.sf.net>
1349 Date: Sun, 7 Jun 2015 20:12:05 +0200
1350 Subject: [PATCH] mangle-tmpl.py: generate tmpl files instead of merging
1352 We don't have any hand-written docs in tmpl files. Stop generating them with
1353 gtkdoc and just write the minimal files ourself.
1355 gtk-doc-plugins.mak | 15 +++--------
1356 mangle-tmpl.py | 72 ++++++++++++-----------------------------------------
1357 2 files changed, 19 insertions(+), 68 deletions(-)
1359 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
1360 index 5d9b2f9..767e55a 100644
1361 --- a/gtk-doc-plugins.mak
1362 +++ b/gtk-doc-plugins.mak
1363 @@ -171,19 +171,10 @@ scan-build.stamp: $(HFILE_GLOB) $(EXTRA_HFILES) $(basefiles) scanobj-build.stamp
1364 --ignore-headers="$(IGNORE_HFILES)"; \
1365 touch scan-build.stamp
1367 -#### update templates; done on every build ####
1368 +#### generate templates; done on every build ####
1370 -# in a non-srcdir build, we need to copy files from the previous step
1371 -# and the files from previous runs of this step
1372 -tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
1373 - @echo ' DOC Rebuilding template files'
1374 - @if test x"$(srcdir)" != x. ; then \
1375 - for f in $(SCANOBJ_FILES) $(SCAN_FILES); \
1377 - if test -e $(srcdir)/$$f; then cp -u $(srcdir)/$$f . ; fi; \
1380 - @gtkdoc-mktmpl --module=$(DOC_MODULE)
1382 + @echo ' DOC Building template files'
1384 $(top_srcdir)/common/mangle-tmpl.py $(srcdir)/$(INSPECT_DIR) tmpl
1385 @touch tmpl-build.stamp
1386 diff --git a/mangle-tmpl.py b/mangle-tmpl.py
1387 index 51ea8c2..7a92d04 100644
1388 --- a/mangle-tmpl.py
1389 +++ b/mangle-tmpl.py
1391 # vi:si:et:sw=4:sts=4:ts=4
1394 -use the output from gst-xmlinspect.py to mangle tmpl/*.sgml and
1395 -insert/overwrite Short Description and Long Description
1396 +use the files from inspect/*.xml to create mininal tmpl/*.sgml files containing
1397 +'Short Description' and 'Long Description' to inject element details into the
1398 +docbook files produced by gtkdoc-mkdb
1401 -# FIXME: right now it uses pygst and scans on its own;
1402 -# we really should use inspect/*.xml instead since the result of
1403 -# gst-xmlinspect.py is committed by the docs maintainer, who can be
1404 -# expected to have pygst, but this step should be done for every docs build,
1405 -# so no pygst allowed
1407 -# read in inspect/*.xml
1408 -# for every tmpl/element-(name).xml: mangle with details from element
1415 @@ -28,37 +19,12 @@ def __init__(self, filename):
1416 self._sectionids = []
1421 - Read and parse the sections from the given file.
1423 - lines = open(self.filename).readlines()
1424 - matcher = re.compile("<!-- ##### SECTION (\S+) ##### -->\n")
1427 - for line in lines:
1428 - match = matcher.search(line)
1430 - id = match.expand("\\1")
1431 - self._sectionids.append(id)
1432 - self._sections[id] = []
1436 - "WARNING: line before a SECTION header: %s" % line)
1438 - self._sections[id].append(line)
1440 - def get_section(self, id):
1442 - Get the content from the given section.
1444 - return self._sections[id]
1446 def set_section(self, id, content):
1448 Replace the given section id with the given content.
1450 + if not id in self._sectionids:
1451 + self._sectionids.append(id)
1452 self._sections[id] = content
1455 @@ -73,14 +39,10 @@ def output(self):
1457 return "".join(lines)
1459 - def write(self, backup=False):
1462 Write out the template file again, backing up the previous one.
1465 - target = self.filename + ".mangle.bak"
1466 - os.rename(self.filename, target)
1468 handle = open(self.filename, "w")
1469 handle.write(self.output())
1471 @@ -136,30 +98,28 @@ def main():
1472 inspectdir = sys.argv[1]
1473 tmpldir = sys.argv[2]
1475 + if not os.path.exists (tmpldir):
1478 # parse all .xml files; build map of element name -> short desc
1479 #for file in glob.glob("inspect/plugin-*.xml"):
1481 for file in glob.glob("%s/plugin-*.xml" % inspectdir):
1482 elements.update(get_elements(file))
1484 - for file in glob.glob("%s/element-*.sgml" % tmpldir):
1485 - base = os.path.basename(file)
1486 - element = base[len("element-"):-len(".sgml")]
1487 + for element in elements.keys():
1488 + file = "%s/element-%s.sgml" % (tmpldir, element)
1491 - if element in elements.keys():
1492 - description = elements[element]['description']
1493 - tmpl.set_section("Short_Description", "%s\n\n" % description)
1495 - # put in an include if not yet there
1496 + description = elements[element]['description']
1497 + tmpl.set_section("Short_Description", "%s\n" % description)
1499 + # add include for details
1500 line = '<include xmlns="http://www.w3.org/2003/XInclude" href="' + \
1501 'element-' + element + '-details.xml">' + \
1502 '<fallback xmlns="http://www.w3.org/2003/XInclude" />' + \
1504 - section = tmpl.get_section("Long_Description")
1505 - if not section[0] == line:
1506 - section.insert(0, line)
1507 - tmpl.set_section("Long_Description", section)
1508 + tmpl.set_section("Long_Description", line)
1512 From f363b3205658a38e84fa77f19dee218cd4445275 Mon Sep 17 00:00:00 2001
1513 From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
1514 Date: Mon, 20 Jun 2016 15:38:01 -0400
1515 Subject: [PATCH] Fix handling of DOC_SOURCE_DIR list
1517 As some places we where assuming a single directory. This caused some
1518 plugins documentation to be ignored.
1520 gtk-doc-plugins.mak | 8 ++++++--
1521 gtk-doc.mak | 6 +++++-
1522 2 files changed, 11 insertions(+), 3 deletions(-)
1524 diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak
1525 index fe0977c..4b5dd1b 100644
1526 --- a/gtk-doc-plugins.mak
1527 +++ b/gtk-doc-plugins.mak
1528 @@ -179,9 +179,13 @@ sgml-build.stamp: scan-build.stamp $(CFILE_GLOB) $(top_srcdir)/common/plugins.xs
1529 $(top_srcdir)/common/plugins.xsl $$a > xml/`basename $$a`; done
1530 @for f in $(EXAMPLE_CFILES); do \
1531 $(PYTHON) $(top_srcdir)/common/c-to-xml.py $$f > xml/element-`basename $$f .c`.xml; done
1533 + @_source_dir='' ; \
1534 + for i in $(DOC_SOURCE_DIR) ; do \
1535 + _source_dir="$${_source_dir} --source-dir=$$i" ; \
1538 --module=$(DOC_MODULE) \
1539 - --source-dir=$(DOC_SOURCE_DIR) \
1541 --expand-content-files="$(expand_content_files)" \
1542 --main-sgml-file=$(srcdir)/$(DOC_MAIN_SGML_FILE) \
1543 --output-format=xml \
1544 diff --git a/gtk-doc.mak b/gtk-doc.mak
1545 index 2aab3a9..4beebcf 100644
1548 @@ -121,7 +121,11 @@ $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)
1550 sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(expand_content_files)
1551 @echo ' DOC Building XML'
1552 - @gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) --output-format=xml $(MKDB_OPTIONS)
1553 + @_source_dir='' ; \
1554 + for i in $(DOC_SOURCE_DIR) ; do \
1555 + _source_dir="$${_source_dir} --source-dir=$$i" ; \
1557 + gtkdoc-mkdb --module=$(DOC_MODULE) $$(_source_dir) --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) --output-format=xml $(MKDB_OPTIONS)
1558 @cp ../version.entities xml
1559 @touch sgml-build.stamp