forked from SoftwareHeritage/swhapguide
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (23 loc) · 772 Bytes
/
Makefile
File metadata and controls
30 lines (23 loc) · 772 Bytes
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
# Depends: rubber
MDS = $(wildcard SwhapGuide-*.md) SwhapGuide-GitHub-CLI
TEXS = $(patsubst %.md,%.tex,$(MDS))
PDFS = $(patsubst %.md,%.pdf,$(MDS))
MAIN = SwhapGuide-GitHub-CLI
all: $(PDFS)
.PRECIOUS: $(TEXS)
%.tex: %.md
pandoc -s $< -f markdown+fenced_code_blocks+fenced_code_attributes+pipe_tables -t latex --template=swhap-template.latex -H swhapguide-header.tex --filter pandoc-xnos --listings --toc --biblatex --bibliography=swhap.bib -o $@
%.pdf: %.tex
ifeq (, $(shell PATH=$(PATH) which rubber))
echo "No rubber in $(PATH), falling back to basic pdflatex calls"
pdflatex $<
biber $*
pdflatex $<
else
rubber -m pdftex $<
endif
clean: $(patsubst %,%/clean,$(TEXS))
%/clean:
if [ -f $* ]; then rubber -m pdftex --clean $* ; fi
rm -f $*
distclean: clean