aboutsummaryrefslogtreecommitdiff
path: root/v2/dynamic.mk
blob: 8abb62eaa92da5f995231d8c461a0777970638d2 (plain) (blame)
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
74
75
76
77
78
79
80
81
82
83
.POSIX:
FQDN     = euandre.org
PORT     = 4444
BASE_URL =


default: all

include generated.mk



.SUFFIXES:
.SUFFIXES: .md .html .in .entry-content .entry-env


.in:
	sed \
		-e 's|@FQDN@|$(FQDN)|g'         \
		-e 's|@BASE_URL@|$(BASE_URL)|g' \
		< $< > $@
	if [ -x $< ]; then chmod +x $@; fi

.md.html:
	sh src/development/genhtml.sh $< > $@

.md.entry-content:
	extract -t content $? > $@

.md.entry-env:
	extract -t env     $? > $@


pastebins.html       = $(pastebins.md:.md=.html)


html = \
	$(pastebins.html) \


ALL = \
	src/content/TODOs.html \
	$(html)                \



all: $(ALL)

$(html) src/bin/absolute src/bin/extract src/bin/url-for: src/development/config.env
$(html): src/development/genhtml.sh


collections = pastebins

clean:
	for c in $(collections); do \
		rm -f \
			src/content/$$c/*.entry-* \
			src/content/$$c/*.txt;    \
	done
	rm -rf \
		$(ALL) generated.mk src/development/config.env \

src/content/TODOs.html: TODOs.md
	sh aux/workflow/TODOs.sh -n website -m public-inbox > $@

public: all


check:
dev-check: check

fqdn:
	printf '$(FQDN)'



run: all
	open 'http://localhost:$(PORT)'
	serve -d src/content/ -p $(PORT)

deploy: all
	rsync -avzP src/content/ $(FQDN):/home/user-data/www/default/v2/ --delete