aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: d77b6e47143467fd27d5c47a6ff0350c5412cbb8 (plain)
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
#
# This confidential and proprietary software may be used only as
# authorised by a licensing agreement from ARM Limited
# (C) COPYRIGHT 2020 ARM Limited
# ALL RIGHTS RESERVED
# The entire notice above must be reproduced on all authorised
# copies and copies may only be made to the extent permitted
# by a licensing agreement from ARM Limited.
#

TOSAREVISION=0.22.0 draft
MKDIR=mkdir -p
ASCIIDOC=asciidoctor

HTMLDIR=out/html
PDFDIR=out/pdf

COMMON_ARGS= -a revnumber="$(TOSAREVISION)"

SPECSRC := tosa_spec.adoc
SPECFILES = $(wildcard chapters/[A-Za-z]*.adoc) tosa.css

.DELETE_ON_ERROR:

.PHONY: all html pdf clean

all: html pdf

html: $(HTMLDIR)/tosa_spec.html

pdf: $(PDFDIR)/tosa_spec.pdf

clean:
	$(RM) $(HTMLDIR)/tosa_spec.html
	$(RM) $(PDFDIR)/tosa_spec.pdf

$(HTMLDIR)/tosa_spec.html: $(SPECSRC) $(SPECFILES)
	$(MKDIR) $(HTMLDIR)
	$(ASCIIDOC) -b html5 -a stylesheet=tosa.css $(COMMON_ARGS) -o $@ $<

$(PDFDIR)/tosa_spec.pdf: $(SPECSRC) $(SPECFILES)
	$(MKDIR) $(PDFDIR)
	$(ASCIIDOC) -r asciidoctor-pdf -b pdf $(COMMON_ARGS) -o $@ $(SPECSRC)