diff mbox series

gtk-doc: don't regenerate gtk-doc in do_install

Message ID 20180321164051.22869-1-ross.burton@intel.com
State Accepted
Commit 9ea9d61f26a942dbbc90070b40ba0209021a4b46
Headers show
Series gtk-doc: don't regenerate gtk-doc in do_install | expand

Commit Message

Ross Burton March 21, 2018, 4:40 p.m. UTC
In out-of-tree builds gtk-doc's setup-build target copies all the content from
$srcdir to $builddir. However, if some of this content is regenerated at
configure time this can happen:

1) configure writes new build/version.xml
2) make compile copies content, including the tarball's src/version.xml
   to build/version.xml, and generates gtk-doc.
3) make install notices build/version.xml is older than configure.status,
   so regenerates gtk-doc.

gtk-doc generation is a slow process at the best of times, so doing it twice
isn't good.

Signed-off-by: Ross Burton <ross.burton@intel.com>

---
 meta/recipes-gnome/gtk-doc/files/no-clobber.patch | 27 +++++++++++++++++++++++
 meta/recipes-gnome/gtk-doc/gtk-doc_1.27.bb        |  1 +
 2 files changed, 28 insertions(+)
 create mode 100644 meta/recipes-gnome/gtk-doc/files/no-clobber.patch

-- 
2.11.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/recipes-gnome/gtk-doc/files/no-clobber.patch b/meta/recipes-gnome/gtk-doc/files/no-clobber.patch
new file mode 100644
index 00000000000..b0a5dcade21
--- /dev/null
+++ b/meta/recipes-gnome/gtk-doc/files/no-clobber.patch
@@ -0,0 +1,27 @@ 
+In out-of-tree builds gtk-doc's setup-build target copies all the content from $srcdir to $builddir.
+
+However, if some of this content is regenerated at configure time this can happen:
+
+1) configure writes new build/version.xml
+2) make compile copies content, including the tarball's src/version.xml
+   to build/version.xml, and generates gtk-doc.
+3) make install notices build/version.xml is older than configure.status,
+   so regenerates gtk-doc.
+
+gtk-doc generation is a slow process at the best of times, so doing it twice isn't good.
+
+Solve this by changing cp --force to cp --no-clobber, so setup-build only copies
+files which don't already exist.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/gtk-doc.make b/gtk-doc.make
+index f87eaab..246f3c0 100644
+--- a/gtk-doc.make
++++ b/gtk-doc.make
+@@ -113,3 +113,3 @@ setup-build.stamp:
+ 	      test -f $(abs_srcdir)/$$file && \
+-	        cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \
++	        cp -pn $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \
+ 	    done; \
diff --git a/meta/recipes-gnome/gtk-doc/gtk-doc_1.27.bb b/meta/recipes-gnome/gtk-doc/gtk-doc_1.27.bb
index b907bae1478..45528111c13 100644
--- a/meta/recipes-gnome/gtk-doc/gtk-doc_1.27.bb
+++ b/meta/recipes-gnome/gtk-doc/gtk-doc_1.27.bb
@@ -23,6 +23,7 @@  SRC_URI[archive.sha256sum] = "e26bd3f7080c749b1cb66c46c6bf8239e2f320a949964fb9c6
 SRC_URI += "file://0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch \
            file://0001-Do-not-error-out-if-xsltproc-is-not-found.patch \
            file://conditionaltests.patch \
+           file://no-clobber.patch \
            "
 SRC_URI_append_class-native = " file://pkg-config-native.patch"