diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-03-09 16:23:18 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-03-09 16:23:18 +0300 |
commit | 4a07276eeeb131587bf53ced693509eb24f7678f (patch) | |
tree | 9dab7502d51d5301b1a51b3583bf8f55ba817458 | |
parent | 4aaf01a16e4a1bddf9e5d1daea8384fce4a43226 (diff) |
Filter out *.test.cxx in bootstrap-mingw.bat and bootstrap.sh
-rw-r--r-- | bootstrap-mingw.bat | 36 | ||||
-rwxr-xr-x | bootstrap.sh | 11 |
2 files changed, 32 insertions, 15 deletions
diff --git a/bootstrap-mingw.bat b/bootstrap-mingw.bat index 8b62215..a43278e 100644 --- a/bootstrap-mingw.bat +++ b/bootstrap-mingw.bat @@ -60,19 +60,19 @@ if "_%libbutl%_" == "__" ( rem All the source directories. rem -set "src=build2\*.cxx" -set "src=%src% build2\config\*.cxx" -set "src=%src% build2\dist\*.cxx" -set "src=%src% build2\bin\*.cxx" -set "src=%src% build2\c\*.cxx" -set "src=%src% build2\cc\*.cxx" -set "src=%src% build2\cxx\*.cxx" -set "src=%src% build2\test\*.cxx" -set "src=%src% build2\test\script\*.cxx" -set "src=%src% build2\version\*.cxx" -set "src=%src% build2\install\*.cxx" -set "src=%src% build2\in\*.cxx" -set "src=%src% %libbutl%\libbutl\*.cxx" +set "src=build2" +set "src=%src% build2\config" +set "src=%src% build2\dist" +set "src=%src% build2\bin" +set "src=%src% build2\c" +set "src=%src% build2\cc" +set "src=%src% build2\cxx" +set "src=%src% build2\test" +set "src=%src% build2\test\script" +set "src=%src% build2\version" +set "src=%src% build2\install" +set "src=%src% build2\in" +set "src=%src% %libbutl%\libbutl" rem Get the compile options. rem @@ -94,8 +94,16 @@ rem Compile. rem rem Note that echo does not override errorlevel. rem + +rem Filter out *.test.cxx sources. +rem +set "r=" +for %%d in (%src%) do ( + for /F "tokens=*" %%i in ('dir /b "%%d\*.cxx" ^| findstr /v "\.test\.cxx"') do set "r=!r! %%d\%%i" +) + echo on -%cxx% -I%libbutl% -I. -DBUILD2_BOOTSTRAP -DBUILD2_HOST_TRIPLET=\"i686-w64-mingw32\" %ops% -o build2\b-boot.exe %src% -limagehlp +%cxx% -I%libbutl% -I. -DBUILD2_BOOTSTRAP -DBUILD2_HOST_TRIPLET=\"i686-w64-mingw32\" %ops% -o build2\b-boot.exe %r% -limagehlp @echo off if errorlevel 1 goto error diff --git a/bootstrap.sh b/bootstrap.sh index a7ee7e2..6116550 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -132,8 +132,17 @@ src="$src build2/in/*.cxx" src="$src build2/bash/*.cxx" src="$src $libbutl/libbutl/*.cxx" +# Filter out *.test.cxx sources. +# +r= +for f in $src; do + if test -n "${f##*.test.cxx}"; then + r="$r $f" + fi +done + # Note that for as long as we support GCC 4.9 we have to compile in the C++14 # mode since 4.9 doesn't recognize c++1z. # set -x -"$cxx" "-I$libbutl" -I. -DBUILD2_BOOTSTRAP '-DBUILD2_HOST_TRIPLET="'"$host"'"' -std=c++1y "$@" -o build2/b-boot $src -lpthread +"$cxx" "-I$libbutl" -I. -DBUILD2_BOOTSTRAP '-DBUILD2_HOST_TRIPLET="'"$host"'"' -std=c++1y "$@" -o build2/b-boot $r -lpthread |