-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
26 lines (19 loc) · 595 Bytes
/
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
SOURCES=docs/latest.html.in _layouts/content_right.html.in _layouts/default.html.in index.html.in 404.html.in js/patch.js.in
OBJECTS=$(subst .in,,$(SOURCES))
default: update
.PHONY: validate-version
validate-version:
@if [ -z "$(VERSION)" ] ; then \
echo "No VERSION set." ; \
false ; \
fi
clean:
-rm $(OBJECTS) > /dev/null 2>&1
update: | validate-version
-rm $(OBJECTS)
make $(OBJECTS)
@echo "Don't forget to commit this"
%.js: %.js.in | validate-version
sed -e "s/%VERSION%/$(VERSION)/" $< > $@
%.html: %.html.in | validate-version
sed -e "s/%VERSION%/$(VERSION)/" $< > $@