[gtk-doc] distcheck: pass and use ABS_TOP_SRCDIR to be able to find data files.
- From: Stefan Kost <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] distcheck: pass and use ABS_TOP_SRCDIR to be able to find data files.
- Date: Fri, 21 May 2010 08:58:29 +0000 (UTC)
commit 89922f1fab12b83fadfc6de37b151e07c35f506c
Author: Stefan Kost <ensonic users sf net>
Date: Fri May 21 11:52:04 2010 +0300
distcheck: pass and use ABS_TOP_SRCDIR to be able to find data files.
Relying on the dirname of gtkdoc-mkhtml is not working as it is generated and thus
in builddir, datafiles are in srcdir.
gtkdoc-mkhtml.in | 14 +++++++++-----
tests/gtk-doc.make | 6 +++---
tests/gtk-doc.notmpl.make | 6 +++---
3 files changed, 15 insertions(+), 11 deletions(-)
---
diff --git a/gtkdoc-mkhtml.in b/gtkdoc-mkhtml.in
index 9b09a88..b6ec796 100644
--- a/gtkdoc-mkhtml.in
+++ b/gtkdoc-mkhtml.in
@@ -33,10 +33,14 @@ shift
if test $uninstalled = yes; then
# this does not work from buiddir!=srcdir
- # we could try this
- # MAKE_SCRDIR=$(abs_srcdir) MAKE_BUILDDIR=$(abs_builddir) gtkdoc-mkhtml ...
gtkdocdir=`dirname $0`
- #echo "uninstalled, gtkdocdir=$gtkdocdir"
+ if test ! -e $gtkdocdir/gtk-doc.xsl; then
+ # try to src dir (set from makefiles) too
+ if test -e $ABS_TOP_SRCDIR/gtk-doc.xsl; then
+ gtkdocdir=$ABS_TOP_SRCDIR
+ fi
+ fi
+ #echo "uninstalled, gtkdocdir=$gtkdocdir, cwd=$PWD"
else
# the first two are needed to resolve datadir
prefix= prefix@
@@ -78,8 +82,8 @@ else
fi
# copy navigation images and stylesheets to html directory ...
-cp -f $gtkdocdir/*.png .
-cp -f $gtkdocdir/*.css .
+cp -f $gtkdocdir/*.png ./
+cp -f $gtkdocdir/*.css ./
echo "timestamp" > ../html.stamp
diff --git a/tests/gtk-doc.make b/tests/gtk-doc.make
index 61a9eac..491e6a2 100644
--- a/tests/gtk-doc.make
+++ b/tests/gtk-doc.make
@@ -112,9 +112,9 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
@-chmod -R u+w $(srcdir)
@rm -rf $(srcdir)/html
@mkdir $(srcdir)/html
- @cd $(srcdir)/html && PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) \
+ @cd $(srcdir)/html && PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) ABS_TOP_SRCDIR=$(abs_top_srcdir) \
gtkdoc-mkhtml --uninstalled --path="$(abs_srcdir)" $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) $(MKHTML_OPTIONS)
- @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
+ @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html/ )
@echo "gtk-doc: `date +%H:%M:%S.%N`: Fixing cross-references"
@cd $(srcdir) && PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) \
gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
@@ -136,7 +136,7 @@ pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
fi; \
done; \
fi; \
- cd $(srcdir) && PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) \
+ cd $(srcdir) && PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) ABS_TOP_SRCDIR=$(abs_top_srcdir) \
gtkdoc-mkpdf --uninstalled --path="$(abs_srcdir)" $$mkpdf_imgdirs $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS)
@touch pdf-build.stamp
diff --git a/tests/gtk-doc.notmpl.make b/tests/gtk-doc.notmpl.make
index 5d14053..b48e3ef 100644
--- a/tests/gtk-doc.notmpl.make
+++ b/tests/gtk-doc.notmpl.make
@@ -96,9 +96,9 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
@-chmod -R u+w $(srcdir)
@rm -rf $(srcdir)/html
@mkdir $(srcdir)/html
- @cd $(srcdir)/html && PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) \
+ @cd $(srcdir)/html && PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) ABS_TOP_SRCDIR=$(abs_top_srcdir) \
gtkdoc-mkhtml --uninstalled --path="$(abs_srcdir)" $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) $(MKHTML_OPTIONS)
- @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
+ @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html/ )
@echo "gtk-doc: `date +%H:%M:%S.%N`: Fixing cross-references"
@cd $(srcdir) && PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) \
gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
@@ -120,7 +120,7 @@ pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
fi; \
done; \
fi; \
- cd $(srcdir) && PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) \
+ cd $(srcdir) && PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) ABS_TOP_SRCDIR=$(abs_top_srcdir) \
gtkdoc-mkpdf --uninstalled --path="$(abs_srcdir)" $$mkpdf_imgdirs $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS)
@touch pdf-build.stamp
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]