~ubuntu-branches/ubuntu/quantal/pitivi/quantal

« back to all changes in this revision

Viewing changes to common/gtk-doc-plugins.mak

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2008-12-12 10:22:29 UTC
  • mfrom: (1.1.6 upstream)
  • mto: (3.2.2 jaunty) (1.2.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20081212102229-7c3etvaoy9ys0x28
Tags: upstream-0.11.3
Import upstream version 0.11.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
# for GStreamer plug-ins
3
3
 
4
4
help:
 
5
        @echo
5
6
        @echo "If you are a doc maintainer, run 'make update' to update"
6
7
        @echo "the documentation files maintained in CVS"
 
8
        @echo
 
9
        @echo Other useful make targets:
 
10
        @echo
 
11
        @echo  check-inspected-versions: make sure the inspected plugin info
 
12
        @echo                            is up to date before a release
 
13
        @echo
7
14
 
8
15
# update the stuff maintained by doc maintainers
9
16
update:
10
 
        make inspect-update
11
 
        make scanobj-update
 
17
        $(MAKE) inspect-update
 
18
        $(MAKE) scanobj-update
12
19
 
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
30
37
        $(extra_files)                  \
31
38
        $(HTML_IMAGES)                  \
32
39
        $(DOC_MAIN_SGML_FILE)   \
33
 
        $(DOC_MODULE).types             \
34
40
        $(DOC_OVERRIDES)                \
35
41
        $(DOC_MODULE)-sections.txt
36
42
 
57
63
        $(DOC_MODULE).hierarchy         \
58
64
        $(DOC_MODULE).interfaces        \
59
65
        $(DOC_MODULE).prerequisites     \
 
66
        $(DOC_MODULE).types             \
60
67
        $(DOC_MODULE).args
61
68
 
62
69
SCANOBJ_FILES_O =                       \
70
77
        $(DOC_MODULE)-decl.txt          \
71
78
        $(DOC_MODULE)-decl-list.txt
72
79
 
 
80
 
 
81
REPORT_FILES = \
 
82
        $(DOC_MODULE)-undocumented.txt \
 
83
        $(DOC_MODULE)-undeclared.txt \
 
84
        $(DOC_MODULE)-unused.txt
 
85
 
 
86
# FC3 seems to need -scan.c to be part of CLEANFILES for distcheck
 
87
# no idea why FC4 can do without
 
88
CLEANFILES = \
 
89
        $(SCANOBJ_FILES_O) \
 
90
        $(DOC_MODULE)-scan.c \
 
91
        $(REPORT_FILES) \
 
92
        $(DOC_STAMPS) \
 
93
        inspect-registry.xml
 
94
 
 
95
 
73
96
if ENABLE_GTK_DOC
74
97
all-local: html-build.stamp
75
98
 
76
99
#### scan gobjects; done by documentation maintainer ####
77
100
scanobj-update:
78
101
        -rm scanobj-build.stamp
79
 
        make scanobj-build.stamp
 
102
        $(MAKE) scanobj-build.stamp
80
103
 
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
94
117
            done;                                                       \
95
118
        else                                                            \
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) &&           \
101
125
                $(PYTHON)                                               \
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)
117
141
 
118
142
# update the element and plugin XML descriptions; store in inspect/
120
144
        mkdir inspect
121
145
 
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
126
149
 
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)
221
247
        rm -rf html/xml
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
 
254
 
 
255
clean-local-gtkdoc:
 
256
        rm -rf xml tmpl html
 
257
# clean files copied for nonsrcdir templates build
 
258
        if test x"$(srcdir)" != x. ; then \
 
259
            rm -rf $(SCANOBJ_FILES) $(SCAN_FILES); \
 
260
        fi
228
261
else
229
262
all-local:
 
263
clean-local-gtkdoc:
230
264
endif
231
265
 
232
 
# FC3 seems to need -scan.c to be part of CLEANFILES for distcheck
233
 
# no idea why FC4 can do without
234
 
CLEANFILES = \
235
 
        $(SCANOBJ_FILES_O) \
236
 
        $(DOC_MODULE)-scan.c \
237
 
        $(DOC_MODULE)-unused.txt \
238
 
        $(DOC_STAMPS) \
239
 
        inspect-registry.xml
240
 
 
241
 
# FIXME: these rules need a little cleaning up
242
 
clean-local:
 
266
clean-local: clean-local-gtkdoc
243
267
        rm -f *~ *.bak
244
268
        rm -rf .libs
245
 
# clean files generated for tmpl build
246
 
        -rm -rf tmpl
247
 
# clean files copied/generated for nonsrcdir tmpl build
248
 
        if test x"$(srcdir)" != x. ; then \
249
 
            rm -rf $(SCANOBJ_FILES) $(SCAN_FILES);                      \
250
 
        fi
251
 
# clean files generated for xml build
252
 
        -rm -rf xml
253
 
# clean files generate for html build
254
 
        -rm -rf html
255
269
 
256
270
distclean-local: clean
257
271
        rm -rf tmpl/*.sgml.bak
258
 
        rm -f *.stamp || true
259
272
        rm -rf *.o
260
273
 
 
274
MAINTAINERCLEANFILES = $(MAINTAINER_DOC_STAMPS)
 
275
 
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' ; \
267
281
        else \
 
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); \
287
 
                fi; \
 
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; \
 
300
          fi; \
 
301
          (which gtkdoc-rebase >/dev/null && \
 
302
            gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR)) || true ; \
288
303
        fi) 
289
304
uninstall-local:
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; \
293
308
        else \
294
 
          for i in $$installfiles; do \
295
 
            rmfile=`basename $$i` ; \
296
 
            echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
297
 
            rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
298
 
          done; \
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; \
305
 
            done; \
306
 
          fi; \
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; \
314
 
                fi; \
315
 
        fi) 
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' ; \
 
310
        fi;
317
311
 
318
312
#
319
313
# Checks
326
320
 
327
321
check: check-hierarchy
328
322
 
 
323
# wildcard is apparently not portable to other makes, hence the use of find
 
324
inspect_files = $(shell find $(srcdir)/inspect -name '*.xml')
 
325
 
 
326
check-inspected-versions:
 
327
        @echo Checking plugin versions of inspected plugin data ...; \
 
328
        fail=0 ; \
 
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; \
 
333
            echo ; \
 
334
            fail=1; \
 
335
          fi ; \
 
336
        done ; \
 
337
        exit $$fail
329
338
 
330
339
#
331
340
# Require gtk-doc when making dist
340
349
 
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
344
 
        mkdir $(distdir)/xml
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
351
 
 
352
 
        images=$(HTML_IMAGES) ;               \
353
 
        for i in "" $$images ; do                     \
354
 
          if test "$$i" != ""; then cp $(srcdir)/$$i $(distdir)/html ; fi; \
355
 
        done
356
 
 
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
 
358
 
 
359
.PHONY : dist-hook-local docs
358
360