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: 4f16344356
("make: Update build artifact timestamps for clang
support")
Change-Id: I46907851fde8bb9e3f73549276e489b6c30ed1fd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/388324
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <ed.rodriguez@netapp.com>
This commit is contained in:
parent
f7370b65bd
commit
b17d4d9135
@ -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=\
|
||||
|
Loading…
Reference in New Issue
Block a user