forked from theforeman/foreman-documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (30 loc) · 759 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
SHELL := /bin/bash
DEST := result
PORT := 5000
VERSION_LINKS := 3.2 3.1 3.0 2.5 2.4
.PHONY: all clean html web compile serve
UNAME = $(shell uname)
ifeq ($(UNAME), Linux)
CP_ARGS = -l
endif
ifeq ($(UNAME), Darwin)
CP_ARGS =
endif
all: serve
prep:
mkdir -p $(DEST)/nightly
clean:
$(MAKE) -C guides/ clean
rm -rf $(DEST) web/output/
html: prep
$(MAKE) -C guides/ html BUILD=foreman-el
$(MAKE) -C guides/ html BUILD=foreman-deb
$(MAKE) -C guides/ html BUILD=katello
web: prep
cd web && bundle exec nanoc
compile: web html
cp $(CP_ARGS) -nr web/output/* $(DEST)
cp $(CP_ARGS) -nr guides/build/* $(DEST)/nightly/
for V in $(VERSION_LINKS); do ln -sf nightly $(DEST)/$$V; done
serve: compile
python3 -m http.server --directory ./$(DEST) $(PORT)