forked from open-watcom/open-watcom-v2
-
Notifications
You must be signed in to change notification settings - Fork 3
/
cmnvars.cmd
executable file
·57 lines (46 loc) · 1.52 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
49
50
51
52
53
54
55
56
57
@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 Subdirectory to be used for build binaries
set OWBINDIR=%OWROOT%\build\%OWOBJDIR%
REM Subdirectory containing OW sources
set OWSRCDIR=%OWROOT%\bld
REM Subdirectory containing documentation sources
set OWDOCSDIR=%OWROOT%\docs
REM Set environment variables
set PATH=%OWBINDIR%;%OWROOT%\build;%OWDEFPATH%
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.bat
goto toolsver
:no_watcom
:toolsver
if not exist getversi.bat goto no_toolsver
call getversi.bat
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%)