blob: 5d3f998200dd8a6a4e48cc8028a43572b8f43eed [file] [log] [blame]
Andrew Geissler635e0e42020-08-21 15:58:33 -05001Makefile: Avoid continual rebuilds of miniperl and associated races
2
3In the Yocto Project, when we run "make install" we notice miniperl
4rebuilding multiple times. Usually this is harmless however sometimes
5race issues occur such as miniperl not being executable.
6
7The issue is that crosspatch is a phony target so it always rebuilds.
8Adding this as a dependency of miniperl means miniperl always rebuilds
9too.
10
11Avoid this by injecting a direct dependency avoiding the phony target.
12miniperl is then only rebuilt when its input changes as desired.
13
14Signed-off-by: Richard Purdie richard.purdie@linuxfoundation.org
15Upstream-Status: Submitted [https://github.com/arsv/perl-cross/pull/95]
16
17Index: perl-5.32.0/Makefile
18===================================================================
19--- perl-5.32.0.orig/Makefile
20+++ perl-5.32.0/Makefile
21@@ -56,7 +56,7 @@ crosspatch: $(CROSSPATCHED)
22
23 # A minor fix for buildroot, force crosspatching when running "make perl modules"
24 # instead of "make all".
25-miniperlmain$O: crosspatch
26+miniperlmain$O: $(CROSSPATCHED)
27
28 # Original versions are not saved anymore; patch generally takes care of this,
29 # and if that fails, reaching for the source tarball is the safest option.