diff options
Diffstat (limited to 'bootstrap/Makefile')
| -rw-r--r-- | bootstrap/Makefile | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/bootstrap/Makefile b/bootstrap/Makefile index 2e8bb8e..6c9a77c 100644 --- a/bootstrap/Makefile +++ b/bootstrap/Makefile @@ -150,7 +150,8 @@ $(builddir)/stage2: $(STAGE2_OBJECTS) $(RTL_C_HEADERS) longlines outdirs # TODO add a proper test once the stage2 compiler is done check: $(builddir)/stage2 -check-all: check check-valgrind check-boundschecked clang-analyze longlines +check-all: check check-valgrind check-boundschecked clang-analyze \ + check-tokens longlines check-valgrind: $(builddir)/stage1 valgrind --leak-check=yes -q $(builddir)/stage1 $(STAGE1_ARGS) check-boundschecked: $(builddir)/stage1-boundschecked @@ -165,6 +166,16 @@ longlines: else \ true ;\ fi +check-tokens: + grep -E '^ +CMP_KW' $(srcdir)/token.c | \ + sed -E -e 's/^.*, "([^"]+)", T_KW_([a-zA-Z0-9_]+)\)/\1 \2/' | \ + while read kwstr kwconst; do \ + if [ "x$$kwstr" != "x$$kwconst" ]; then \ + printf "Keyword str \"%s\" and enum \"%s\" mismatch\n" \ + "$$kwstr" "$$kwconst" >&2; \ + exit 1; \ + fi; \ + done # Gives a lot of warnings (possibly false positives) and output gets mixed # up (unless a single file is processed). So not included in check-all. gcc-analyzer: |
