From 6e4f760178a9ca89b749682f2bb04fcce4d13946 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 12 Dec 2018 15:53:19 +0100 Subject: [PATCH] build: make lint-addon-docs run only if needed 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: https://github.com/nodejs/node/pull/24993 Reviewed-By: Richard Lau Reviewed-By: Joyee Cheung Reviewed-By: Sakthipriyan Vairamani --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 39131804c5bda9..23f4a00c031c20 100644 --- a/Makefile +++ b/Makefile @@ -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"