[gtk-doc] make: Fix GTKDOC_CHECK for Automake 1.13
- From: Stefan Kost <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] make: Fix GTKDOC_CHECK for Automake 1.13
- Date: Fri, 20 Sep 2013 12:28:05 +0000 (UTC)
commit 7ae93808d823ad10c4a62b2495a170a461ec60ec
Author: David King <amigadave amigadave com>
Date: Wed Jun 5 21:45:38 2013 +0100
make: Fix GTKDOC_CHECK for Automake 1.13
The parallel test driver that is the default in Automake 1.13 and above
creates log files with .log and .trs extensions. It creates the
filenames based on the test name, which in the case of GTKDOC_CHECK is
the absolute path to the gtkdoc-check binary. This is generally
$(prefix)/bin and not writable by the user, which leads to a build
failure.
Avoid this situation by generating a shell script in builddir, which in
turn calls the gtkdoc-check binary. In this way, the log and result file
are created in builddir and the build can proceed as normal.
https://bugzilla.gnome.org/show_bug.cgi?id=701638
gtk-doc.m4 | 7 ++++++-
gtk-doc.make | 7 ++++++-
gtk-doc.notmpl.make | 7 ++++++-
3 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/gtk-doc.m4 b/gtk-doc.m4
index ac2eccb..a303463 100644
--- a/gtk-doc.m4
+++ b/gtk-doc.m4
@@ -11,7 +11,12 @@ AC_DEFUN([GTK_DOC_CHECK],
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
dnl check for tools we added during development
- AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
+ dnl Use AC_CHECK_PROG to avoid the check target using an absolute path that
+ dnl may not be writable by the user. Currently, automake requires that the
+ dnl test name must end in '.test'.
+ dnl https://bugzilla.gnome.org/show_bug.cgi?id=701638
+ AC_CHECK_PROG([GTKDOC_CHECK],[gtkdoc-check],[gtkdoc-check.test])
+ AC_PATH_PROG([GTKDOC_CHECK_PATH],[gtkdoc-check])
AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
diff --git a/gtk-doc.make b/gtk-doc.make
index ac30c4c..14d95e8 100644
--- a/gtk-doc.make
+++ b/gtk-doc.make
@@ -49,7 +49,12 @@ REPORT_FILES = \
$(DOC_MODULE)-undeclared.txt \
$(DOC_MODULE)-unused.txt
-CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
+gtkdoc-check.test: Makefile
+ $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \
+ echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \
+ chmod +x $@
+
+CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test
if ENABLE_GTK_DOC
if GTK_DOC_BUILD_HTML
diff --git a/gtk-doc.notmpl.make b/gtk-doc.notmpl.make
index 104c399..bd0ff00 100644
--- a/gtk-doc.notmpl.make
+++ b/gtk-doc.notmpl.make
@@ -49,7 +49,12 @@ REPORT_FILES = \
$(DOC_MODULE)-undeclared.txt \
$(DOC_MODULE)-unused.txt
-CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
+gtkdoc-check.test: Makefile
+ $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \
+ echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \
+ chmod +x $@
+
+CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test
if ENABLE_GTK_DOC
if GTK_DOC_BUILD_HTML
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]