-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (29 loc) · 960 Bytes
/
Makefile
File metadata and controls
40 lines (29 loc) · 960 Bytes
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
#EXTENDED=yes
ifeq ($(EXTENDED),)
OPTS =
else
OPTS = -a extended
endif
OPTS:=$(OPTS) -a revdate="$(shell date +"%d %B, %Y")" --failure-level WARN -v
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
WATCHCMD=fswatch -r -e '\.swp' -e '\.git' -e build . | xargs -n1 -I{} make html
else
WATCHCMD=inotifywait -q -m -r --format gotchange --exclude '\.swp' --exclude '\.git' --exclude build -e modify | xargs -n1 -I{} make html
endif
all: prepare html pdf
.PHONY: prepare
prepare:
mkdir -p build
bundle install
bundle binstubs --all
html:
bundle exec asciidoctor -r ./lib/stats.rb -a html $(OPTS) -b html5 -a docinfo=shared -o build/nxsl.html index.adoc
pdf:
bundle exec asciidoctor-pdf -a pdf-theme=netxms-theme.yml -a pdf-fontsdir=fonts $(OPTS) -o build/nxsl.pdf index.adoc
docbook:
bundle exec asciidoctor -r ./lib/stats.rb -b docbook -o build/nxsl.docbook index.adoc
clean:
rm -rf build/nxsl.pdf build/nxsl.html
watch:
$(WATCHCMD)