Skip to content

Commit

Permalink
build: skip documentation generation if no ICU
Browse files Browse the repository at this point in the history
Closes: nodejs#41077
  • Loading branch information
Trott committed Dec 5, 2021
1 parent 6ef6bdf commit b7b7c92
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -737,21 +737,39 @@ $(LINK_DATA): $(wildcard lib/*.js) tools/doc/apilinks.mjs | out/doc
$(VERSIONS_DATA): CHANGELOG.md src/node_version.h tools/doc/versions.mjs
$(call available-node, tools/doc/versions.mjs $@)

node_use_icu = $(call available-node,"-p" "process.versions.icu != undefined")

out/doc/api/%.json out/doc/api/%.html: doc/api/%.md tools/doc/generate.mjs \
tools/doc/markdown.mjs tools/doc/html.mjs tools/doc/json.mjs \
tools/doc/apilinks.mjs $(VERSIONS_DATA) | $(LINK_DATA) out/doc/api
$(call available-node, $(gen-api))
@if [ "$(shell $(node_use_icu))" != "true" ]; then \
echo "Skipping documentation generation (no ICU)"; \
else \
$(call available-node, $(gen-api)) \
fi

out/doc/api/all.html: $(apidocs_html) tools/doc/allhtml.mjs \
tools/doc/apilinks.mjs | out/doc/api
$(call available-node, tools/doc/allhtml.mjs)
@if [ "$(shell $(node_use_icu))" != "true" ]; then \
echo "Skipping HTML single-page doc generation (no ICU)"; \
else \
$(call available-node, tools/doc/allhtml.mjs) \
fi

out/doc/api/all.json: $(apidocs_json) tools/doc/alljson.mjs | out/doc/api
$(call available-node, tools/doc/alljson.mjs)
@if [ "$(shell $(node_use_icu))" != "true" ]; then \
echo "Skipping JSON single-file generation (no ICU)"; \
else \
$(call available-node, tools/doc/alljson.mjs) \
fi

.PHONY: out/doc/api/stability
out/doc/api/stability: out/doc/api/all.json tools/doc/stability.mjs | out/doc/api
$(call available-node, tools/doc/stability.mjs)
@if [ "$(shell $(node_use_icu))" != "true" ]; then \
echo "Skipping stability indicator generation (no ICU)"; \
else \
$(call available-node, tools/doc/stability.mjs) \
fi

.PHONY: docopen
docopen: out/doc/api/all.html
Expand Down

0 comments on commit b7b7c92

Please sign in to comment.