This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
68 lines (59 loc) · 1.68 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Makefile for the documentation
SHELL = bash
FONTS_DIR ?= fonts
STYLES_DIR ?= resources/themes
STYLE ?= owncloud
REVDATE ?= "$(shell date +'%B %d, %Y')"
ifndef VERSION
ifneq ($(DRONE_TAG),)
VERSION ?= $(subst v,,$(DRONE_TAG))
else
ifneq ($(DRONE_BRANCH),)
VERSION ?= $(subst /,,$(DRONE_BRANCH))
else
VERSION ?= master
endif
endif
endif
ifndef OUTPUT
ifneq ($(VERSION),master)
OUTPUT ?= build/branded_clients/$(VERSION)
else
OUTPUT ?= build/branded_clients
endif
endif
.PHONY: help
help: ## Print a basic help about the targets
@IFS=$$'\n' ; \
help_lines=(`fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##/:/'`); \
printf "%-30s %s\n" "target" "help" ; \
printf "%-30s %s\n" "------" "----" ; \
for help_line in $${help_lines[@]}; do \
IFS=$$':' ; \
help_split=($$help_line) ; \
help_command=`echo $${help_split[0]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
help_info=`echo $${help_split[2]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
printf '\033[36m'; \
printf "%-30s %s" $$help_command ; \
printf '\033[0m'; \
printf "%s\n" $$help_info; \
done
.PHONY: setup
setup: ## Install Antora's command tools locally
yarn install
.PHONY: clean
clean: ## Remove build artifacts from output dir
-rm -rf build/
.PHONY: pdf
pdf: ## Generate PDF version of the manual
asciidoctor-pdf \
-a pdf-stylesdir=$(STYLES_DIR)/ \
-a pdf-style=$(STYLE) \
-a pdf-fontsdir=$(FONTS_DIR) \
-a examplesdir=modules/ROOT/examples \
-a imagesdir=modules/ROOT/assets/images \
-a revnumber=$(VERSION) \
-a revdate=$(REVDATE) \
--base-dir $(CURDIR) \
--out-file $(OUTPUT)/ownCloud_Branded_Clients_Manual.pdf \
books/ownCloud_Branded_Clients_Manual.adoc