зеркало из https://github.com/microsoft/git.git
Merge branch 'jk/make-coccicheck-detect-errors'
Build fix. * jk/make-coccicheck-detect-errors: Makefile: detect errors in running spatch
This commit is contained in:
Коммит
876eb616d3
12
Makefile
12
Makefile
|
@ -2348,9 +2348,17 @@ check: common-cmds.h
|
|||
C_SOURCES = $(patsubst %.o,%.c,$(C_OBJ))
|
||||
%.cocci.patch: %.cocci $(C_SOURCES)
|
||||
@echo ' ' SPATCH $<; \
|
||||
ret=0; \
|
||||
for f in $(C_SOURCES); do \
|
||||
$(SPATCH) --sp-file $< $$f $(SPATCH_FLAGS); \
|
||||
done >$@ 2>$@.log; \
|
||||
$(SPATCH) --sp-file $< $$f $(SPATCH_FLAGS) || \
|
||||
{ ret=$$?; break; }; \
|
||||
done >$@+ 2>$@.log; \
|
||||
if test $$ret != 0; \
|
||||
then \
|
||||
cat $@.log; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
mv $@+ $@; \
|
||||
if test -s $@; \
|
||||
then \
|
||||
echo ' ' SPATCH result: $@; \
|
||||
|
|
Загрузка…
Ссылка в новой задаче