OpenCores
URL https://opencores.org/ocsvn/fwrisc/fwrisc/trunk

Subversion Repositories fwrisc

[/] [fwrisc/] [trunk/] [ve/] [fwrisc/] [tests/] [riscv-compliance/] [doc/] [Makefile] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 mballance
# Makefile for RISC-V Compliance Task Group documentation
2
 
3
# This file is part of the RISC-V Foundation Compliance Task Group compliance
4
# tool set and documentation.
5
 
6
# Copyright (C) 2017 CodaSip Limited 
7
# Copyright (C) 2018 Embecosm Limited .
8
# Copyright (C) 2018 Imperas Limited 
9
 
10
# All rights reserved.
11
 
12
# Redistribution and use in source and binary forms, with or without
13
# modification, are permitted provided that the following conditions are met:
14
 
15
# 1. Redistributions of source code must retain the above copyright notice,
16
#    this list of conditions and the following disclaimer.
17
# 2. Redistributions in binary form must reproduce the above copyright
18
#    notice, this list of conditions and the following disclaimer in the
19
#    documentation and/or other materials provided with the distribution.
20
# 3. Neither the name of mosquitto nor the names of its
21
#    contributors may be used to endorse or promote products derived from
22
#    this software without specific prior written permission.
23
 
24
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
28
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34
# POSSIBILITY OF SUCH DAMAGE.
35
 
36
# SPDX-License-Identifier: BSD-3-Clause
37
 
38
ROOT = README
39
SRC = $(ROOT).adoc
40
SRC_STRIPPED = $(ROOT)-stripped.adoc
41
 
42
.PHONY: all
43
all: pdf html
44
 
45
.PHONY: pdf
46
pdf: $(ROOT).pdf
47
 
48
$(ROOT).pdf: sanity-check $(SRC)
49
        asciidoctor-pdf -d article $(SRC)
50
 
51
.PHONY: html
52
html: $(ROOT).html
53
 
54
$(ROOT).html: sanity-check $(SRC)
55
        asciidoctor -d article -b html $(SRC)
56
 
57
# It is all too easy for the document history and title page to have diverging
58
# version numbers.  This target checks first.
59
 
60
.PHONY: sanity-check
61
sanity-check:
62
        @s=$$(sed -n < $(SRC) -e '3s/Issue //p') ; \
63
        t=$$(sed -n < $(SRC) -e "/== Document history/,/^$$/p" | \
64
                   grep -c "$${s}") ; \
65
        if [ $${t} -ne 1 ] ; \
66
        then \
67
            echo "Version number of title and document history do not match" ; \
68
            exit 1 ; \
69
        fi
70
 
71
custom.dict: custom.wordlist
72
        aspell --lang=en create master ./$@ < $<
73
 
74
.PHONY: spell
75
spell: custom.dict $(SRC)
76
        sed < $(SRC) > $(SRC_STRIPPED) -e 's/`[^`]\+`//gp' -e '/^----$$/,/^----$$/d'
77
        aspell --master=en_US --mode=none --add-extra-dicts=./custom.dict \
78
            -c $(SRC_STRIPPED)
79
        $(RM) $(SRC_STRIPPED)
80
 
81
clean:
82
        rm -f $(ROOT)-stripped.adoc $(ROOT).pdf $(ROOT).html custom.dict

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.