summaryrefslogtreecommitdiff
path: root/build/Makefile.am.gtk-doc
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-06-12 11:15:16 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2009-06-12 11:15:16 +0100
commit7f114b781f5c530d57530e5f76402e41cdabac6b (patch)
tree1778a630d30b249c86f577611fa279f4a643a203 /build/Makefile.am.gtk-doc
parent1498c9c333d7579231ac44a91f00f0a49360702d (diff)
[doc] Workaround read-only tree during make distcheck
This looks to be an ugly necessity to work-around the nasty issue that we currently gtkdoc expect to be run inside the source tree. I'm sure Behdad will be able to resolve this much more elegantly than this quick and fragile attempt.
Diffstat (limited to 'build/Makefile.am.gtk-doc')
-rw-r--r--build/Makefile.am.gtk-doc11
1 files changed, 6 insertions, 5 deletions
diff --git a/build/Makefile.am.gtk-doc b/build/Makefile.am.gtk-doc
index b52fdfa7..71617022 100644
--- a/build/Makefile.am.gtk-doc
+++ b/build/Makefile.am.gtk-doc
@@ -62,11 +62,10 @@ docs: html-build.stamp
#### scan ####
-scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
+scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) $(EXTRA_HFILES)
@echo 'gtk-doc: Scanning header files'
@-chmod -R u+w $(srcdir)
- cd $(srcdir) && \
- gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
+ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) --output-dir=$(srcdir)
if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
else \
@@ -97,11 +96,13 @@ tmpl/*.sgml:
#### xml ####
+# gtkdoc-mkdb is broken and requires a --root-dir=$(srcdir) option
+# The _srcdir diversion is fragile but works for make check; make distcheck
sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
@echo 'gtk-doc: Building XML'
@-chmod -R u+w $(srcdir)
- cd $(srcdir) && \
- 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)
+ _srcdir="`pwd`/$(DOC_SOURCE_DIR)"; \
+ cd $(srcdir) && gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$$_srcdir --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
touch sgml-build.stamp
sgml.stamp: sgml-build.stamp