summaryrefslogtreecommitdiffstats
path: root/meta/recipes-gnome/gtk-doc/files/no-clobber.patch
blob: d1695479dc02b940d6194b4a2a1e070e846f1c24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From 8bc4c1f169f89bc5531da5b7e892b8f20e0f9a18 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@intel.com>
Date: Wed, 21 Mar 2018 14:47:29 +0000
Subject: [PATCH] gtk-doc: don't regenerate gtk-doc in do_install

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: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=794571]
Signed-off-by: Ross Burton <ross.burton@intel.com>

---
 buildsystems/autotools/gtk-doc.make | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/buildsystems/autotools/gtk-doc.make b/buildsystems/autotools/gtk-doc.make
index 7d9a27f..8cb336d 100644
--- a/buildsystems/autotools/gtk-doc.make
+++ b/buildsystems/autotools/gtk-doc.make
@@ -111,7 +111,7 @@ setup-build.stamp:
 	      destdir=`dirname $(abs_builddir)/$$file`; \
 	      test -d "$$destdir" || mkdir -p "$$destdir"; \
 	      test -f $(abs_srcdir)/$$file && \
-	        cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \
+	        cp -pn $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \
 	    done; \
 	  fi; \
 	fi