~ubuntu-branches/ubuntu/saucy/parole/saucy-proposed

« back to all changes in this revision

Viewing changes to gtk-doc.make

  • Committer: Bazaar Package Importer
  • Author(s): Yves-Alexis Perez, Lionel Le Folgoc, Yves-Alexis Perez
  • Date: 2011-04-24 16:09:19 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110424160919-rpjwaicrdb8f7un2
Tags: 0.2.0.6-1
[ Lionel Le Folgoc ]
* debian/control:
  - drop unneeded build-dep on xulrunner-dev.   closes: #594073
  - suggests a few useful gstreamer0.10 plugins.
  - build-depends on quilt.
* debian/patches:
  - 01_fix-implicit-dso-linking.patch: added, fixes FTBFS with binutils-gold.
  - series: added.                                            closes: #615760
* debian/rules: pass --with quilt to dh.

[ Yves-Alexis Perez ]
* New upstream release.
* Switch to 3.0 (quilt) source format.
* debian/control:
  - update standards version to 3.9.2.
  - drop browser-plugin-parole package.
  - drop quilt build-dep.
  - add build-dep on hardening-includes
  - bump xfce build-deps to 4.8.
* debian/parole.install updated.
* debian/rules:
  - use --fail-missing and manually remove spurious files.
  - drop quilt addon
  - pick build flags from dpkg-buildflags.
  - add -O1, -z,defs and --as-needed to LDFLAGS.
  - add hardening flags to build flags.
  - stop harcoding the shell to bash, it works fine now.      closes: #623830

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
25
25
 
26
 
EXTRA_DIST =                            \
 
26
SETUP_FILES = \
27
27
        $(content_files)                \
28
 
        $(HTML_IMAGES)                  \
29
28
        $(DOC_MAIN_SGML_FILE)           \
30
29
        $(DOC_MODULE)-sections.txt      \
31
30
        $(DOC_MODULE)-overrides.txt
32
31
 
33
 
DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
34
 
        pdf-build.stamp \
35
 
        $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp \
36
 
        $(srcdir)/pdf.stamp
 
32
EXTRA_DIST =                            \
 
33
        $(SETUP_FILES)
 
34
 
 
35
DOC_STAMPS=setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \
 
36
        html-build.stamp pdf-build.stamp \
 
37
        setup.stamp tmpl.stamp sgml.stamp html.stamp pdf.stamp
37
38
 
38
39
SCANOBJ_FILES =                  \
39
40
        $(DOC_MODULE).args       \
70
71
 
71
72
$(REPORT_FILES): sgml-build.stamp
72
73
 
 
74
#### setup ####
 
75
 
 
76
setup-build.stamp:
 
77
        -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
 
78
           echo 'gtk-doc: Preparing build'; \
 
79
           files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \
 
80
           if test "x$$files" != "x" ; then \
 
81
               for file in $$files ; do \
 
82
                   test -f $(abs_srcdir)/$$file && \
 
83
                       cp -p $(abs_srcdir)/$$file $(abs_builddir)/; \
 
84
               done \
 
85
           fi; \
 
86
           test -f $(abs_srcdir)/tmpl && \
 
87
               cp -rp $(abs_srcdir)/tmpl $(abs_builddir)/; \
 
88
        fi
 
89
        @touch setup-build.stamp
 
90
 
 
91
 
 
92
setup.stamp: setup-build.stamp
 
93
        @true
 
94
 
 
95
 
73
96
#### scan ####
74
97
 
75
98
scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
76
99
        @echo 'gtk-doc: Scanning header files'
77
 
        @-chmod -R u+w $(srcdir)
78
 
        @cd $(srcdir) && \
79
 
          gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
80
 
        @if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
81
 
            CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
 
100
        @_source_dir='' ; \
 
101
        for i in $(DOC_SOURCE_DIR) ; do \
 
102
            _source_dir="$${_source_dir} --source-dir=$$i" ; \
 
103
        done ; \
 
104
        gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES)
 
105
        @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \
 
106
            CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) ; \
82
107
        else \
83
 
            cd $(srcdir) ; \
84
108
            for i in $(SCANOBJ_FILES) ; do \
85
109
               test -f $$i || touch $$i ; \
86
110
            done \
92
116
 
93
117
#### templates ####
94
118
 
95
 
tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
 
119
tmpl-build.stamp: setup.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
96
120
        @echo 'gtk-doc: Rebuilding template files'
97
 
        @-chmod -R u+w $(srcdir)
98
 
        @cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
 
121
        @gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
 
122
        @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
 
123
          if test -w $(abs_srcdir) ; then \
 
124
            cp -rp $(abs_builddir)/tmpl $(abs_srcdir)/; \
 
125
          fi \
 
126
        fi
99
127
        @touch tmpl-build.stamp
100
128
 
101
129
tmpl.stamp: tmpl-build.stamp
109
137
sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
110
138
        @echo 'gtk-doc: Building XML'
111
139
        @-chmod -R u+w $(srcdir)
112
 
        @cd $(srcdir) && \
113
 
        gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
 
140
        @_source_dir='' ; \
 
141
        for i in $(DOC_SOURCE_DIR) ; do \
 
142
            _source_dir="$${_source_dir} --source-dir=$$i" ; \
 
143
        done ; \
 
144
        gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS)
114
145
        @touch sgml-build.stamp
115
146
 
116
147
sgml.stamp: sgml-build.stamp
120
151
 
121
152
html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
122
153
        @echo 'gtk-doc: Building HTML'
123
 
        @-chmod -R u+w $(srcdir)
124
 
        @rm -rf $(srcdir)/html
125
 
        @mkdir $(srcdir)/html
 
154
        @rm -rf html
 
155
        @mkdir html
126
156
        @mkhtml_options=""; \
127
157
        gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-path"; \
128
158
        if test "$(?)" = "0"; then \
129
 
          mkhtml_options=--path="$(srcdir)"; \
 
159
          mkhtml_options=--path="$(abs_srcdir)"; \
130
160
        fi; \
131
 
        cd $(srcdir)/html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
132
 
        @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
 
161
        cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
 
162
        -@test "x$(HTML_IMAGES)" = "x" || \
 
163
        for file in $(HTML_IMAGES) ; do \
 
164
          if test -f $(abs_srcdir)/$$file ; then \
 
165
            cp $(abs_srcdir)/$$file $(abs_builddir)/html; \
 
166
          fi; \
 
167
          if test -f $(abs_builddir)/$$file ; then \
 
168
            cp $(abs_builddir)/$$file $(abs_builddir)/html; \
 
169
          fi; \
 
170
        done;
133
171
        @echo 'gtk-doc: Fixing cross-references'
134
 
        @cd $(srcdir) && gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
 
172
        @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
135
173
        @touch html-build.stamp
136
174
 
137
175
#### pdf ####
138
176
 
139
177
pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
140
178
        @echo 'gtk-doc: Building PDF'
141
 
        @-chmod -R u+w $(srcdir)
142
 
        @rm -rf $(srcdir)/$(DOC_MODULE).pdf
 
179
        @rm -rf $(DOC_MODULE).pdf
143
180
        @mkpdf_imgdirs=""; \
144
181
        if test "x$(HTML_IMAGES)" != "x"; then \
145
182
          for img in $(HTML_IMAGES); do \
150
187
            fi; \
151
188
          done; \
152
189
        fi; \
153
 
        cd $(srcdir) && gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_imgdirs $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS)
 
190
        gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_imgdirs $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS)
154
191
        @touch pdf-build.stamp
155
192
 
156
193
##############
160
197
        rm -rf .libs
161
198
 
162
199
distclean-local:
163
 
        cd $(srcdir) && \
164
 
          rm -rf xml $(REPORT_FILES) $(DOC_MODULE).pdf \
165
 
                 $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
 
200
        rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \
 
201
            $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
 
202
        if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
 
203
            rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \
 
204
            rm -rf tmpl; \
 
205
        fi
166
206
 
167
207
maintainer-clean-local: clean
168
 
        cd $(srcdir) && rm -rf xml html
 
208
        rm -rf xml html
169
209
 
170
210
install-data-local:
171
211
        @installfiles=`echo $(srcdir)/html/*`; \
213
253
dist-hook: dist-check-gtkdoc dist-hook-local
214
254
        mkdir $(distdir)/tmpl
215
255
        mkdir $(distdir)/html
216
 
        -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
217
 
        cp $(srcdir)/html/* $(distdir)/html
218
 
        -cp $(srcdir)/$(DOC_MODULE).pdf $(distdir)/
219
 
        -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
220
 
        -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
 
256
        -cp $(build)/tmpl/*.sgml $(distdir)/tmpl
 
257
        cp $(builddir)/html/* $(distdir)/html
 
258
        -cp $(builddir)/$(DOC_MODULE).pdf $(distdir)/
 
259
        -cp $(build)/$(DOC_MODULE).types $(distdir)/
 
260
        -cp $(build)/$(DOC_MODULE)-sections.txt $(distdir)/
221
261
        cd $(distdir) && rm -f $(DISTCLEANFILES)
222
262
        $(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html
223
263