TildePublishingUnlimited/recipes/Makefile

29 lines
686 B
Makefile

#Makefile for individual recipe pdfs using pandoc
#some variable declarations
# Directories for document inputs (markdown) and outputs (pdf) and pandoc template (tex)
INPUTDIR = inputs
OUTPUTDIR = outputs
TEMPLATEDIR = templates
# Program and option variables
CC = pandoc
PANTEMPLATE = $(TEMPLATEDIR)/recipe.tex#specifying template as variable for easier changing of templates.
PANDOCFLAGS = -s --template="$(PANTEMPLATE)"
MDS = $(wildcard $(INPUTDIR)/*.md)
PDFS = $(patsubst %.md,$(OUTPUTDIR)/%.pdf,$(notdir $(wildcard $(INPUTDIR)/*.md)))
.PHONY : clean test
default : $(PDFS)
$(PDFS) : $(MDS)
$(CC) $(PANDOCFLAGS) $< -o $@ #
all : clean $(PDFS)
clean :
@rm -f $(PDFS)