generated from riscv/docs-spec-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
130 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Makefile for RISC-V Doc Template | ||
# | ||
# This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 | ||
# International License. To view a copy of this license, visit | ||
# http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to | ||
# Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. | ||
# | ||
# SPDX-License-Identifier: CC-BY-SA-4.0 | ||
# | ||
# Description: | ||
# | ||
# This Makefile is designed to automate the process of building and packaging | ||
# the Doc Template for RISC-V Extensions. | ||
|
||
DATE ?= $(shell date +%Y-%m-%d) | ||
VERSION ?= v0.0.0 | ||
REVMARK ?= Frozen | ||
DOCKER_RUN := docker run --rm -v ${PWD}:/build -w /build \ | ||
riscvintl/riscv-docs-base-container-image:latest | ||
|
||
HEADER_SOURCE := header.adoc | ||
PDF_RESULT := riscv-ctr-latest.pdf | ||
|
||
ASCIIDOCTOR_PDF := asciidoctor-pdf | ||
OPTIONS := --trace \ | ||
-a compress \ | ||
-a mathematical-format=svg \ | ||
-a revnumber=${VERSION} \ | ||
-a revremark=${REVMARK} \ | ||
-a revdate=${DATE} \ | ||
-a pdf-fontsdir=docs-resources/fonts \ | ||
-a pdf-style=docs-resources/themes/riscv-pdf.yml \ | ||
--failure-level=ERROR | ||
REQUIRES := --require=asciidoctor-bibtex \ | ||
--require=asciidoctor-diagram \ | ||
--require=asciidoctor-mathematical | ||
|
||
.PHONY: all build clean build-container build-no-container | ||
|
||
all: build | ||
|
||
build: | ||
@echo "Checking if Docker is available..." | ||
@if command -v docker >/dev/null 2>&1 ; then \ | ||
echo "Docker is available, building inside Docker container..."; \ | ||
$(MAKE) build-container; \ | ||
else \ | ||
echo "Docker is not available, building without Docker..."; \ | ||
$(MAKE) build-no-container; \ | ||
fi | ||
|
||
build-container: | ||
@echo "Starting build inside Docker container..." | ||
$(DOCKER_RUN) /bin/sh -c "$(ASCIIDOCTOR_PDF) $(OPTIONS) $(REQUIRES) --out-file=$(PDF_RESULT) $(HEADER_SOURCE)" | ||
@echo "Build completed successfully inside Docker container." | ||
|
||
build-no-container: | ||
@echo "Starting build..." | ||
$(ASCIIDOCTOR_PDF) $(OPTIONS) $(REQUIRES) --out-file=$(PDF_RESULT) $(HEADER_SOURCE) | ||
@echo "Build completed successfully." | ||
|
||
clean: | ||
@echo "Cleaning up generated files..." | ||
rm -f $(PDF_RESULT) | ||
@echo "Cleanup completed." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
[[header]] | ||
:description: RISC-V Control Transfer Records (Smctr/Ssctr) | ||
:company: RISC-V.org | ||
:revdate: 08/25/2023 | ||
:revnumber: 1.0 | ||
:revremark: This document is Frozen. | ||
:url-riscv: http://riscv.org | ||
:doctype: book | ||
:preface-title: Preamble | ||
:colophon: | ||
:appendix-caption: Appendix | ||
:imagesdir: docs-resources/images | ||
:title-logo-image: image:risc-v_logo.svg[pdfwidth=3.25in,align=center] | ||
// Settings: | ||
:experimental: | ||
:reproducible: | ||
// needs to be changed? bug discussion started | ||
//:WaveDromEditorApp: app/wavedrom-editor.app | ||
:imagesoutdir: docs-resources/images | ||
:bibtex-file: example.bib | ||
:bibtex-order: alphabetical | ||
:bibtex-style: apa | ||
:icons: font | ||
:lang: en | ||
:listing-caption: Listing | ||
:sectnums: | ||
:toc: left | ||
:toclevels: 4 | ||
:source-highlighter: pygments | ||
ifdef::backend-pdf[] | ||
:source-highlighter: coderay | ||
endif::[] | ||
:data-uri: | ||
:hide-uri-scheme: | ||
:stem: latexmath | ||
:footnote: | ||
:xrefstyle: short | ||
|
||
= RISC-V Control Transfer Records (Smctr/Ssctr) | ||
RISC-V Control Transfer Records TG | ||
|
||
// Preamble | ||
[WARNING] | ||
.This document is in the link:http://riscv.org/spec-state[Frozen state] | ||
==== | ||
Change is extremely unlikely. A high threshold will be used, and a change will only occur because of some truly critical issue being identified during the public review cycle. Any other desired or needed changes can be the subject of a follow-on new extension. | ||
==== | ||
|
||
[preface] | ||
== Copyright and license information | ||
This specification is licensed under the Creative Commons | ||
Attribution 4.0 International License (CC-BY 4.0). The full | ||
license text is available at | ||
https://creativecommons.org/licenses/by/4.0/. | ||
|
||
Copyright 2024 by RISC-V International. | ||
|
||
[preface] | ||
include::contributors.adoc[] | ||
|
||
include::intro.adoc[] | ||
include::body.adoc[] | ||
//the index must precede the bibliography | ||
//include::index.adoc[] | ||
//include::bibliography.adoc[] |