Added Brazilian Portuguese translation for help files
[gtk-doc.git] / gtk-doc.notmpl.make
blob104c3993f3ecb1ae06acc0c49aaa2e01b786f2dd
1 # -*- mode: makefile -*-
3 ####################################
4 # Everything below here is generic #
5 ####################################
7 if GTK_DOC_USE_LIBTOOL
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)
10 GTKDOC_RUN = $(LIBTOOL) --mode=execute
11 else
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)
14 GTKDOC_RUN =
15 endif
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.
22 GPATH = $(srcdir)
24 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
26 SETUP_FILES = \
27 $(content_files) \
28 $(DOC_MAIN_SGML_FILE) \
29 $(DOC_MODULE)-sections.txt \
30 $(DOC_MODULE)-overrides.txt
32 EXTRA_DIST = \
33 $(HTML_IMAGES) \
34 $(SETUP_FILES)
36 DOC_STAMPS=setup-build.stamp scan-build.stamp sgml-build.stamp \
37 html-build.stamp pdf-build.stamp \
38 sgml.stamp html.stamp pdf.stamp
40 SCANOBJ_FILES = \
41 $(DOC_MODULE).args \
42 $(DOC_MODULE).hierarchy \
43 $(DOC_MODULE).interfaces \
44 $(DOC_MODULE).prerequisites \
45 $(DOC_MODULE).signals
47 REPORT_FILES = \
48 $(DOC_MODULE)-undocumented.txt \
49 $(DOC_MODULE)-undeclared.txt \
50 $(DOC_MODULE)-unused.txt
52 CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
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
66 all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
67 else
68 all-local:
69 endif
71 docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
73 $(REPORT_FILES): sgml-build.stamp
75 #### setup ####
77 GTK_DOC_V_SETUP=$(GTK_DOC_V_SETUP_$(V))
78 GTK_DOC_V_SETUP_=$(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY))
79 GTK_DOC_V_SETUP_0=@echo " DOC Preparing build";
81 setup-build.stamp:
82 -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
83 files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \
84 if test "x$$files" != "x" ; then \
85 for file in $$files ; do \
86 test -f $(abs_srcdir)/$$file && \
87 cp -pu $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \
88 done; \
89 fi; \
91 $(AM_V_at)touch setup-build.stamp
94 #### scan ####
96 GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_$(V))
97 GTK_DOC_V_SCAN_=$(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY))
98 GTK_DOC_V_SCAN_0=@echo " DOC Scanning header files";
100 GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_$(V))
101 GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY))
102 GTK_DOC_V_INTROSPECT_0=@echo " DOC Introspecting gobjects";
104 scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
105 $(GTK_DOC_V_SCAN)_source_dir='' ; \
106 for i in $(DOC_SOURCE_DIR) ; do \
107 _source_dir="$${_source_dir} --source-dir=$$i" ; \
108 done ; \
109 gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES)
110 $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \
111 scanobj_options=""; \
112 gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \
113 if test "$(?)" = "0"; then \
114 if test "x$(V)" = "x1"; then \
115 scanobj_options="--verbose"; \
116 fi; \
117 fi; \
118 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
119 gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \
120 else \
121 for i in $(SCANOBJ_FILES) ; do \
122 test -f $$i || touch $$i ; \
123 done \
125 $(AM_V_at)touch scan-build.stamp
127 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
128 @true
130 #### xml ####
132 GTK_DOC_V_XML=$(GTK_DOC_V_XML_$(V))
133 GTK_DOC_V_XML_=$(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY))
134 GTK_DOC_V_XML_0=@echo " DOC Building XML";
136 sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files)
137 $(GTK_DOC_V_XML)_source_dir='' ; \
138 for i in $(DOC_SOURCE_DIR) ; do \
139 _source_dir="$${_source_dir} --source-dir=$$i" ; \
140 done ; \
141 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)
142 $(AM_V_at)touch sgml-build.stamp
144 sgml.stamp: sgml-build.stamp
145 @true
147 #### html ####
149 GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_$(V))
150 GTK_DOC_V_HTML_=$(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY))
151 GTK_DOC_V_HTML_0=@echo " DOC Building HTML";
153 GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_$(V))
154 GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY))
155 GTK_DOC_V_XREF_0=@echo " DOC Fixing cross-references";
157 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
158 $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \
159 mkhtml_options=""; \
160 gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \
161 if test "$(?)" = "0"; then \
162 if test "x$(V)" = "x1"; then \
163 mkhtml_options="$$mkhtml_options --verbose"; \
164 fi; \
165 fi; \
166 gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \
167 if test "$(?)" = "0"; then \
168 mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \
169 fi; \
170 cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
171 -@test "x$(HTML_IMAGES)" = "x" || \
172 for file in $(HTML_IMAGES) ; do \
173 if test -f $(abs_srcdir)/$$file ; then \
174 cp $(abs_srcdir)/$$file $(abs_builddir)/html; \
175 fi; \
176 if test -f $(abs_builddir)/$$file ; then \
177 cp $(abs_builddir)/$$file $(abs_builddir)/html; \
178 fi; \
179 done;
180 $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
181 $(AM_V_at)touch html-build.stamp
183 #### pdf ####
185 GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_$(V))
186 GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY))
187 GTK_DOC_V_PDF_0=@echo " DOC Building PDF";
189 pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
190 $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \
191 mkpdf_options=""; \
192 gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \
193 if test "$(?)" = "0"; then \
194 if test "x$(V)" = "x1"; then \
195 mkpdf_options="$$mkpdf_options --verbose"; \
196 fi; \
197 fi; \
198 if test "x$(HTML_IMAGES)" != "x"; then \
199 for img in $(HTML_IMAGES); do \
200 part=`dirname $$img`; \
201 echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \
202 if test $$? != 0; then \
203 mkpdf_options="$$mkpdf_options --imgdir=$$part"; \
204 fi; \
205 done; \
206 fi; \
207 gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS)
208 $(AM_V_at)touch pdf-build.stamp
210 ##############
212 clean-local:
213 @rm -f *~ *.bak
214 @rm -rf .libs
216 distclean-local:
217 @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \
218 $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
219 @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
220 rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \
223 maintainer-clean-local:
224 @rm -rf xml html
226 install-data-local:
227 @installfiles=`echo $(builddir)/html/*`; \
228 if test "$$installfiles" = '$(builddir)/html/*'; \
229 then echo 1>&2 'Nothing to install' ; \
230 else \
231 if test -n "$(DOC_MODULE_VERSION)"; then \
232 installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
233 else \
234 installdir="$(DESTDIR)$(TARGET_DIR)"; \
235 fi; \
236 $(mkinstalldirs) $${installdir} ; \
237 for i in $$installfiles; do \
238 echo ' $(INSTALL_DATA) '$$i ; \
239 $(INSTALL_DATA) $$i $${installdir}; \
240 done; \
241 if test -n "$(DOC_MODULE_VERSION)"; then \
242 mv -f $${installdir}/$(DOC_MODULE).devhelp2 \
243 $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \
244 fi; \
245 $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \
248 uninstall-local:
249 @if test -n "$(DOC_MODULE_VERSION)"; then \
250 installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
251 else \
252 installdir="$(DESTDIR)$(TARGET_DIR)"; \
253 fi; \
254 rm -rf $${installdir}
257 # Require gtk-doc when making dist
259 if ENABLE_GTK_DOC
260 dist-check-gtkdoc: docs
261 else
262 dist-check-gtkdoc:
263 @echo "*** gtk-doc must be installed and enabled in order to make dist"
264 @false
265 endif
267 dist-hook: dist-check-gtkdoc dist-hook-local
268 @mkdir $(distdir)/html
269 @cp ./html/* $(distdir)/html
270 @-cp ./$(DOC_MODULE).pdf $(distdir)/
271 @-cp ./$(DOC_MODULE).types $(distdir)/
272 @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/
273 @cd $(distdir) && rm -f $(DISTCLEANFILES)
274 @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html
276 .PHONY : dist-hook-local docs