1 # -*- mode: makefile -*-
3 ####################################
4 # Everything below here is generic #
5 ####################################
8 GTKDOC_CC
= $(LIBTOOL
) --mode
=compile
$(CC
) $(INCLUDES
) $(AM_CFLAGS
) $(CFLAGS
)
9 GTKDOC_LD
= $(LIBTOOL
) --mode
=link
$(CC
) $(AM_CFLAGS
) $(CFLAGS
) $(LDFLAGS
)
11 GTKDOC_CC
= $(CC
) $(INCLUDES
) $(AM_CFLAGS
) $(CFLAGS
)
12 GTKDOC_LD
= $(CC
) $(AM_CFLAGS
) $(CFLAGS
) $(LDFLAGS
)
15 # We set GPATH here; this gives us semantics for GNU make
16 # which are more like other make's VPATH, when it comes to
17 # whether a source that is a target of one rule is then
18 # searched for in VPATH/GPATH.
22 TARGET_DIR
=$(HTML_DIR
)/$(DOC_MODULE
)
27 $(DOC_MAIN_SGML_FILE
) \
28 $(DOC_MODULE
)-sections.txt \
29 $(DOC_MODULE
)-overrides.txt
31 DOC_STAMPS
=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
32 $(srcdir)/tmpl.stamp
$(srcdir)/sgml.stamp
$(srcdir)/html.stamp
36 $(DOC_MODULE
).hierarchy \
37 $(DOC_MODULE
).interfaces \
38 $(DOC_MODULE
).prerequisites \
42 $(DOC_MODULE
)-undocumented.txt \
43 $(DOC_MODULE
)-undeclared.txt \
44 $(DOC_MODULE
)-unused.txt
46 CLEANFILES
= $(SCANOBJ_FILES
) $(REPORT_FILES
) $(DOC_STAMPS
)
49 check-local
: html-build.stamp
54 docs
: html-build.stamp
58 scan-build.stamp
: $(HFILE_GLOB
) $(CFILE_GLOB
)
59 @echo
'gtk-doc: Scanning header files'
60 @
-chmod
-R u
+w
$(srcdir)
61 if grep
-l
'^..*$$' $(srcdir)/$(DOC_MODULE
).types
> /dev
/null
2>&1 ; then \
62 CC
="$(GTKDOC_CC)" LD
="$(GTKDOC_LD)" CFLAGS
="$(GTKDOC_CFLAGS)" LDFLAGS
="$(GTKDOC_LIBS)" $(top_builddir
)/gtkdoc-scangobj
--module
=$(DOC_MODULE
) --output-dir
=$(srcdir) $(SCANGOBJ_OPTIONS
) ; \
65 for i in
$(SCANOBJ_FILES
) ; do \
66 test -f
$$i || touch
$$i ; \
69 PATH
=`pwd`:$(PATH
) PERL5LIB
=`pwd`:$(PERL5LIB
) && cd
$(srcdir) && \
70 gtkdoc-scan
--module
=$(DOC_MODULE
) --source-dir
=$(DOC_SOURCE_DIR
) --ignore-headers
="$(IGNORE_HFILES)" $(EXTRA_HFILES
) $(SCAN_OPTIONS
)
71 touch scan-build.stamp
73 $(DOC_MODULE
)-decl.txt
$(SCANOBJ_FILES
): scan-build.stamp
78 tmpl-build.stamp
: $(DOC_MODULE
)-decl.txt
$(SCANOBJ_FILES
) $(DOC_MODULE
)-sections.txt
$(DOC_MODULE
)-overrides.txt
79 @echo
'gtk-doc: Rebuilding template files'
80 @
-chmod
-R u
+w
$(srcdir)
81 PATH
=`pwd`:$(PATH
) PERL5LIB
=`pwd`:$(PERL5LIB
) && cd
$(srcdir) && \
82 gtkdoc-mktmpl
--module
=$(DOC_MODULE
) $(MKTMPL_OPTIONS
)
83 touch tmpl-build.stamp
85 tmpl.stamp
: tmpl-build.stamp
90 sgml-build.stamp
: $(DOC_MODULE
)-decl.txt
$(SCANOBJ_FILES
) $(DOC_MODULE
)-sections.txt
$(DOC_MODULE
)-overrides.txt
$(expand_content_files
)
91 @echo
'gtk-doc: Building XML'
92 @
-chmod
-R u
+w
$(srcdir)
94 PATH
=`pwd`:$(PATH
) PERL5LIB
=`pwd`:$(PERL5LIB
) 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
)
95 touch sgml-build.stamp
97 sgml.stamp
: sgml-build.stamp
102 html-build.stamp
: sgml.stamp
$(DOC_MAIN_SGML_FILE
) $(content_files
)
103 @echo
'gtk-doc: Building HTML'
104 @
-chmod
-R u
+w
$(srcdir)
105 rm -rf
$(srcdir)/html
107 PATH
=`pwd`:$(PATH
) PERL5LIB
=`pwd`:$(PERL5LIB
) && cd
$(srcdir)/html
&& \
108 gtkdoc-mkhtml
$(DOC_MODULE
) ..
/$(DOC_MAIN_SGML_FILE
) $(MKHTML_OPTIONS
)
109 test "x$(HTML_IMAGES)" = "x" ||
( cd
$(srcdir) && cp
$(HTML_IMAGES
) html
)
110 @echo
'gtk-doc: Fixing cross-references'
111 PATH
=`pwd`:$(PATH
) PERL5LIB
=`pwd`:$(PERL5LIB
) && cd
$(srcdir) && \
112 gtkdoc-fixxref
--module-dir
=html
$(FIXXREF_OPTIONS
)
113 touch html-build.stamp
123 rm -rf xml
$(REPORT_FILES
) \
124 $(DOC_MODULE
)-decl-list.txt
$(DOC_MODULE
)-decl.txt
126 maintainer-clean-local
: clean
127 cd
$(srcdir) && rm -rf html \
128 $(DOC_MODULE
)-decl-list.txt
$(DOC_MODULE
)-decl.txt
$(REPORT_FILES
)
130 dist-hook
: dist-hook-local
131 if
test -f
$(srcdir)/$(DOC_MODULE
).types
; then \
132 cp
$(srcdir)/$(DOC_MODULE
).types
$(distdir
)/$(DOC_MODULE
).types
; \
135 .PHONY
: dist-hook-local