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 Feb 12, 2019
1 parent 3f969d6 commit fde56fa
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 @@ -1216,10 +1216,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 fde56fa

Please sign in to comment.