From 10a03ceba21e90d3e307bd065d227baf6f9ed4e0 Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Fri, 28 Jun 2019 09:55:25 +0200 Subject: [PATCH] STYLE: relocate Allwmake-scan to src/ - reduced clutter. Mostly only need to scan source tree. - 00-dummy: use wmake/src/Allmake to get native (not cross-compiled) wmake toolchain binaries --- Allwmake-scan | 12 ------------ applications/test/00-dummy/Allwmake | 2 +- src/Allwmake-scan | 18 ++++++++++++++++++ 3 files changed, 19 insertions(+), 13 deletions(-) delete mode 100755 Allwmake-scan create mode 100755 src/Allwmake-scan diff --git a/Allwmake-scan b/Allwmake-scan deleted file mode 100755 index 064ff08459e..00000000000 --- a/Allwmake-scan +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# Allwmake with scan-build (clang) - -c_compiler="$(command -v "$(wmake -show-c)")" -cxx_compiler="$(command -v "$(wmake -show-cxx)")" - -set -x - -scan-build --use-cc="$c_compiler" --use-c++="$cxx_compiler" \ - ./Allwmake "$@" - -#------------------------------------------------------------------------------ diff --git a/applications/test/00-dummy/Allwmake b/applications/test/00-dummy/Allwmake index 3b9caf0c72c..a860a07515e 100755 --- a/applications/test/00-dummy/Allwmake +++ b/applications/test/00-dummy/Allwmake @@ -3,7 +3,7 @@ cd ${0%/*} || exit 1 # Run from this directory # Can never be too certain ... # Compile tools for wmake -( cd "${WM_DIR:-${WM_PROJECT_DIR}/wmake}/src" && make ) +( cd "${WM_DIR:-${WM_PROJECT_DIR}/wmake}/src" && ./Allmake ) #------------------------------------------------------------------------------ diff --git a/src/Allwmake-scan b/src/Allwmake-scan new file mode 100755 index 00000000000..2d12e096bd6 --- /dev/null +++ b/src/Allwmake-scan @@ -0,0 +1,18 @@ +#!/bin/sh +# Allwmake with scan-build (clang) + +command -v scan-build > /dev/null || { + exec 1>&2 + echo "No scan-build found, stopping" + echo + exit 2 +} + +comp_cc="$(command -v "$(wmake -show-c)")" +comp_cxx="$(command -v "$(wmake -show-cxx)")" + +set -x +scan-build --use-cc="$comp_cc" --use-c++="$comp_cxx" \ + ./Allwmake "$@" + +#------------------------------------------------------------------------------ -- GitLab