-
Notifications
You must be signed in to change notification settings - Fork 600
Fix make docs #440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix make docs #440
Conversation
`vbatts/pandoc` is the image name, not path of pandoc command, so I don't think it's necessary to be configurable. cc @wking Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
|
LGTM |
| @@ -1,6 +1,5 @@ | |||
|
|
|||
| DOCKER ?= $(shell command -v docker) | |||
| PANDOC ?= $(shell command -v pandoc) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is better to keep PANDOC
PANDOC ?= vbatts/pandoc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
geez this is now a little messy.
Perhaps this $(PANDOC) change best be reverted. Otherwise the whole command for the docs target will have to be overhauled to allow for a local pandoc binary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Mon, May 23, 2016 at 12:23:18PM -0700, Vincent Batts wrote:
Otherwise the whole command for the
docstarget will have to be
overhauled to allow for a local pandoc binary.
How difficult would this be? It looks like it's just moving
‘$(DOCKER) … -u $(shell id -u)’ into a PANDOC fallback (if the shell
can find a local ‘docker’ but not a local ‘pandoc’).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and also making the path to the input and output files
On Mon, May 23, 2016 at 3:31 PM W. Trevor King notifications@github.com
wrote:
In Makefile
#440 (comment)
:@@ -1,6 +1,5 @@
DOCKER ?= $(shell command -v docker)
-PANDOC ?= $(shell command -v pandoc)On Mon, May 23, 2016 at 12:23:18PM -0700, Vincent Batts wrote: Otherwise
the whole command for thedocstarget will have to be overhauled to allow
for a local pandoc binary.
How difficult would this be? It looks like it's just moving ‘$(DOCKER) …
-u $(shell id -u)’ into a PANDOC fallback (if the shell can find a local
‘docker’ but not a local ‘pandoc’).—
You are receiving this because you commented.Reply to this email directly or view it on GitHub
https://github.com/opencontainers/runtime-spec/pull/440/files/5c27e4256d36759e7d1055e9a97e931a1cf79124#r64273634
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Mon, May 23, 2016 at 12:57:53PM -0700, Vincent Batts wrote:
@@ -1,6 +1,5 @@
DOCKER ?= $(shell command -v docker)
-PANDOC ?= $(shell command -v pandoc)and also making the path to the input and output files
Ah, yes. So easiest way to support local pandoc is probably leave
PANDOC variable here and make the docs rules conditional. If PANDOC
is non-empty, use:
and if PANDOC is empty use the current $(DOCKER) invocation with the
hard-coded vbatts/pandoc image.
The alternative is to make variables for the input and output
directories and set them conditionally depending on whether PANDOC is
empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to offer such flexibility? Or does pandoc version matters a lot?
I don't think we should make the Makefile complex to meet such needs, I think people who really want to use their own local pandoc can use it directly without Makefile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Mon, May 23, 2016 at 08:21:25PM -0700, Qiang Huang wrote:
Is it necessary to offer such flexibility? Or does pandoc version
matters a lot?
The flexibility is just “I want to build the docs easily without
installing Docker”. I don't think pandoc versions matter much for us.
I don't think we should make the Makefile complex to meet such
needs, I think people who really want to use their own local pandoc
can use it directly without Makefile.
Sure, but supporting them in the Makefile isn't all that much more
complex. See #448, which also makes the Docker fallback case DRYer
and adds error handling for folks who have neither Docker nor pandoc
installed locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, #448 looks good to me, I'll close this PR, thanks.
|
On Thu, May 19, 2016 at 07:42:43PM -0700, Qiang Huang wrote:
Ah, I had missed all the line continuations, thanks. Why are we using |
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
In dc9daf9 (Makefile: Replace vbatts/pandoc with a PANDOC variable 2016-05-06, opencontainers#428) I'd misunderstood vbatts/pandoc as a call to a locally-installed pandoc, when it's actually the name of a Docker image [1,2]. With this commit, we prefer a local pandoc if one exists, fall back to Docker and vbatts/pandoc if a local 'docker' exists, and raise an error if neither 'pandoc' nor 'docker' exist. [1]: opencontainers#440 [2]: opencontainers#428 (comment) Reported-by: Qiang Huang <h.huangqiang@huawei.com> Reported-by: Lai Jiangshan <jiangshanlai@gmail.com> Signed-off-by: W. Trevor King <wking@tremily.us>
In dc9daf9 (Makefile: Replace vbatts/pandoc with a PANDOC variable 2016-05-06, opencontainers#428) I'd misunderstood vbatts/pandoc as a call to a locally-installed pandoc, when it's actually the name of a Docker image [1,2]. With this commit, we prefer a local pandoc if one exists, fall back to Docker and vbatts/pandoc if a local 'docker' exists, and raise an error if neither 'pandoc' nor 'docker' exist. [1]: opencontainers#440 [2]: opencontainers#428 (comment) Reported-by: Qiang Huang <h.huangqiang@huawei.com> Reported-by: Lai Jiangshan <jiangshanlai@gmail.com> Signed-off-by: W. Trevor King <wking@tremily.us>
vbatts/pandocis the image name, not path of pandoc command,so I don't think it's necessary to be configurable.
cc @wking
Signed-off-by: Qiang Huang h.huangqiang@huawei.com