forked from riscv/riscv-CMOs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (37 loc) · 1.29 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
#
# Makefile
#
# Makefile for linux; at present, this file is used primarily to enable building pdfs in local linux
# systems (Makefile.pwsh is the approved publishing flow); please contact the CMO TG chairs for the
# latest publishing methodology
#
SPEC=cmobase
# version is TG version number; should be updated in both Makefiles
VERSION=0.5
DATE=$(shell date +%Y.%m.%d)
COMMITDATE=$(shell git show -s --format=%ci | cut -d ' ' -f 1)
GITVERSION=$(shell git describe --tag --always --dirty)
# moved STAGE/revremark to cmobase.adoc
$(SPEC)-v$(VERSION).pdf: $(SPEC)/$(SPEC).adoc \
$(SPEC)/*.adoc \
$(SPEC)/insns/*.adoc \
$(SPEC)/autogenerated/revision.adoc-snippet
asciidoctor-pdf -r asciidoctor-diagram \
-D . \
-a toc \
-a compress \
-a pdf-style=resources/themes/risc-v_spec-pdf.yml \
-a pdf-fontsdir=resources/fonts \
-o $@ \
$<
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -sOutputFile=opt-$@ $@ && mv opt-$@ $@
$(SPEC)/autogenerated:
-mkdir $@
$(SPEC)/autogenerated/revision.adoc-snippet: Makefile $(SPEC)/autogenerated FORCE
echo ":revdate: ${COMMITDATE}" > $@-tmp
echo ":revnumber: ${VERSION}-${GITVERSION}" >> $@-tmp
# echo ":revremark: ${STAGE}" >> $@-tmp
diff $@ $@-tmp || mv $@-tmp $@
clean:
rm -f $(SPEC)-*.pdf
FORCE: