aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Kunze <eric.kunze@arm.com>2022-03-31 09:53:16 -0700
committerEric Kunze <eric.kunze@arm.com>2022-03-31 09:57:29 -0700
commita1ba656173cf49979f0139ebf91581a6ddd81c7a (patch)
tree97a27ac63bccb49a2e3b27679c3d66d1373e29d6
parent32c91b0216e4a23a5f5068ef5666aa03d00ea18b (diff)
downloadspecification-a1ba656173cf49979f0139ebf91581a6ddd81c7a.tar.gz
Update makefile to fail build on spelling failure
Will also fail if aspell is not installed Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: I4cab802b64a938797d84604af80cb37caa04f401
-rw-r--r--Makefile6
-rwxr-xr-x[-rw-r--r--]tools/get_descriptions.py0
2 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 407047d..cbbbe6a 100644
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,7 @@ TOSAREVISION=0.24.0 draft
MKDIR=mkdir -p
ASCIIDOC=asciidoctor
ASPELL=aspell
+SHELL=/bin/bash -o pipefail
HTMLDIR=out/html
PDFDIR=out/pdf
@@ -38,14 +39,15 @@ clean:
spell: out/spell.txt
+.PRECIOUS: out/spell.txt
out/spell.txt: $(ADOCFILES) FORCE
@echo Running spell check
@mkdir -p $(@D)
@tools/get_descriptions.py $(ADOCFILES) \
| $(ASPELL) list -v -l en-US --encoding=UTF-8 --add-extra-dicts=./tools/dictionary.dic\
| sort -u > $@
- @-if [ -s $@ ] ; then \
- echo Spelling errors detected, check $@; \
+ @if [ -s $@ ] ; then \
+ echo Spelling errors detected, check $@; exit 1; \
else echo No spelling errors found ; \
fi
diff --git a/tools/get_descriptions.py b/tools/get_descriptions.py
index 3f2ee05..3f2ee05 100644..100755
--- a/tools/get_descriptions.py
+++ b/tools/get_descriptions.py