summaryrefslogtreecommitdiff
path: root/tools/ci/scripts/deheaderS.sh
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-05-19 04:03:26 +0300
committerAndrei Karas <akaras@inbox.ru>2018-05-19 04:03:26 +0300
commit7c210a16a5cdcc399cc475662cbe9ceeaf5f5b8f (patch)
tree93836cf83ad1215cc5908b916c7b1f811747e964 /tools/ci/scripts/deheaderS.sh
parentab1212bfcf4bc99d84c8ce42f0c3c9da0c00a01e (diff)
downloadmanaplus-7c210a16a5cdcc399cc475662cbe9ceeaf5f5b8f.tar.gz
manaplus-7c210a16a5cdcc399cc475662cbe9ceeaf5f5b8f.tar.bz2
manaplus-7c210a16a5cdcc399cc475662cbe9ceeaf5f5b8f.tar.xz
manaplus-7c210a16a5cdcc399cc475662cbe9ceeaf5f5b8f.zip
Add deheader script for support --std2 parameter.
Diffstat (limited to 'tools/ci/scripts/deheaderS.sh')
-rwxr-xr-xtools/ci/scripts/deheaderS.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/tools/ci/scripts/deheaderS.sh b/tools/ci/scripts/deheaderS.sh
new file mode 100755
index 000000000..6618859f6
--- /dev/null
+++ b/tools/ci/scripts/deheaderS.sh
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+export var=$1
+export name=${var%.*}
+export name=${name#./src/}
+export name=${name##*./}.h
+export dir=$(pwd)
+
+if [[ $var =~ .*(/sdl2gfx/|src/debug/).* ]]
+then
+ exit 0
+fi
+
+if [ "$skipPath" != "" ];
+then
+ if [[ $var =~ .*($skipPath).* ]]
+ then
+ exit 0
+ fi
+fi
+
+echo $1 >>${LOGFILE}
+echo $1
+
+${dir}/deheader -q -i "\"debug.h\"" \
+-i "\"utils/checkutils.h\"" \
+-i "\"utils/sdlcheckutils.h\"" \
+-i "\"sdlshared.h\"" \
+-i "\"localconsts.h\"" \
+-i "\"utils/fuzzer.h\"" \
+-i "\"$name\"" \
+-c "$CXX" \
+-d "$FLAGS" \
+-s "-std=gnu++1z" \
+-S "-std=gnu++1z" \
+-m "-c -Werror -Wall -Wextra -Wundef -Wmissing-declarations -DLOCALEDIR=\\\"\\\" -I/usr/include $INCLUDES -I${dir}/src" $1 2>&1 | \
+grep -v "deheader: ./src/net/sdltcpnet.cpp has more than one inclusion of <netinet/tcp.h>" | \
+grep -v "deheader: remove <netinet/tcp.h> from ./src/net/sdltcpnet.cpp" | \
+grep -v "deheader: remove <climits> from ./src/resources/db/unitsdb.cpp" | \
+grep -v "portability requires" | \
+grep -v "SDL2_rotozoom.cpp" | \
+tee -a ${LOGFILE}