From a1ba656173cf49979f0139ebf91581a6ddd81c7a Mon Sep 17 00:00:00 2001 From: Eric Kunze Date: Thu, 31 Mar 2022 09:53:16 -0700 Subject: Update makefile to fail build on spelling failure Will also fail if aspell is not installed Signed-off-by: Eric Kunze Change-Id: I4cab802b64a938797d84604af80cb37caa04f401 --- Makefile | 6 ++++-- tools/get_descriptions.py | 0 2 files changed, 4 insertions(+), 2 deletions(-) mode change 100644 => 100755 tools/get_descriptions.py 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 old mode 100644 new mode 100755 -- cgit v1.2.1