From 3b2a8777b1720b4f5e9e6a33cb154bee255a306b Mon Sep 17 00:00:00 2001 From: Peter Oberparleiter Date: Mon, 22 Jan 2018 14:56:42 +0100 Subject: [PATCH] common.mak: Fix disappearing check errors When 'make C=1' reports a fatal error for a source file, re-running 'make C=1' will no longer report this error because the target object file was successfully created before the check was run. Fix this by moving the check before the compilation step so that the object file is not built in case of a fatal check error. Signed-off-by: Peter Oberparleiter Reviewed-by: Michael Holzheu Signed-off-by: Stefan Haberland --- common.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.mak b/common.mak index 67cdf692..2891a344 100644 --- a/common.mak +++ b/common.mak @@ -220,10 +220,10 @@ export AS LD CC CPP AR NM STRIP OBJCOPY OBJDUMP INSTALL CFLAGS CXXFLAGS \ # Overwrite implicite makefile rules for having nice compile output %.o: %.c - $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c $< -o $@ ifeq ("${C}","1") $(CHECKTOOL) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c $< -o $@ endif + $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c $< -o $@ %.o: %.cpp $(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) -c $< -o $@