From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx> The following shows up on a normal make: mv: cannot stat '/work/git/libtracefs.git/lib/tracefs/libtracefs.a': No such file or directory In order to help with a multithreaded make, the moving of the libtracefs.a before removing it appears to fix some issues. But now we get a message if it doesn't already exist. Only move it and remove it if it already exists. Fixes: 550d8358 ("libtracefs: make the libtracefs.a gen more robust") Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx> --- scripts/utils.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/utils.mk b/scripts/utils.mk index c9b908f1c5d9..af0f14fcbfa7 100644 --- a/scripts/utils.mk +++ b/scripts/utils.mk @@ -60,7 +60,10 @@ do_app_build = \ do_build_static_lib = \ ($(print_static_lib_build) \ - mv $@ $@.rm; $(RM) $@.rm; $(AR) rcs $@ $^) + if [ -f $@ ]; then \ + mv $@ $@.rm; $(RM) $@.rm; \ + fi; \ + $(AR) rcs $@ $^) do_compile_shared_library = \ ($(print_shared_lib_compile) \ -- 2.33.0