Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
build: allow proper generation of html docs
`gen-doc` always calls `gen-json`, which means it's impossible to generate
html docs. Changed this to pass in the command the user wants to run.
I'm a Makefile novice, so please let me know if there's a better way to
do this :)
  • Loading branch information
maclover7 committed Aug 19, 2017
commit 68c7db9b3904cd37a6726b08a1fa056ea85cf6fb
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -503,14 +503,14 @@ gen-doc = \
else \
cd tools/doc && node ../../$(NPM) install; \
fi;\
[ -x $(NODE) ] && $(NODE) $(gen-json) || node
[ -x $(NODE) ] && $(NODE) $(1) || node $(1)

out/doc/api/%.json: doc/api/%.md
$(gen-doc) $(gen-json)
$(call gen-doc, $(gen-json))

# check if ./node is actually set, else use user pre-installed binary

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this comment is misused here. We have copy of this comment above which is probably should be placed right above gen-doc definition.

@krydos krydos Aug 21, 2017 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to clarify, in our Makefile we have two comments:

 # check if ./node is actually set, else use user pre-installed binary

Both of them are not in the correct place. Line 511 is definitely strange comment I don't see any check for ./node there. Line 493 seems not correct as well since there are no checks too. But I see some checks in gen-doc. So one comment should be removed and another one placed to the gen-doc definition.

out/doc/api/%.html: doc/api/%.md
$(gen-doc) $(gen-html)
$(call gen-doc, $(gen-html))

docopen: $(apidocs_html)
@$(PYTHON) -mwebbrowser file://$(PWD)/out/doc/api/all.html
Expand Down