-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (33 loc) · 1.13 KB
/
Makefile
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
include config.mk
all: $(wildcard config.*) $(OUTPUT) map gzip brotli
check: $(TARG) _bin/check.sh
wget --no-proxy --spider -r -nH -nd -np -nv -p $(HOST)
find $(TARG) | sed "s|$(TARG)/|http://$(HOST)/|; s|:|%3A|; s|/|%2F|g" | xargs -x _bin/check.sh
clean:
rm -rf $(TARG)/*
map: _bin/map.sh $(filter %.html, $(OUTPUT))
@_bin/map.sh
gzip: $(addsuffix .gz, $(filter %.html %.xml %.txt %.css %.svg, $(OUTPUT)))
brotli: $(addsuffix .br, $(filter %.html %.xml %.txt %.css %.svg, $(OUTPUT)))
sync: all
@cd $(TARG) && git add . && git commit -qm ∞ --amend && git push -qf && echo $@
$(TARG)/%.html: %.shtml %.* _bin/html.sh $(LAYERS) # TODO: Merge with the one below
@mkdir -p $(@D)
_bin/html.sh $< $(SXML) > $@
$(TARG)/%.html: %.md %.* _bin/html.sh $(LAYERS)
@mkdir -p $(@D)
_bin/html.sh $< $(SXML) > $@
$(TARG)/%/atom.xml: % _bin/atom.sh $(NOINDX)
@mkdir -p $(@D)
_bin/atom.sh $< $(SXML) > $@
$(TARG)/%.css: %.css _bin/css.sh
@mkdir -p $(@D)
_bin/css.sh $< > $@
$(TARG)/%: %
@mkdir -p $(@D)
cp $< $@
$(TARG)/%.gz: $(TARG)/%
@gzip -9cf $< > $@
$(TARG)/%.br: $(TARG)/%
@brotli -9cf $< > $@
.PHONY: all check clean map gzip sync