forked from riscv-non-isa/riscv-acpi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (27 loc) · 975 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
#
# Build usable docs
#
ASCIIDOCTOR = asciidoctor
DITAA = ditaa
RISCV_ACPI_SPEC = riscv-acpi-platform-spec
PANDOC = pandoc
# Build the platform spec in several formats
all: $(RISCV_ACPI_SPEC).md $(RISCV_ACPI_SPEC).pdf $(RISCV_ACPI_SPEC).html
$(RISCV_ACPI_SPEC).md: $(RISCV_ACPI_SPEC).xml
$(PANDOC) -f docbook -t markdown_strict $< -o $@
$(RISCV_ACPI_SPEC).xml: $(RISCV_ACPI_SPEC).adoc
$(ASCIIDOCTOR) -d book -b docbook $<
$(RISCV_ACPI_SPEC).pdf: $(RISCV_ACPI_SPEC).adoc
$(ASCIIDOCTOR) -d book -r asciidoctor-pdf -b pdf $<
$(RISCV_ACPI_SPEC).html: $(RISCV_ACPI_SPEC).adoc
$(ASCIIDOCTOR) -d book -b html $<
clean:
rm -f $(RISCV_ACPI_SPEC).xml
rm -f $(RISCV_ACPI_SPEC).md
rm -f $(RISCV_ACPI_SPEC).pdf
rm -f $(RISCV_ACPI_SPEC).html
# handy shortcuts for installing necessary packages: YMMV
install-debs:
sudo apt-get install pandoc asciidoctor ditaa ruby-asciidoctor-pdf
install-rpms:
sudo dnf install ditaa pandoc rubygem-asciidoctor rubygem-asciidoctor-pdf