aboutsummaryrefslogtreecommitdiff
path: root/v2/dynamic.mk
blob: 09edfa74e1e9a7d309b6a59afd6033bc73b3e94c (about) (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
.POSIX:
FQDN     = euandre.org
PORT     = 4444
BASE_URL =


default: all

include generated.mk



.SUFFIXES:
.SUFFIXES: .md .html .in


.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 $< > $@


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


html = \
	$(pastebins.html) \


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



all: $(ALL)

$(html) src/bin/absolute 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/*.txt \
			src/content/$$c/*.atom; \
	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