Skip to content

Commit

Permalink
added the makefile for building the spec
Browse files Browse the repository at this point in the history
  • Loading branch information
david committed Nov 16, 2017
1 parent 66bcdda commit 3b2e6a6
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions specification/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

# Edit SPECNAME for the name your spec
SPECNAME := disco
# Ensure SPECTOOLS points at your spectools
PANDOC := $(SPECTOOLS)/pandoc
CITEPROC := $(SPECTOOLS)/pandoc-citeproc

# Use "make", "make html", "make pdf", or "make clean"
all: html pdf

html: output/$(SPECNAME).html

pdf: output/$(SPECNAME).pdf

output/$(SPECNAME).html: $(SPECNAME).md $(PANDOC)/template_pandoc.html $(PANDOC)/spec_markdown.css $(CITEPROC)/ieee-with-url.csl $(CITEPROC)/general.bib my.bib
pandoc $(SPECNAME).md --standalone --toc \
--from markdown\
--template $(PANDOC)/template_pandoc.html \
--metadata=pdfn:$(SPECNAME).pdf \
--css=spec_markdown.css \
--filter pandoc-citeproc \
--bibliography=$(CITEPROC)/general.bib \
--bibliography=my.bib \
--csl=$(CITEPROC)/ieee-with-url.csl \
-o output/$(SPECNAME).html
cp $(PANDOC)/spec_markdown.css output

output/$(SPECNAME).pdf: $(SPECNAME).md $(PANDOC)/template_pandoc.latex $(CITEPROC)/ieee-with-url.csl $(CITEPROC)/general.bib my.bib
pandoc $(SPECNAME).md --standalone --toc \
--from markdown\
--template $(PANDOC)/template_pandoc.latex \
--filter pandoc-citeproc \
--bibliography=$(CITEPROC)/general.bib \
--bibliography=my.bib \
--csl=$(CITEPROC)/ieee-with-url.csl \
-o output/$(SPECNAME).pdf

clean:
rm -f output/$(SPECNAME).html output/spec_markdown.css output/$(SPECNAME).pdf

0 comments on commit 3b2e6a6

Please sign in to comment.