From: Changqing Li Date: Wed, 1 Apr 2020 02:32:55 +0000 (+0800) Subject: perf: fix compile error when rebuilding X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~11397 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57b4745cca8d486c1f20b8f01f4a25cb59c4b968;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git perf: fix compile error when rebuilding Fix error like: Makefile.perf:597: recipe for target 'intel_x86_64-wrs-linux/perf/1.0-r9/perf-1.0/perf-in.o] Error 2 Makefile.perf:220: recipe for target 'sub-make' failed make[1]: *** [sub-make] Error 2 Makefile:69: recipe for target 'all' failed make: *** [all] Error 2 during rebuilding, when kernel version changed, some source files also maybe changed. It could happened that the source under ${S} messed up with some already dropped files and also new files. Fix by clean the ${S} before copy source files. Signed-off-by: Changqing Li Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index e005eb082b8..c4b7b77e991 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb @@ -147,6 +147,7 @@ python copy_perf_source_from_kernel() { src_dir = d.getVar("STAGING_KERNEL_DIR") dest_dir = d.getVar("S") bb.utils.mkdirhier(dest_dir) + bb.utils.prunedir(dest_dir) for s in sources: src = oe.path.join(src_dir, s) dest = oe.path.join(dest_dir, s)