-
Notifications
You must be signed in to change notification settings - Fork 3
/
configuration.make
48 lines (39 loc) · 1018 Bytes
/
configuration.make
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
41
42
43
44
45
46
47
ifeq ($(NAME),)
NAME = $(shell basename $(CURDIR))
endif
ifeq ($(ABSTRACT)$(ABSTRACT_FROM),)
ifneq ($(wildcard abstract.md),)
ABSTRACT_FROM = abstract.md
endif
endif
ifeq ($(ABSTRACT),)
ifneq ($(ABSTRACT_FROM),)
ABSTRACT := $(shell cat "$(ABSTRACT_FROM)")
endif
endif
ifeq ($(SOURCE),)
SOURCE = $(NAME).md
endif
ifneq ($(BIBLIOGRAPHY),)
BIBARGS = --bibliography=$(BIBLIOGRAPHY)
ifneq ($(CSL),)
BIBARGS = --bibliography=$(BIBLIOGRAPHY) --csl=$(CSL)
endif
BIBLATEX = --biblatex
ifneq ($(BIBSTYLE),)
BIBLATEX = --biblatex -V bibstyle:$(BIBSTYLE)
endif
endif
# TODO: use last section header as bibtitle
REVHASH = $(shell git log -1 --format="%H" -- $(SOURCE))
REVDATE = $(shell git log -1 --format="%ai" -- $(SOURCE))
REVSHRT = $(shell git log -1 --format="%h" -- $(SOURCE))
ifeq ($(DATE),)
DATE = $(REVDATE)
endif
ifneq ($(GITHUB),)
REVLINK = $(GITHUB)commit/$(REVHASH)
GIT_ATOM_FEED = $(GITHUB)commits/master.atom
endif
# set `TOC:=` to disable table of contents in slides
TOC = --toc