Skip to content

Commit

Permalink
build: make lint-addon-docs run only if needed
Browse files Browse the repository at this point in the history
Currently, the lint-addon-docs targets recipe will always be run.
This commit makes lint-addon-docs a phony target and adds a new
target named tools/.doclintstamp what will be an actual file,
similar to what the lint-cpp target does.

PR-URL: #24993
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
  • Loading branch information
danbev authored and BethGriggs committed Dec 17, 2018
1 parent d449c36 commit 302081b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1263,10 +1263,14 @@ tools/.cpplintstamp: $(LINT_CPP_FILES)
@$(PYTHON) tools/check-imports.py
@touch $@

lint-addon-docs: test/addons/.docbuildstamp
.PHONY: lint-addon-docs
lint-addon-docs: tools/.doclintstamp

tools/.doclintstamp: test/addons/.docbuildstamp
@echo "Running C++ linter on addon docs..."
@$(PYTHON) tools/cpplint.py $(CPPLINT_QUIET) --filter=$(ADDON_DOC_LINT_FLAGS) \
$(LINT_CPP_ADDON_DOC_FILES_GLOB)
@touch $@

cpplint: lint-cpp
@echo "Please use lint-cpp instead of cpplint"
Expand Down

0 comments on commit 302081b

Please sign in to comment.