sdk: renamed `setvars.sh` and `setvars.bat` into `setenv.sh` and `setenv.bat`

* common.mk, setenv.sh, setenv.bat: renamed `ZXUNOSDK` variable to more general `ZXSDK` as there're no special cases to use specific one for ZX-Uno project
This commit is contained in:
Ivan Tatarinov 2021-04-28 15:02:00 +03:00
parent 1a67b2d087
commit a33a61fca9
14 changed files with 32 additions and 32 deletions

View File

@ -1,4 +1,4 @@
@call ..\sdk\setvars.bat
@call ..\sdk\setenv.bat
sjasmplus firmware.asm
zx7b firmware_strings.rom firmware.rom.zx7b
sjasmplus bootloader.asm

View File

@ -1,4 +1,4 @@
@call ..\sdk\setvars.bat
@call ..\sdk\setenv.bat
set output=\Google Drive\Proyecto ZX-Uno\cores_%2\
echo define version %1 > version.asm
call make.bat

View File

@ -1,4 +1,4 @@
@call ..\sdk\setvars.bat
@call ..\sdk\setenv.bat
echo define version 1 > version.asm
sjasmplus firmware.asm
fcut firmware_strings.rom 7e00 -7e00 strings.bin

View File

@ -1,4 +1,4 @@
@call ..\..\sdk\setvars.bat
@call ..\..\sdk\setenv.bat
FuenteABin
Png2Rcs fondo.png fondo.rcs -a fondo.atr
sjasmplus scroll.asm

View File

@ -1,4 +1,4 @@
@call ..\..\..\sdk\setvars.bat
@call ..\..\..\sdk\setenv.bat
rem 51F0-A4FF ep 6e3f
rem b900-bf7f
fcut Manic.sna 52F0 4a30 Manic.bin

View File

@ -1,4 +1,4 @@
@call ..\..\..\sdk\setvars.bat
@call ..\..\..\sdk\setenv.bat
genMenu
rcs screen.scr screen.rcs
fcut screen.rcs 0 1800 screen.cut

View File

@ -1,4 +1,4 @@
@call ..\..\..\sdk\setvars.bat
@call ..\..\..\sdk\setenv.bat
genMenu 1
rcs screen.scr screen.rcs
fcut screen.rcs 0 1000 screen.cut

View File

@ -1,4 +1,4 @@
@call ..\..\..\sdk\setvars.bat
@call ..\..\..\sdk\setenv.bat
genMenu 0
rcs screen.scr screen.rcs
fcut screen.rcs 0 1000 screen.cut

View File

@ -5,7 +5,7 @@ rem SPDX-FileNotice: Based on code by Antonio Villena <_@antoniovillena.es>
rem
rem SPDX-License-Identifier: GPL-3.0-or-later
call ..\sdk\setvars.bat
call ..\sdk\setenv.bat
set /a i=2
for /f "eol=# tokens=1,2,3 delims=;" %%a in (cores.txt) do call :AddCore %%a %%b %%c

View File

@ -5,7 +5,7 @@ rem SPDX-FileNotice: Based on code by Antonio Villena <_@antoniovillena.es>
rem
rem SPDX-License-Identifier: GPL-3.0-or-later
call ..\sdk\setvars.bat
call ..\sdk\setenv.bat
set /a i=0
for /f "eol=# tokens=1,2,3 delims=;" %%a in (roms.txt) do call :AddROM %%a %%b %%c

View File

@ -135,23 +135,23 @@ include ../sdk/common.mk
Remember to specify correct relative path to it.
This will set `ZXUNOSDK` environment variable (on first inclusion only) and update your `PATH` environment variable to point to SDK's tools.
This will set `ZXSDK` environment variable (on first inclusion only) and update your `PATH` environment variable to point to SDK's tools.
These changes are actual for current invocation of `make` utility and all child processes.
### 2.4.2. In Bash scripts
Bash scripts are supposed to be invoked from Makefiles where the correct environment is already prepared by `make` utility so nothing must be done for such scripts.
In other cases you must source `setvars.sh` file in a Bash script like this:
In other cases you must source `setenv.sh` file in a Bash script like this:
```bash
source ../sdk/setvars.sh
source ../sdk/setenv.sh
```
or
```bash
. ../sdk/setvars.sh
. ../sdk/setenv.sh
```
Remember to specify correct relative path to it.
@ -247,15 +247,15 @@ You should manually download precompiled binaries of SJAsmPlus and Z88DK from In
## 4.2. In batch scripts
To use these tools in a batch script just call `setvars.bat` file at the beginning of one like this:
To use these tools in a batch script just call `setenv.bat` file at the beginning of one like this:
```batch
call ..\sdk\setvars.bat
call ..\sdk\setenv.bat
```
Remember to specify correct relative path to it.
This will set `ZXUNOSDK` environment variable (on first call only) and update your `PATH` environment variable to point to SDK's tools.
This will set `ZXSDK` environment variable (on first call only) and update your `PATH` environment variable to point to SDK's tools.
These changes are actual for current invocation of command shell and all child processes.
# References

View File

@ -8,12 +8,12 @@
# * GNU on Linux, FreeBSD etc.
# * GNU on Windows NT (using MinGW/MSYS/Cygwin/WSL)
ifndef ZXUNOSDK
ifndef ZXSDK
ZXUNOSDK := $(patsubst %/,%,$(abspath $(dir $(lastword $(MAKEFILE_LIST)))))
Z88DK := $(ZXUNOSDK)/src/z88dk
ZXSDK := $(patsubst %/,%,$(abspath $(dir $(lastword $(MAKEFILE_LIST)))))
Z88DK := $(ZXSDK)/src/z88dk
ZCCCFG := $(Z88DK)/lib/config
PATH := $(ZXUNOSDK)/bin:$(Z88DK)/bin:$(PATH)
PATH := $(ZXSDK)/bin:$(Z88DK)/bin:$(PATH)
# Fix paths under Cygwin for z88dk on Windows
ifeq ($(OS),Windows_NT)
@ -22,7 +22,7 @@ ZCCCFG := $(shell cygpath -m $(ZCCCFG))
endif
endif
export ZXUNOSDK
export ZXSDK
export ZCCCFG
export PATH

View File

@ -3,9 +3,9 @@ rem SPDX-FileCopyrightText: 2021 Ivan Tatarinov <ivan-tat@ya.ru>
rem
rem SPDX-License-Identifier: GPL-3.0-or-later
if not x%ZXUNOSDK% == x exit /b
set ZXUNOSDK=%~dp0
set ZXUNOSDK=%ZXUNOSDK:~0,-1%
set Z88DK=%ZXUNOSDK%\src\z88dk
if not x%ZXSDK% == x exit /b
set ZXSDK=%~dp0
set ZXSDK=%ZXSDK:~0,-1%
set Z88DK=%ZXSDK%\src\z88dk
set ZCCCFG=%Z88DK%\lib\config
set PATH=%ZXUNOSDK%\bin;%Z88DK%\bin;%PATH%
set PATH=%ZXSDK%\bin;%Z88DK%\bin;%PATH%

View File

@ -3,15 +3,15 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
if [[ "x$ZXUNOSDK" == x ]]; then
ZXUNOSDK=$(dirname $(realpath "$BASH_SOURCE"))
Z88DK=$ZXUNOSDK/src/z88dk
if [[ "x$ZXSDK" == x ]]; then
ZXSDK=$(dirname $(realpath "$BASH_SOURCE"))
Z88DK=$ZXSDK/src/z88dk
ZCCCFG=$Z88DK/lib/config
PATH=$ZXUNOSDK/bin:$Z88DK/bin:$PATH
PATH=$ZXSDK/bin:$Z88DK/bin:$PATH
# Fix paths under Cygwin for z88dk on Windows
if [[ x$OS == xWindows_NT && x$OSTYPE == xcygwin ]]; then
ZCCCFG=`cygpath -m $ZCCCFG`
fi
export ZXUNOSDK
export ZXSDK
export ZCCCFG
fi