Commit b17d4d91 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

build: only touch output if build is successful



Running the 'touch' command unconditionally causes the compile step to
return 0 even if the compilation failed.  Instead, only run it if the
compiler succeeded.

Fixes: 4f163443 ("make: Update build artifact timestamps for clang
support")

Change-Id: I46907851fde8bb9e3f73549276e489b6c30ed1fd
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/388324


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatar <ed.rodriguez@netapp.com>
parent f7370b65
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -166,12 +166,12 @@ DEPFLAGS = -MMD -MP -MF $*.d.tmp
COMPILE_C=\
	$(Q)echo "  CC $S/$@"; \
	$(CC) -o $@ $(DEPFLAGS) $(CFLAGS) -c $< && \
	mv -f $*.d.tmp $*.d;touch -c $@
	mv -f $*.d.tmp $*.d && touch -c $@

COMPILE_CXX=\
	$(Q)echo "  CXX $S/$@"; \
	$(CXX) -o $@ $(DEPFLAGS) $(CXXFLAGS) -c $< && \
	mv -f $*.d.tmp $*.d;touch -c $@
	mv -f $*.d.tmp $*.d && touch -c $@

# Link $(OBJS) and $(LIBS) into $@ (app)
LINK_C=\