-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
40 lines (32 loc) · 1.33 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Edit SPECNAME for the name your spec
SPECNAME := noise_hfs
# 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