forked from larsks/rhel-osp-upgrade-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (39 loc) · 812 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
37
38
39
40
41
42
43
44
45
46
MARKDOWN = marked
MDDOCS= \
database-upgrades.md \
overview.md \
service.md \
service-ha.md \
restart-mariadb-ha.md \
upgrade-1.md \
upgrade-1-ha.md \
upgrade-2.md \
upgrade-3.md \
upgrade-cinder.md \
upgrade-glance.md \
upgrade-horizon.md \
upgrade-keystone.md \
upgrade-nova.md \
upgrade-neutron.md \
upgrade-swift.md \
final-package-upgrade.md \
parallel-nova.md \
upgrade-4.md \
neutron-nova-notifications.md \
qpid-to-rabbitmq.md \
rhel6-rhel7.md
HTMLDOCS= $(MDDOCS:.md=.html)
%.1.html: %.md
$(MARKDOWN) $< > $@ || rm -f $@
%.2.html: %.1.html
(echo '<html>'; cat $<; echo '</html>') > $@
%.html: %.2.html
title="$(shell xmllint --xpath '//h1/text()' $<)"; \
( \
sed "s|TITLE|$$title|g" head; \
cat $<; \
cat foot; \
) > $@
all: $(HTMLDOCS)
clean:
rm -f $(HTMLDOCS)