forked from open-watcom/open-watcom-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cmnvars.cmd
executable file
·48 lines (40 loc) · 1.32 KB
/
cmnvars.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@echo off
REM *****************************************************************
REM CMNVARS.CMD - common environment variables
REM *****************************************************************
REM NOTE: All scripts to set the environment must call this script at
REM the end.
REM Set the version numbers
set OWBLDVER=20
set OWBLDVERSTR=2.0
set OWBLDVERTOOL=1300
REM Set up default path information variable
if not "%OWDEFPATH%" == "" goto defpath_set
set OWDEFPATH=%PATH%;
set OWDEFINCLUDE=%INCLUDE%
set OWDEFWATCOM=%WATCOM%
set OWDEFBEGINLIBPATH=%BEGINLIBPATH%
:defpath_set
REM Subdirectory to be used for building OW build tools
if "%OWOBJDIR%" == "" set OWOBJDIR=binbuild
REM Set environment variables
set PATH=%OWROOT%\build\%OWOBJDIR%;%OWROOT%\build;%OWDEFPATH%;%OWGHOSTSCRIPTPATH%
set INCLUDE=%OWDEFINCLUDE%
set WATCOM=%OWDEFWATCOM%
set BEGINLIBPATH=%OWDEFBEGINLIBPATH%
REM Set the toolchain version to OWTOOLSVER variable
set OWTOOLSVER=0
if not '%OWTOOLS%' == 'WATCOM' goto no_watcom
echo set OWTOOLSVER=__WATCOMC__>getversi.gc
wcc386 -p getversi.gc >getversi.cmd
goto toolsver
:no_watcom
:toolsver
if not exist getversi.cmd goto no_toolsver
call getversi.cmd
del getversi.*
:no_toolsver
REM OS specifics
REM Ensure COMSPEC points to CMD.EXE
set COMSPEC=CMD.EXE
echo Open Watcom build environment (%OWTOOLS% version=%OWTOOLSVER%)