From 3ea6e51b28a06ad4c8b70e9f4d206a56e4771027 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 22 Apr 2017 12:45:50 +0200 Subject: Rename directory/option environment to environments To be consistent with machines/ and toolchains/ --- etc/bootstrap/bbot-bootstrap-macos.sh | 2 +- etc/bootstrap/bbot-bootstrap-msvc.bat | 4 +-- etc/bootstrap/bbot-bootstrap.service | 4 +-- etc/bootstrap/bbot-bootstrap.sh | 10 +++---- etc/environment/default | 26 ---------------- etc/environment/default-msvc.bat | 56 ----------------------------------- etc/environments/default | 26 ++++++++++++++++ etc/environments/default-msvc.bat | 56 +++++++++++++++++++++++++++++++++++ 8 files changed, 92 insertions(+), 92 deletions(-) delete mode 100755 etc/environment/default delete mode 100644 etc/environment/default-msvc.bat create mode 100755 etc/environments/default create mode 100644 etc/environments/default-msvc.bat (limited to 'etc') diff --git a/etc/bootstrap/bbot-bootstrap-macos.sh b/etc/bootstrap/bbot-bootstrap-macos.sh index e0a8ac7..8fee3b9 100755 --- a/etc/bootstrap/bbot-bootstrap-macos.sh +++ b/etc/bootstrap/bbot-bootstrap-macos.sh @@ -3,7 +3,7 @@ # open -a Terminal -n -F ~/bbot-bootstrap-macos.sh if ~/bbot-bootstrap.sh --cxx clang++ --build /tmp \ - --environment "$HOME/environment"; then + --environments "$HOME/environments"; then sleep 2 sudo shutdown -h now fi diff --git a/etc/bootstrap/bbot-bootstrap-msvc.bat b/etc/bootstrap/bbot-bootstrap-msvc.bat index 4b60f5d..b502c7b 100644 --- a/etc/bootstrap/bbot-bootstrap-msvc.bat +++ b/etc/bootstrap/bbot-bootstrap-msvc.bat @@ -12,7 +12,7 @@ set "VCVARS=%MSVC%\VC\Auxiliary\Build\vcvars64.bat" set "BUILD=C:\tmp" set "INSTALL=C:\build2" set "BOOTSTRAP=C:\bootstrap" -set "ENVIRONMENT=C:\environment" +set "ENVIRONMENTS=C:\environments" set "TFTP=196.254.111.222" rem set "TFTP=10.1.0.1:55123" @@ -22,7 +22,7 @@ rem If we already have the bbot worker, assume we are bootstrapped. rem if exist %INSTALL%\bin\bbot-worker.exe ( set "PATH=%INSTALL%\bin;%PATH%" - bbot-worker.exe --startup --build %BUILD% --environment %ENVIRONMENT%^ + bbot-worker.exe --startup --build %BUILD% --environments %ENVIRONMENTS%^ --tftp-host %TFTP% --verbose %VERBOSE% goto end ) diff --git a/etc/bootstrap/bbot-bootstrap.service b/etc/bootstrap/bbot-bootstrap.service index ecb0da4..8ff2aab 100644 --- a/etc/bootstrap/bbot-bootstrap.service +++ b/etc/bootstrap/bbot-bootstrap.service @@ -15,12 +15,12 @@ WorkingDirectory=/home/build Environment=CXX=g++ Environment=BUILD=/tmp -Environment=ENVIRONMENT=/home/build/environment +Environment=ENVIRONMENTS=/home/build/environments ExecStart=/usr/local/bin/bbot-bootstrap.sh \ --cxx ${CXX} \ --build ${BUILD} \ - --environment ${ENVIRONMENT} + --environments ${ENVIRONMENTS} StandardInput=tty-force StandardOutput=inherit diff --git a/etc/bootstrap/bbot-bootstrap.sh b/etc/bootstrap/bbot-bootstrap.sh index 9473abe..9e7ace8 100755 --- a/etc/bootstrap/bbot-bootstrap.sh +++ b/etc/bootstrap/bbot-bootstrap.sh @@ -35,7 +35,7 @@ run () # cxx=g++ build=/tmp -environment="$HOME/environment" +environments="$HOME/environments" # Parse options. # @@ -57,12 +57,12 @@ while test $# -ne 0; do build="$1" shift ;; - --environment) + --environments) shift if test $# -eq 0; then - error "missing environment directory after --environment" + error "missing environments directory after --environments" fi - environment="$1" + environments="$1" shift ;; *) @@ -90,7 +90,7 @@ export PATH # If we already have the bbot worker, assume we are bootstrapped. # if bbot-worker --version >/dev/null 2>&1; then - exec bbot-worker --startup --build "$build" --environment "$environment" \ + exec bbot-worker --startup --build "$build" --environments "$environments" \ --tftp-host "$tftp" --verbose "$verbose" fi diff --git a/etc/environment/default b/etc/environment/default deleted file mode 100755 index 82107f6..0000000 --- a/etc/environment/default +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -# file : etc/environment/default -# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -# license : TBC; see accompanying LICENSE file - -# Environment setup script for C/C++ compilation. - -c=gcc -cxx=g++ - -# $1 - target -# $2 - bbot executable -# $3+ - bbot options - -set -e # Exit on errors. - -t="$1" -shift - -if test -n "$t"; then - echo "unknown target: $t" 1>&2 - exit 1 -fi - -exec "$@" cc config.c="$c" config.cxx="$cxx" diff --git a/etc/environment/default-msvc.bat b/etc/environment/default-msvc.bat deleted file mode 100644 index 64c325d..0000000 --- a/etc/environment/default-msvc.bat +++ /dev/null @@ -1,56 +0,0 @@ -@echo off - -rem file : etc/environment/default-msvc.bat -rem copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -rem license : TBC; see accompanying LICENSE file - -rem -rem Environment setup script for C/C++ compilation with Visual Studio 15. -rem - -rem %1 - target -rem %2 - bbot executable -rem %3+ - bbot options - -setlocal EnableExtensions EnableDelayedExpansion - -set "MSVC=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community" - -set "VCVARS32=%MSVC%\VC\Auxiliary\Build\vcvarsamd64_x86.bat" -set "VCVARS64=%MSVC%\VC\Auxiliary\Build\vcvars64.bat" - -rem Based on target determine what we are building. If the target is -rem not specified, then we build 64-bit by default. -rem -rem Note that an empty argument is passed as "" (literal quotes). -rem -if "_%1_" == "_x86_64-microsoft-win32-msvc14.1_" ( - set "VCVARS=%VCVARS64%" -) else ( - if "_%1_" == "_i386-microsoft-win32-msvc14.1_" ( - set "VCVARS=%VCVARS32%" - ) else ( - if _%1_ == _""_ ( - set "VCVARS=%VCVARS64%" - ) else ( - echo error: unknown target %1 - goto error - ) - ) -) - -call "%VCVARS%" -if errorlevel 1 goto error - -%2 %3 %4 %5 %6 %7 %8 %9 cc config.c=cl config.cxx=cl -if errorlevel 1 goto error - -goto end - -:error -@echo off -endlocal -exit /b 1 - -:end -endlocal diff --git a/etc/environments/default b/etc/environments/default new file mode 100755 index 0000000..f4a19aa --- /dev/null +++ b/etc/environments/default @@ -0,0 +1,26 @@ +#!/bin/sh + +# file : etc/environments/default +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : TBC; see accompanying LICENSE file + +# Environment setup script for C/C++ compilation. + +c=gcc +cxx=g++ + +# $1 - target +# $2 - bbot executable +# $3+ - bbot options + +set -e # Exit on errors. + +t="$1" +shift + +if test -n "$t"; then + echo "unknown target: $t" 1>&2 + exit 1 +fi + +exec "$@" cc config.c="$c" config.cxx="$cxx" diff --git a/etc/environments/default-msvc.bat b/etc/environments/default-msvc.bat new file mode 100644 index 0000000..40ec364 --- /dev/null +++ b/etc/environments/default-msvc.bat @@ -0,0 +1,56 @@ +@echo off + +rem file : etc/environments/default-msvc.bat +rem copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +rem license : TBC; see accompanying LICENSE file + +rem +rem Environment setup script for C/C++ compilation with Visual Studio 15. +rem + +rem %1 - target +rem %2 - bbot executable +rem %3+ - bbot options + +setlocal EnableExtensions EnableDelayedExpansion + +set "MSVC=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community" + +set "VCVARS32=%MSVC%\VC\Auxiliary\Build\vcvarsamd64_x86.bat" +set "VCVARS64=%MSVC%\VC\Auxiliary\Build\vcvars64.bat" + +rem Based on target determine what we are building. If the target is +rem not specified, then we build 64-bit by default. +rem +rem Note that an empty argument is passed as "" (literal quotes). +rem +if "_%1_" == "_x86_64-microsoft-win32-msvc14.1_" ( + set "VCVARS=%VCVARS64%" +) else ( + if "_%1_" == "_i386-microsoft-win32-msvc14.1_" ( + set "VCVARS=%VCVARS32%" + ) else ( + if _%1_ == _""_ ( + set "VCVARS=%VCVARS64%" + ) else ( + echo error: unknown target %1 + goto error + ) + ) +) + +call "%VCVARS%" +if errorlevel 1 goto error + +%2 %3 %4 %5 %6 %7 %8 %9 cc config.c=cl config.cxx=cl +if errorlevel 1 goto error + +goto end + +:error +@echo off +endlocal +exit /b 1 + +:end +endlocal -- cgit v1.1