1 # -*- mode: makefile -*-
3 ####################################
4 # Everything below here is generic #
5 ####################################
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
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
)
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.
24 # we don't install anything in tests
25 #TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
29 $(DOC_MAIN_SGML_FILE
) \
30 $(DOC_MODULE
)-sections.txt \
31 $(DOC_MODULE
)-overrides.txt
37 DOC_STAMPS
=setup-build.stamp scan-build.stamp sgml-build.stamp \
38 html-build.stamp pdf-build.stamp \
39 sgml.stamp html.stamp pdf.stamp
43 $(DOC_MODULE
).hierarchy \
44 $(DOC_MODULE
).interfaces \
45 $(DOC_MODULE
).prerequisites \
49 $(DOC_MODULE
)-undocumented.txt \
50 $(DOC_MODULE
)-undeclared.txt \
51 $(DOC_MODULE
)-unused.txt
53 CLEANFILES
= $(SCANOBJ_FILES
) $(REPORT_FILES
) $(DOC_STAMPS
) \
66 check-local
: html-build.stamp pdf-build.stamp
67 @ts1
=`cat ts`;ts2
=`date $(TS_FMT)`;tsd
=`echo $$ts2-$$ts1 | bc`; \
68 echo
" DOC `$(DATE_FMT_CMD)$$tsd`: All done"
70 docs
: html-build.stamp pdf-build.stamp
71 @ts1
=`cat ts`;ts2
=`date $(TS_FMT)`;tsd
=`echo $$ts2-$$ts1 | bc`; \
72 echo
" DOC `$(DATE_FMT_CMD)$$tsd`: All done"
74 $(REPORT_FILES
): sgml-build.stamp
77 @echo
>ts
`date $(TS_FMT)`;
82 -@if
test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
83 echo
' DOC Preparing build'; \
84 files
=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \
85 if
test "x$$files" != "x" ; then \
86 for file in
$$files ; do \
87 destdir
=`dirname $(abs_builddir)/$$file`; \
88 test -d
"$$destdir" || mkdir
-p
"$$destdir"; \
89 test -f
$(abs_srcdir
)/$$file && \
90 cp
-pf
$(abs_srcdir
)/$$file $(abs_builddir
)/$$file || true
; \
94 @touch setup-build.stamp
98 scan-build.stamp
: ts setup-build.stamp
$(HFILE_GLOB
) $(CFILE_GLOB
)
99 @ts1
=`cat ts`;ts2
=`date $(TS_FMT)`;tsd
=`echo $$ts2-$$ts1 | bc`; \
100 echo
" DOC `$(DATE_FMT_CMD)$$tsd`: Scanning header files"
102 for i in
$(DOC_SOURCE_DIR
) ; do \
103 _source_dir
="$${_source_dir} --source-dir=$$i" ; \
105 echo
"gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES
)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES)" >gtkdoc-scan.log
; \
106 PATH
=$(abs_top_builddir
):$(PATH
) PYTHONPATH
=$(abs_top_builddir
):$(abs_top_srcdir
):$(PYTHONPATH
) \
107 gtkdoc-scan
--module
=$(DOC_MODULE
) --ignore-headers
="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS
) $(EXTRA_HFILES
) 2>&1 | tee
-a gtkdoc-scan.log
108 @if grep
-l
'^..*$$' $(DOC_MODULE
).types
> /dev
/null
2>&1 ; then \
109 ts1
=`cat ts`;ts2
=`date $(TS_FMT)`;tsd
=`echo $$ts2-$$ts1 | bc`; \
110 echo
" DOC `$(DATE_FMT_CMD)$$tsd`: Introspecting gobjects"; \
111 scanobj_options
=""; \
112 if
test "x$(V)" = "x1"; then \
113 scanobj_options
="--verbose"; \
115 echo
"gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) $$scanobj_options" >gtkdoc-scangobj.log
; \
116 PATH
=$(abs_top_builddir
):$(PATH
) PYTHONPATH
=$(abs_top_builddir
):$(abs_top_srcdir
):$(PYTHONPATH
) \
117 CC
="$(GTKDOC_CC)" LD
="$(GTKDOC_LD)" RUN
="$(GTKDOC_RUN)" CFLAGS
="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS
="$(GTKDOC_LIBS) $(LDFLAGS)" \
118 gtkdoc-scangobj
$(SCANGOBJ_OPTIONS
) --module
=$(DOC_MODULE
) $$scanobj_options 2>&1 | tee
-a gtkdoc-scangobj.log
; \
120 for i in
$(SCANOBJ_FILES
) ; do \
121 test -f
$$i || touch
$$i ; \
124 @touch scan-build.stamp
126 $(DOC_MODULE
)-decl.txt
$(SCANOBJ_FILES
) $(DOC_MODULE
)-sections.txt
$(DOC_MODULE
)-overrides.txt
: scan-build.stamp
131 sgml-build.stamp
: setup-build.stamp
$(DOC_MODULE
)-decl.txt
$(SCANOBJ_FILES
) $(HFILE_GLOB
) $(CFILE_GLOB
) $(DOC_MODULE
)-sections.txt
$(DOC_MODULE
)-overrides.txt
$(expand_content_files
) xml
/gtkdocentities.ent
132 @ts1
=`cat ts`;ts2
=`date $(TS_FMT)`;tsd
=`echo $$ts2-$$ts1 | bc`; \
133 echo
" DOC `$(DATE_FMT_CMD)$$tsd`: Building XML"
135 for i in
$(DOC_SOURCE_DIR
) ; do \
136 _source_dir
="$${_source_dir} --source-dir=$$i" ; \
138 echo
"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)" >gtkdoc-mkdb.log
; \
139 PATH
=$(abs_top_builddir
):$(PATH
) PYTHONPATH
=$(abs_top_builddir
):$(abs_top_srcdir
):$(PYTHONPATH
) \
140 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
) 2>&1 | tee
-a gtkdoc-mkdb.log
141 @touch sgml-build.stamp
143 sgml.stamp
: sgml-build.stamp
146 $(DOC_MAIN_SGML_FILE
): sgml-build.stamp
149 xml
/gtkdocentities.ent
: Makefile
150 @
$(MKDIR_P
) $(@D
) && ( \
151 echo
"<!ENTITY package \"$(PACKAGE)\">"; \
152 echo
"<!ENTITY package_bugreport \"$(PACKAGE_BUGREPORT)\">"; \
153 echo
"<!ENTITY package_name \"$(PACKAGE_NAME)\">"; \
154 echo
"<!ENTITY package_string \"$(PACKAGE_STRING)\">"; \
155 echo
"<!ENTITY package_tarname \"$(PACKAGE_TARNAME)\">"; \
156 echo
"<!ENTITY package_url \"$(PACKAGE_URL)\">"; \
157 echo
"<!ENTITY package_version \"$(PACKAGE_VERSION)\">"; \
162 html-build.stamp
: sgml.stamp
$(DOC_MAIN_SGML_FILE
) $(content_files
)
163 @ts1
=`cat ts`;ts2
=`date $(TS_FMT)`;tsd
=`echo $$ts2-$$ts1 | bc`; \
164 echo
" DOC `$(DATE_FMT_CMD)$$tsd`: Building HTML"
167 @mkhtml_options
=""; \
168 if
test "x$(V)" = "x1"; then \
169 mkhtml_options
="$$mkhtml_options --verbose"; \
171 echo
"gtkdoc-mkhtml --uninstalled --path="$(abs_srcdir
)" $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)" >gtkdoc-mkhtml.log
; \
172 cd html
&& PATH
=$(abs_top_builddir
):$(PATH
) PYTHONPATH
=$(abs_top_builddir
):$(abs_top_srcdir
):$(PYTHONPATH
) ABS_TOP_SRCDIR
=$(abs_top_srcdir
) \
173 gtkdoc-mkhtml
--uninstalled
--path
="$(abs_srcdir)" $$mkhtml_options $(MKHTML_OPTIONS
) $(DOC_MODULE
) ..
/$(DOC_MAIN_SGML_FILE
) 2>&1 | tee
-a ..
/gtkdoc-mkhtml.log
174 -@
test "x$(HTML_IMAGES)" = "x" || \
175 for file in
$(HTML_IMAGES
) ; do \
176 test -f
$(abs_srcdir
)/$$file && cp
$(abs_srcdir
)/$$file $(abs_builddir
)/html
; \
177 test -f
$(abs_builddir
)/$$file && cp
$(abs_builddir
)/$$file $(abs_builddir
)/html
; \
179 @ts1
=`cat ts`;ts2
=`date $(TS_FMT)`;tsd
=`echo $$ts2-$$ts1 | bc`; \
180 echo
" DOC `$(DATE_FMT_CMD)$$tsd`: Fixing cross-references"
181 @echo
"gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)" >gtkdoc-fixxref.log
; \
182 PATH
=$(abs_top_builddir
):$(PATH
) PYTHONPATH
=$(abs_top_builddir
):$(abs_top_srcdir
):$(PYTHONPATH
) \
183 gtkdoc-fixxref
--module
=$(DOC_MODULE
) --module-dir
=html
--html-dir
=$(HTML_DIR
) $(FIXXREF_OPTIONS
) 2>&1 | tee
-a gtkdoc-fixxref.log
184 @touch html-build.stamp
188 pdf-build.stamp
: sgml.stamp
$(DOC_MAIN_SGML_FILE
) $(content_files
)
189 @ts1
=`cat ts`;ts2
=`date $(TS_FMT)`;tsd
=`echo $$ts2-$$ts1 | bc`; \
190 echo
" DOC `$(DATE_FMT_CMD)$$tsd`: Building PDF"
191 @
rm -f
$(DOC_MODULE
).pdf
193 if
test "x$(V)" = "x1"; then \
194 mkpdf_options
="$$mkpdf_options --verbose"; \
196 if
test "x$(HTML_IMAGES)" != "x"; then \
197 for img in
$(HTML_IMAGES
); do \
198 part
=`dirname $$img`; \
199 echo
$$mkpdf_options | grep
>/dev
/null
"\-\-imgdir=$$part "; \
200 if
test $$?
!= 0; then \
201 mkpdf_options
="$$mkpdf_options --imgdir=$$part"; \
205 echo
"gtkdoc-mkpdf --uninstalled --path="$(abs_srcdir
)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS)" >gtkdoc-mkpdf.log
; \
206 PATH
=$(abs_top_builddir
):$(PATH
) PYTHONPATH
=$(abs_top_builddir
):$(abs_top_srcdir
):$(PYTHONPATH
) ABS_TOP_SRCDIR
=$(abs_top_srcdir
) \
207 gtkdoc-mkpdf
--uninstalled
--path
="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE
) $(DOC_MAIN_SGML_FILE
) $(MKPDF_OPTIONS
) 2>&1 | tee
-a gtkdoc-mkpdf.log
208 @touch pdf-build.stamp
212 # we need to enforce a rebuild for the tests
214 @
rm -f
*~
*.bak ts gtkdoc-
*.log
216 @if echo
$(SCAN_OPTIONS
) | grep
-q
"\-\-rebuild-types" ; then \
217 rm -f
$(DOC_MODULE
).types
; \
219 $(MAKE
) distclean-local
222 @
rm -rf xml html
$(REPORT_FILES
) $(DOC_MODULE
).pdf \
223 $(DOC_MODULE
)-decl-list.txt
$(DOC_MODULE
)-decl.txt
224 @if
test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
225 rm -f
$(SETUP_FILES
) $(expand_content_files
) $(DOC_MODULE
).types
; \
228 maintainer-clean-local
:
231 .PHONY
: dist-hook-local docs