Skip to content

Commit

Permalink
build: fix lint-md-build dependency
Browse files Browse the repository at this point in the history
PR-URL: #18981
Fixes: #18978
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
joyeecheung authored and addaleax committed Mar 5, 2018
1 parent ef8f90f commit 28a5362
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1056,15 +1056,18 @@ lint-md-clean:
$(RM) -r tools/remark-preset-lint-node/node_modules
$(RM) tools/.*mdlintstamp

.PHONY: lint-md-build
lint-md-build:
@if [ ! -d tools/remark-cli/node_modules ]; then \
echo "Markdown linter: installing remark-cli into tools/"; \
cd tools/remark-cli && $(call available-node,$(run-npm-install)) fi
@if [ ! -d tools/remark-preset-lint-node/node_modules ]; then \
echo "Markdown linter: installing remark-preset-lint-node into tools/"; \
cd tools/remark-preset-lint-node && $(call available-node,$(run-npm-install)) fi
tools/remark-cli/node_modules: tools/remark-cli/package.json
@echo "Markdown linter: installing remark-cli into tools/"
@cd tools/remark-cli && $(call available-node,$(run-npm-install))

tools/remark-preset-lint-node/node_modules: \
tools/remark-preset-lint-node/package.json
@echo "Markdown linter: installing remark-preset-lint-node into tools/"
@cd tools/remark-preset-lint-node && $(call available-node,$(run-npm-install))

.PHONY: lint-md-build
lint-md-build: tools/remark-cli/node_modules \
tools/remark-preset-lint-node/node_modules

.PHONY: lint-md
ifneq ("","$(wildcard tools/remark-cli/node_modules/)")
Expand Down

0 comments on commit 28a5362

Please sign in to comment.