From: Ulya Trofimovich Date: Fri, 12 Jul 2019 13:11:20 +0000 (+0100) Subject: Added build script that checks that all headers are self-contained. X-Git-Tag: 1.2~42 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50a0a137a831b35251b10db590fb99679181be41;p=re2c Added build script that checks that all headers are self-contained. --- diff --git a/__alltest.sh b/__alltest.sh index a451a6be..7d0bb075 100755 --- a/__alltest.sh +++ b/__alltest.sh @@ -2,7 +2,7 @@ # normal tests # - exclude _clang_msan as it requires libc++ built with MSan -for d in __build{,_asan,_ubsan,_lsan,_clang,_m32,_glibcxx_debug} ; do +for d in __build{,_check_headers,_asan,_ubsan,_lsan,_clang,_m32,_glibcxx_debug} ; do ./${d}.sh \ && cd ${d} \ && make check VERBOSE=1 \ diff --git a/__build_check_headers.sh b/__build_check_headers.sh new file mode 100755 index 00000000..273bb9d0 --- /dev/null +++ b/__build_check_headers.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +builddir=__build_check_headers +rm -rf $builddir +mkdir $builddir + +cd $builddir + +../configure \ + --enable-debug \ + --enable-libs \ + && make -j$(nproc) + +for h in $(find ../src/ ../lib/ -name '*.h*'); do + echo "CHECKING $h" + g++ -I. -I.. -c $h -o foo.o || exit 1 +done + +rm -f foo.o + +cd .. diff --git a/release.sh b/release.sh index edf0e6a3..c231ee49 100755 --- a/release.sh +++ b/release.sh @@ -2,18 +2,10 @@ set -e -echo 'RUNME: configure CXX=include-what-you-use CXXFLAGS="--check-also" && make -k 2>log && python2 `which fix_inclydes.py` < log' +# checks for which there are no scripts yet echo 'RUNME: cppcheck --enable=all --inconclusive --std=posix --quiet --force -I. src/' -echo 'RUNME: for h in $(find src/ -name ''*.h*''); do echo "CHECKING $h"; g++ -I. -c $h -o foo.o; done' echo "RUNME: uselex `find -type f -name '*.o'`" echo 'RUNME: configure CFLAGS="-ffunction-sections -fdata-sections" LDFLAGS="-Wl,--gc-sections -Wl,--print-gc-sections"' -echo 'RUNME: configure CXX=clang++' -echo 'RUNME: configure CXXFLAGS="-m32"' -echo 'RUNME: configure --host i686-w64-mingw32, test with wine: make wtests' -echo 'RUNME: configure CXXFLAGS="-fsanitize=address"' -echo 'RUNME: configure CXXFLAGS="-fsanitize=undefined"' -echo 'RUNME: valgrind: make vtests' -echo 'RUNME: skeleton: ./run_tests.sh --skeleton' if [[ $# -ne 1 ]] then diff --git a/src/dfa/posix_precedence.h b/src/dfa/posix_precedence.h index 116614c1..ab68ee80 100644 --- a/src/dfa/posix_precedence.h +++ b/src/dfa/posix_precedence.h @@ -1,6 +1,7 @@ #ifndef _RE2C_DFA_POSIX_PRECEDENCE_ #define _RE2C_DFA_POSIX_PRECEDENCE_ +#include "src/dfa/determinization.h" #include "src/dfa/tag_history.h" #include "src/debug/debug.h"