Add single book Makefile
This commit is contained in:
parent
0a7fae10a4
commit
75465bec99
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
pdf/
|
||||
*.pdf
|
||||
|
|
17
Makefile.book
Normal file
17
Makefile.book
Normal file
|
@ -0,0 +1,17 @@
|
|||
TARGET = book.pdf
|
||||
SRCDIR = src
|
||||
|
||||
PANDOC = pandoc
|
||||
PFLAGS =
|
||||
|
||||
SRCS = $(sort $(wildcard $(SRCDIR)/*.md))
|
||||
|
||||
.PHONY: all
|
||||
all: $(TARGET)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
$(RM) -r $(TARGET)
|
||||
|
||||
$(TARGET): $(SRCS)
|
||||
$(PANDOC) $(PFLAGS) $^ -o $@
|
|
@ -2,7 +2,7 @@ PDFDIR = pdf
|
|||
SRCDIR = src
|
||||
|
||||
PANDOC = pandoc
|
||||
PANDOCFLAGS = -f markdown -t latex
|
||||
PFLAGS =
|
||||
|
||||
SRCS = $(shell find $(SRCDIR) -type f -iname '*.md')
|
||||
PDFS = $(patsubst $(SRCDIR)/%.md,$(PDFDIR)/%.pdf,$(SRCS))
|
||||
|
@ -16,4 +16,4 @@ clean:
|
|||
|
||||
$(PDFDIR)/%.pdf: $(SRCDIR)/%.md
|
||||
@mkdir -p $(@D)
|
||||
$(PANDOC) $(PANDOCFLAGS) $< -o $@
|
||||
$(PANDOC) $(PFLAGS) $< -o $@
|
Loading…
Reference in New Issue
Block a user