Skip to content
Snippets Groups Projects
Commit b60156e8 authored by Joel Anderson's avatar Joel Anderson Committed by Jérôme Forissier
Browse files

qemu_v8.mk: update strace-clean to test for Makefile


The 'strace-clean' target runs the 'clean' target in the strace project
directly, and afterwards removes the Makefile and configure scripts as well.
This is the same strategy used by other platforms using strace (hikey.mk and
hikey960.mk), however other platforms check for the existence of the Makefile
before executing $(MAKE), allowing a build to be cleaned multiple times.
Without this check, subsequent invocations of 'strace-clean' (or simply
'clean') fail as there is no Makefile to use.

Fixes:

$ make strace-clean
[...]
$ make strace-clean
[...]
make[1]: Entering directory '/home/goatshriek/optee-armv8/strace'
make[1]: *** No rule to make target 'clean'.  Stop.

Signed-off-by: default avatarJoel Anderson <jeander@vt.edu>
Reviewed-by: default avatarJerome Forissier <jerome.forissier@linaro.org>
parent 571e2daf
No related branches found
No related tags found
No related merge requests found
......@@ -191,9 +191,11 @@ endif
strace-clean:
ifneq ("$(wildcard $(STRACE_PATH))","")
CC=$(CROSS_COMPILE_NS_USER)gcc \
$(MAKE) -C $(STRACE_PATH) clean && \
rm -f $(STRACE_PATH)/Makefile $(STRACE_PATH)/configure
if [ -e $(STRACE_PATH)/Makefile ] ; then \
CC=$(CROSS_COMPILE_NS_USER)gcc \
$(MAKE) -C $(STRACE_PATH) clean && \
rm -f $(STRACE_PATH)/Makefile $(STRACE_PATH)/configure; \
fi
endif
################################################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment