зеркало из https://github.com/microsoft/caffe.git
lint targets should depend on the lint script itself
This commit is contained in:
Родитель
2d2055a4b2
Коммит
dd883bdda7
5
Makefile
5
Makefile
|
@ -62,6 +62,7 @@ NONGEN_CXX_SRCS := $(shell find \
|
|||
examples \
|
||||
tools \
|
||||
-name "*.cpp" -or -name "*.hpp" -or -name "*.cu" -or -name "*.cuh")
|
||||
LINT_SCRIPT := scripts/cpp_lint.py
|
||||
LINT_OUTPUT_DIR := $(BUILD_DIR)/.lint
|
||||
LINT_EXT := lint.txt
|
||||
LINT_OUTPUTS := $(addsuffix .$(LINT_EXT), $(addprefix $(LINT_OUTPUT_DIR)/, $(NONGEN_CXX_SRCS)))
|
||||
|
@ -322,9 +323,9 @@ $(EMPTY_LINT_REPORT): $(LINT_OUTPUTS) | $(BUILD_DIR)
|
|||
$(RM) $(NONEMPTY_LINT_REPORT); \
|
||||
echo "No lint errors!";
|
||||
|
||||
$(LINT_OUTPUTS): $(LINT_OUTPUT_DIR)/%.lint.txt : % | $(LINT_OUTPUT_DIR)
|
||||
$(LINT_OUTPUTS): $(LINT_OUTPUT_DIR)/%.lint.txt : % $(LINT_SCRIPT) | $(LINT_OUTPUT_DIR)
|
||||
@ mkdir -p $(dir $@)
|
||||
@ python ./scripts/cpp_lint.py $< 2>&1 \
|
||||
@ python $(LINT_SCRIPT) $< 2>&1 \
|
||||
| grep -v "^Done processing " \
|
||||
| grep -v "^Total errors found: 0" \
|
||||
> $@ \
|
||||
|
|
Загрузка…
Ссылка в новой задаче