summaryrefslogtreecommitdiff
path: root/planner/Makefile
blob: 3f47ae429022c6e44a5ce92c7bb4389c5d888bab (plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
DESTDIR = dest
LANG_NAME := $(shell echo $(LANG) | cut -c 1-2 )

LATITUDE ?= "45.81478"
LONGITUDE ?= "9.07522"
TIMEZONE ?= "Europe/Rome"

PDF_TARGETS = $(patsubst templates/%-v.svg,$(DESTDIR)/%-$(LANG_NAME).pdf,$(wildcard templates/*-v.svg))
NUP2_TARGETS = $(patsubst templates/%-v.svg,$(DESTDIR)/%-$(LANG_NAME)-book.pdf,$(wildcard templates/*-A5*-v.svg))
NUP4_TARGETS = $(patsubst templates/%-v.svg,$(DESTDIR)/%-$(LANG_NAME)-book.pdf,$(wildcard templates/*-A6*-v.svg))

.PHONY: all pdf nup clean distclean
all: pdf nup
pdf: $(PDF_TARGETS)
nup: $(NUP4_TARGETS) $(NUP2_TARGETS)

debug:
	echo $(LANG_NAME)

# Individual designs

$(DESTDIR)/daily-95×186-$(LANG_NAME).pdf: templates/daily-95×186-r.svg templates/daily-95×186-v.svg templates/cover-95×186-r.svg planner_generator.py
	mkdir -p $(DESTDIR)
	./planner_generator.py --template daily-95×186 --cover-template cover-95×186-r.svg daily --outdir $(DESTDIR)

$(DESTDIR)/daily-graph-A5-$(LANG_NAME).pdf: templates/daily-graph-A5-r.svg templates/daily-graph-A5-v.svg templates/cover-A5-r.svg planner_generator.py
	./planner_generator.py --template daily-graph-A5 --outdir $(DESTDIR) daily

$(DESTDIR)/daily-points4mm-A5-$(LANG_NAME).pdf: templates/daily-points4mm-A5-r.svg templates/daily-points4mm-A5-v.svg templates/cover-A5-r.svg planner_generator.py
	./planner_generator.py --template daily-points4mm-A5 --outdir $(DESTDIR) daily

$(DESTDIR)/daily-ruled-A5-$(LANG_NAME).pdf: planner_generator.py templates/daily-ruled-A5-r.svg templates/daily-ruled-A5-r.svg templates/cover-A5-r.svg
	./planner_generator.py --template daily-ruled-A5 --outdir $(DESTDIR) daily

$(DESTDIR)/daily-A5-$(LANG_NAME).pdf: planner_generator.py templates/daily-A5-r.svg templates/daily-A5-v.svg templates/cover-A5-r.svg
	./planner_generator.py --template daily-A5 --outdir $(DESTDIR) daily

$(DESTDIR)/daily-A6-$(LANG_NAME).pdf: planner_generator.py templates/daily-A6-r.svg templates/daily-A6-v.svg templates/cover-A6-r.svg
	./planner_generator.py --template daily-A6 --outdir $(DESTDIR) daily

$(DESTDIR)/month-A6-$(LANG_NAME).pdf: planner_generator.py templates/month-A6-r.svg templates/month-A6-v.svg
	./planner_generator.py --template month-A6 --outdir $(DESTDIR) month

$(DESTDIR)/week_health-A6-$(LANG_NAME).pdf: planner_generator.py templates/week_health-A6-r.svg templates/week_health-A6-v.svg templates/cover-A6-r.svg
	./planner_generator.py --template week_health-A6 --latitude $(LATITUDE) --longitude $(LONGITUDE) --timezone $(TIMEZONE) --outdir $(DESTDIR) ephemerisbiweekly

$(DESTDIR)/week_on_one_page-A6-$(LANG_NAME).pdf: planner_generator.py templates/week_on_one_page-A6-r.svg templates/week_on_one_page-A6-v.svg templates/cover-A6-r.svg
	./planner_generator.py --template week_on_one_page-A6 --latitude $(LATITUDE) --longitude $(LONGITUDE) --timezone $(TIMEZONE) --outdir $(DESTDIR) ephemerisbiweekly

$(DESTDIR)/week_on_one_page_dots-A6-$(LANG_NAME).pdf: planner_generator.py templates/week_on_one_page_dots-A6-r.svg templates/week_on_one_page_dots-A6-v.svg templates/cover-A6-r.svg
	./planner_generator.py --template week_on_one_page_dots-A6 --outdir $(DESTDIR) biweekly

$(DESTDIR)/week_on_two_pages-A6-$(LANG_NAME).pdf: planner_generator.py templates/week_on_two_pages-A6-r.svg templates/week_on_two_pages-A6-v.svg templates/cover-A6-r.svg
	./planner_generator.py --template week_on_two_pages-A6 --outdir $(DESTDIR) weekly

$(DESTDIR)/%-$(LANG_NAME).pdf:
	echo "building $@ is not supported yet"


# nup-ping

$(DESTDIR)/%-A5-$(LANG_NAME)-book.pdf: $(DESTDIR)/%-A5-$(LANG_NAME).pdf
	../page_manipulation/a5_book.py $^

$(DESTDIR)/%-A6-$(LANG_NAME)-book.pdf: $(DESTDIR)/%-A6-$(LANG_NAME).pdf
	../page_manipulation/a6_book.py $^

clean:
	rm build/*

distclean:
	rm $(DESTDIR)/*