forked from theforeman/foreman-documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (32 loc) · 853 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
SHELL := /bin/bash
DEST := result
PORT := 5000
VERSION_LINKS := 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.5 2.4
.PHONY: all clean html web compile serve prep FORCE
UNAME = $(shell uname)
ifeq ($(UNAME), Linux)
CP_ARGS = -l
endif
ifeq ($(UNAME), Darwin)
CP_ARGS =
endif
all: html
prep:
bundle install --path vendor
cd web && bundle install --path ../vendor
mkdir -p $(DEST)/nightly
clean:
$(MAKE) -C guides/ clean
rm -rf $(DEST) web/output/
html: build-foreman-el build-foreman-deb build-katello
build-%: FORCE prep
$(MAKE) -C guides/ html BUILD=$*
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)
FORCE: