summaryrefslogtreecommitdiffstats
path: root/meta/recipes-gnome/gtk-doc/files/no-clobber.patch
blob: 90207d6c12a668e2ea63b29103bea6a792058953 (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
From fa5e31e02b9d3c6c5ec3cdc1f34dd6c179520fd0 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 fb2e7e2..4f6fe2b 100644
--- a/buildsystems/autotools/gtk-doc.make
+++ b/buildsystems/autotools/gtk-doc.make
@@ -112,7 +112,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