Select Git revision
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Makefile 1.50 KiB
# -----------------------------------------------------------------------------
# settings
# -----------------------------------------------------------------------------
# do not use spaces here, instead use either
# - dashes, as in my-awesome-title, or
# - underscores, as in my_awesome_title
TITLE = title
# -----------------------------------------------------------------------------
# pandoc configuration
# -----------------------------------------------------------------------------
PANDOC = pandoc
PANDOCFLAGS = \
--fail-if-warnings \
--standalone \
--filter pandoc-citeproc \
--pdf-engine=xelatex \
# -----------------------------------------------------------------------------
# sources
# -----------------------------------------------------------------------------
SOURCES_CSV = $(wildcard *.csv)
SOURCES_MD = $(sort $(wildcard chapter-*.md))
# -----------------------------------------------------------------------------
# targets
# -----------------------------------------------------------------------------
default: all
all: $(TITLE).pdf
SUBDIRS = \
img \
$(SUBDIRS):
$(MAKE) -C $@
subdirs: $(SUBDIRS)
$(TITLE).pdf: $(SUBDIRS) metadata.yml $(SOURCES_CSV) $(SOURCES_MD)
$(PANDOC) $(PANDOCFLAGS) -o $@ metadata.yml $(SOURCES_MD)
check: spellcheck
spellcheck:
mdspell --en-us -anrx $(SOURCES_MD)
title:
@echo $(TITLE)
clean:
@for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir $@; \
done
rm -f $(TITLE).pdf
.PHONY: \
all \
check \
clean \
default \
subdirs \
title \
$(SUBDIRS) \