xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-gnome/gtk-doc/files/no-clobber.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunFrom 8bc4c1f169f89bc5531da5b7e892b8f20e0f9a18 Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Ross Burton <ross.burton@intel.com>
3*4882a593SmuzhiyunDate: Wed, 21 Mar 2018 14:47:29 +0000
4*4882a593SmuzhiyunSubject: [PATCH] gtk-doc: don't regenerate gtk-doc in do_install
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunIn out-of-tree builds gtk-doc's setup-build target copies all the content from $srcdir to $builddir.
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunHowever, if some of this content is regenerated at configure time this can happen:
9*4882a593Smuzhiyun
10*4882a593Smuzhiyun1) configure writes new build/version.xml
11*4882a593Smuzhiyun2) make compile copies content, including the tarball's src/version.xml
12*4882a593Smuzhiyun   to build/version.xml, and generates gtk-doc.
13*4882a593Smuzhiyun3) make install notices build/version.xml is older than configure.status,
14*4882a593Smuzhiyun   so regenerates gtk-doc.
15*4882a593Smuzhiyun
16*4882a593Smuzhiyungtk-doc generation is a slow process at the best of times, so doing it twice isn't good.
17*4882a593Smuzhiyun
18*4882a593SmuzhiyunSolve this by changing cp --force to cp --no-clobber, so setup-build only copies
19*4882a593Smuzhiyunfiles which don't already exist.
20*4882a593Smuzhiyun
21*4882a593SmuzhiyunUpstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=794571]
22*4882a593SmuzhiyunSigned-off-by: Ross Burton <ross.burton@intel.com>
23*4882a593Smuzhiyun
24*4882a593Smuzhiyun---
25*4882a593Smuzhiyun buildsystems/autotools/gtk-doc.make | 2 +-
26*4882a593Smuzhiyun 1 file changed, 1 insertion(+), 1 deletion(-)
27*4882a593Smuzhiyun
28*4882a593Smuzhiyundiff --git a/buildsystems/autotools/gtk-doc.make b/buildsystems/autotools/gtk-doc.make
29*4882a593Smuzhiyunindex 7d9a27f..8cb336d 100644
30*4882a593Smuzhiyun--- a/buildsystems/autotools/gtk-doc.make
31*4882a593Smuzhiyun+++ b/buildsystems/autotools/gtk-doc.make
32*4882a593Smuzhiyun@@ -111,7 +111,7 @@ setup-build.stamp:
33*4882a593Smuzhiyun 	      destdir=`dirname $(abs_builddir)/$$file`; \
34*4882a593Smuzhiyun 	      test -d "$$destdir" || mkdir -p "$$destdir"; \
35*4882a593Smuzhiyun 	      test -f $(abs_srcdir)/$$file && \
36*4882a593Smuzhiyun-	        cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \
37*4882a593Smuzhiyun+	        cp -pn $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \
38*4882a593Smuzhiyun 	    done; \
39*4882a593Smuzhiyun 	  fi; \
40*4882a593Smuzhiyun 	fi
41