forked from OpenTSDB/opentsdb.net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (29 loc) · 744 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
27
28
29
30
31
32
33
34
35
36
SITE_HTML = \
cli.html \
faq.html \
getting-started.html \
http-api.html \
index.html \
manual.html \
metrics.html \
nagios.html \
overview.html \
schema.html \
setup-hbase.html \
tcollector.html \
varnish.html \
CONTENT_DIR = content
CONTENT_HEADER = $(CONTENT_DIR)/header
CONTENT_FOOTER = $(CONTENT_DIR)/footer
all: $(SITE_HTML)
%.html: $(CONTENT_DIR)/%.content
sed '/^<!--.*-->$$/d' $< | cat $(CONTENT_HEADER) - $(CONTENT_FOOTER) > $@-t
title=`sed -n 's/<!--title: *\([^>]*\) *-->/\1 - /p' $<` && \
sed "s/<title>/&$$title/" $@-t > $@
rm -f $@-t
$(SITE_HTML): $(CONTENT_HEADER) $(CONTENT_FOOTER)
clean:
rm -f $(SITE_HTML:.html=.html-t)
distclean: clean
rm -f $(SITE_HTML)
.PHONY: all clean distclean