~ubuntu-branches/ubuntu/oneiric/gnome-online-accounts/oneiric-updates

1 by Rodrigo Moya
Import upstream version 3.1.1
1
# -*- mode: makefile -*-
2
3
####################################
4
# Everything below here is generic #
5
####################################
6
7
if GTK_DOC_USE_LIBTOOL
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
8
GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
9
GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
1 by Rodrigo Moya
Import upstream version 3.1.1
10
GTKDOC_RUN = $(LIBTOOL) --mode=execute
11
else
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
12
GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
13
GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
1 by Rodrigo Moya
Import upstream version 3.1.1
14
GTKDOC_RUN =
15
endif
16
17
# We set GPATH here; this gives us semantics for GNU make
18
# which are more like other make's VPATH, when it comes to
19
# whether a source that is a target of one rule is then
20
# searched for in VPATH/GPATH.
21
#
22
GPATH = $(srcdir)
23
24
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
25
26
SETUP_FILES = \
27
	$(content_files)		\
28
	$(DOC_MAIN_SGML_FILE)		\
29
	$(DOC_MODULE)-sections.txt	\
30
	$(DOC_MODULE)-overrides.txt
31
32
EXTRA_DIST = 				\
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
33
	$(HTML_IMAGES)			\
1 by Rodrigo Moya
Import upstream version 3.1.1
34
	$(SETUP_FILES)
35
36
DOC_STAMPS=setup-build.stamp scan-build.stamp tmpl-build.stamp sgml-build.stamp \
37
	html-build.stamp pdf-build.stamp \
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
38
	tmpl.stamp sgml.stamp html.stamp pdf.stamp
1 by Rodrigo Moya
Import upstream version 3.1.1
39
40
SCANOBJ_FILES = 		 \
41
	$(DOC_MODULE).args 	 \
42
	$(DOC_MODULE).hierarchy  \
43
	$(DOC_MODULE).interfaces \
44
	$(DOC_MODULE).prerequisites \
45
	$(DOC_MODULE).signals
46
47
REPORT_FILES = \
48
	$(DOC_MODULE)-undocumented.txt \
49
	$(DOC_MODULE)-undeclared.txt \
50
	$(DOC_MODULE)-unused.txt
51
52
CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
53
54
if ENABLE_GTK_DOC
55
if GTK_DOC_BUILD_HTML
56
HTML_BUILD_STAMP=html-build.stamp
57
else
58
HTML_BUILD_STAMP=
59
endif
60
if GTK_DOC_BUILD_PDF
61
PDF_BUILD_STAMP=pdf-build.stamp
62
else
63
PDF_BUILD_STAMP=
64
endif
65
66
all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
67
else
68
all-local:
69
endif
70
71
docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
72
73
$(REPORT_FILES): sgml-build.stamp
74
75
#### setup ####
76
77
setup-build.stamp:
78
	-@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
79
	    echo '  DOC   Preparing build'; \
80
	    files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \
81
	    if test "x$$files" != "x" ; then \
82
	        for file in $$files ; do \
83
	            test -f $(abs_srcdir)/$$file && \
84
	                cp -pu $(abs_srcdir)/$$file $(abs_builddir)/ || true; \
85
	        done; \
86
	    fi; \
87
	    test -d $(abs_srcdir)/tmpl && \
88
	        { cp -rp $(abs_srcdir)/tmpl $(abs_builddir)/; \
89
	        chmod -R u+w $(abs_builddir)/tmpl; } \
1 by Rodrigo Moya
Import upstream version 3.1.1
90
	fi
91
	@touch setup-build.stamp
92
93
#### scan ####
94
95
scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
96
	@echo '  DOC   Scanning header files'
1 by Rodrigo Moya
Import upstream version 3.1.1
97
	@_source_dir='' ; \
98
	for i in $(DOC_SOURCE_DIR) ; do \
99
	    _source_dir="$${_source_dir} --source-dir=$$i" ; \
100
	done ; \
101
	gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES)
102
	@if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
103
	    echo "  DOC   Introspecting gobjects"; \
104
	    scanobj_options=""; \
105
	    gtkdoc-scangobj 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
106
	    if test "$(?)" = "0"; then \
107
	        if test "x$(V)" = "x1"; then \
108
	            scanobj_options="--verbose"; \
109
	        fi; \
110
	    fi; \
111
	    CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
112
	    gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \
1 by Rodrigo Moya
Import upstream version 3.1.1
113
	else \
114
	    for i in $(SCANOBJ_FILES) ; do \
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
115
	        test -f $$i || touch $$i ; \
1 by Rodrigo Moya
Import upstream version 3.1.1
116
	    done \
117
	fi
118
	@touch scan-build.stamp
119
120
$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
121
	@true
122
123
#### templates ####
124
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
125
tmpl-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
126
	@echo '  DOC   Rebuilding template files'
1 by Rodrigo Moya
Import upstream version 3.1.1
127
	@gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
128
	@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
129
	  if test -w $(abs_srcdir) ; then \
130
	    cp -rp $(abs_builddir)/tmpl $(abs_srcdir)/; \
131
	  fi \
132
	fi
133
	@touch tmpl-build.stamp
134
135
tmpl.stamp: tmpl-build.stamp
136
	@true
137
138
$(srcdir)/tmpl/*.sgml:
139
	@true
140
141
#### xml ####
142
143
sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
144
	@echo '  DOC   Building XML'
1 by Rodrigo Moya
Import upstream version 3.1.1
145
	@-chmod -R u+w $(srcdir)
146
	@_source_dir='' ; \
147
	for i in $(DOC_SOURCE_DIR) ; do \
148
	    _source_dir="$${_source_dir} --source-dir=$$i" ; \
149
	done ; \
150
	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)
151
	@touch sgml-build.stamp
152
153
sgml.stamp: sgml-build.stamp
154
	@true
155
156
#### html ####
157
158
html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
159
	@echo '  DOC   Building HTML'
1 by Rodrigo Moya
Import upstream version 3.1.1
160
	@rm -rf html
161
	@mkdir html
162
	@mkhtml_options=""; \
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
163
	gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
164
	if test "$(?)" = "0"; then \
165
	  if test "x$(V)" = "x1"; then \
166
	    mkhtml_options="$$mkhtml_options --verbose"; \
167
	  fi; \
168
	fi; \
1 by Rodrigo Moya
Import upstream version 3.1.1
169
	gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-path"; \
170
	if test "$(?)" = "0"; then \
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
171
	  mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \
1 by Rodrigo Moya
Import upstream version 3.1.1
172
	fi; \
173
	cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
174
	-@test "x$(HTML_IMAGES)" = "x" || \
175
	for file in $(HTML_IMAGES) ; do \
176
	  if test -f $(abs_srcdir)/$$file ; then \
177
	    cp $(abs_srcdir)/$$file $(abs_builddir)/html; \
178
	  fi; \
179
	  if test -f $(abs_builddir)/$$file ; then \
180
	    cp $(abs_builddir)/$$file $(abs_builddir)/html; \
181
	  fi; \
182
	done;
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
183
	@echo '  DOC   Fixing cross-references'
1 by Rodrigo Moya
Import upstream version 3.1.1
184
	@gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
185
	@touch html-build.stamp
186
187
#### pdf ####
188
189
pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
190
	@echo '  DOC   Building PDF'
191
	@rm -f $(DOC_MODULE).pdf
192
	@mkpdf_options=""; \
193
	gtkdoc-mkpdf 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
194
	if test "$(?)" = "0"; then \
195
	  if test "x$(V)" = "x1"; then \
196
	    mkpdf_options="$$mkpdf_options --verbose"; \
197
	  fi; \
198
	fi; \
1 by Rodrigo Moya
Import upstream version 3.1.1
199
	if test "x$(HTML_IMAGES)" != "x"; then \
200
	  for img in $(HTML_IMAGES); do \
201
	    part=`dirname $$img`; \
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
202
	    echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \
1 by Rodrigo Moya
Import upstream version 3.1.1
203
	    if test $$? != 0; then \
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
204
	      mkpdf_options="$$mkpdf_options --imgdir=$$part"; \
1 by Rodrigo Moya
Import upstream version 3.1.1
205
	    fi; \
206
	  done; \
207
	fi; \
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
208
	gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS)
1 by Rodrigo Moya
Import upstream version 3.1.1
209
	@touch pdf-build.stamp
210
211
##############
212
213
clean-local:
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
214
	@rm -f *~ *.bak
215
	@rm -rf .libs
1 by Rodrigo Moya
Import upstream version 3.1.1
216
217
distclean-local:
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
218
	@rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \
1 by Rodrigo Moya
Import upstream version 3.1.1
219
	    $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
220
	@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
1 by Rodrigo Moya
Import upstream version 3.1.1
221
	    rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \
222
	    rm -rf tmpl; \
223
	fi
224
225
maintainer-clean-local: clean
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
226
	@rm -rf xml html
1 by Rodrigo Moya
Import upstream version 3.1.1
227
228
install-data-local:
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
229
	@installfiles=`echo $(builddir)/html/*`; \
230
	if test "$$installfiles" = '$(builddir)/html/*'; \
231
	then echo 1>&2 'Nothing to install' ; \
1 by Rodrigo Moya
Import upstream version 3.1.1
232
	else \
233
	  if test -n "$(DOC_MODULE_VERSION)"; then \
234
	    installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
235
	  else \
236
	    installdir="$(DESTDIR)$(TARGET_DIR)"; \
237
	  fi; \
238
	  $(mkinstalldirs) $${installdir} ; \
239
	  for i in $$installfiles; do \
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
240
	    echo ' $(INSTALL_DATA) '$$i ; \
1 by Rodrigo Moya
Import upstream version 3.1.1
241
	    $(INSTALL_DATA) $$i $${installdir}; \
242
	  done; \
243
	  if test -n "$(DOC_MODULE_VERSION)"; then \
244
	    mv -f $${installdir}/$(DOC_MODULE).devhelp2 \
245
	      $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \
246
	  fi; \
247
	  $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \
248
	fi
249
250
uninstall-local:
251
	@if test -n "$(DOC_MODULE_VERSION)"; then \
252
	  installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
253
	else \
254
	  installdir="$(DESTDIR)$(TARGET_DIR)"; \
255
	fi; \
256
	rm -rf $${installdir}
257
258
#
259
# Require gtk-doc when making dist
260
#
261
if ENABLE_GTK_DOC
262
dist-check-gtkdoc:
263
else
264
dist-check-gtkdoc:
265
	@echo "*** gtk-doc must be installed and enabled in order to make dist"
266
	@false
267
endif
268
269
dist-hook: dist-check-gtkdoc dist-hook-local
1.1.4 by Didier Roche
Import upstream version 3.2.0.1
270
	@mkdir $(distdir)/tmpl
271
	@mkdir $(distdir)/html
272
	@-cp ./tmpl/*.sgml $(distdir)/tmpl
273
	@cp ./html/* $(distdir)/html
274
	@-cp ./$(DOC_MODULE).pdf $(distdir)/
275
	@-cp ./$(DOC_MODULE).types $(distdir)/
276
	@-cp ./$(DOC_MODULE)-sections.txt $(distdir)/
277
	@cd $(distdir) && rm -f $(DISTCLEANFILES)
278
	@$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html
1 by Rodrigo Moya
Import upstream version 3.1.1
279
280
.PHONY : dist-hook-local docs