Skip to content
Merged
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
43 changes: 43 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

DOCKER ?= $(shell which docker)
DOC_FILES := \
README.md \
code-of-conduct.md \
principles.md \
ROADMAP.md \
implementations.md \
bundle.md \
runtime.md \
runtime-linux.md \
config.md \
config-linux.md \
runtime-config.md \
runtime-config-linux.md
Copy link
Member

Choose a reason for hiding this comment

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

Is maintaining this hard-coded list going to be a hassle? (ie, would something like $(wildcard *.md) also be correct without the same maintainer cost?)

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought that too, but order matters for how it assembles them in the pdf

Copy link
Contributor

Choose a reason for hiding this comment

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

On Wed, Dec 09, 2015 at 09:37:07AM -0800, Tianon Gravi wrote:

+DOC_FILES := \

  • README.md \
  • code-of-conduct.md \
  • ROADMAP.md \
  • runtime-config-linux.md

Is maintaining this hard-coded list going to be a hassle? (ie,
would something like $(wildcard *.md) also be correct without the
same maintainer cost?)

It looks like the ordering is significant, so the wildcard approach
would require numbering the filenames (e.g. 01-README.md). I think
the hard-coded approach is fine, since filename churn has been small
so far, and will only get smaller as the repository matures (excepting
a few isolated reorgs).

Copy link
Contributor

Choose a reason for hiding this comment

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

On Wed, Dec 09, 2015 at 09:37:07AM -0800, Tianon Gravi wrote:

+DOC_FILES := \

  • README.md \
  • code-of-conduct.md \
  • ROADMAP.md \
  • implementations.md \
  • bundle.md \
  • runtime.md \
  • runtime-linux.md \
  • config.md \
  • config-linux.md \
  • runtime-config.md \
  • runtime-config-linux.md

List is missing principles.md (insert after code-of-conduct.md?).

Copy link
Member

@tianon tianon Dec 9, 2015 via email

Choose a reason for hiding this comment

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


docs: pdf html

pdf:
@mkdir -p output/ && \
$(DOCKER) run \
-it \
--rm \
-v $(shell pwd)/:/input/:ro \
-v $(shell pwd)/output/:/output/ \
-u $(shell id -u) \
vbatts/pandoc -f markdown_github -t latex -o /output/docs.pdf $(patsubst %,/input/%,$(DOC_FILES)) && \
ls -sh $(shell readlink -f output/docs.pdf)

html:
@mkdir -p output/ && \
$(DOCKER) run \
-it \
--rm \
-v $(shell pwd)/:/input/:ro \
-v $(shell pwd)/output/:/output/ \
-u $(shell id -u) \
vbatts/pandoc -f markdown_github -t html5 -o /output/docs.html $(patsubst %,/input/%,$(DOC_FILES)) && \
ls -sh $(shell readlink -f output/docs.html)

clean:
rm -rf output/ *~