-
Notifications
You must be signed in to change notification settings - Fork 159
/
cmnvars.bat
executable file
·59 lines (51 loc) · 1.83 KB
/
cmnvars.bat
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
58
59
@echo off
REM *****************************************************************
REM CMNVARS.BAT - common environment variables
REM *****************************************************************
REM NOTE: All batch files to set the environment must call this batch
REM file at the end.
REM Set the version numbers
set OWBLDVER=20
set OWBLDVERSTR=2.0
set OWBLDVERTOOL=1300
REM Set up default path information variables
if not '%OWDEFPATH%' == '' goto skip1
set OWDEFPATH=%PATH%;
set OWDEFINCLUDE=%INCLUDE%
set OWDEFWATCOM=%WATCOM%
:skip1
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%;%OWDOSBOXPATH%
set INCLUDE=%OWDEFINCLUDE%
set WATCOM=%OWDEFWATCOM%
REM Set the toolchain version to OWTOOLSVER variable
set OWTOOLSVER=0
if not '%OWTOOLS%' == 'WATCOM' goto nowatcom
echo set OWTOOLSVER=__WATCOMC__>getversi.gc
wcc386 -p getversi.gc >getversi.bat
:nowatcom
if not '%OWTOOLS%' == 'VISUALC' goto novisualc
echo set OWTOOLSVER=_MSC_VER>getversi.gc
cl -nologo -EP getversi.gc>getversi.bat
:novisualc
if not '%OWTOOLS%' == 'INTEL' goto nointel
echo set OWTOOLSVER=__INTEL_COMPILER>getversi.gc
icl -nologo -EP getversi.gc>getversi.bat
:nointel
if not exist getversi.bat goto notoolsver
call getversi.bat
del getversi.*
:notoolsver
REM OS specifics
REM re-register our HHC compiler DLL
if '%OS%' == 'Windows_NT' regsvr32 -u -s "%OWROOT%\ci\nt386\itcc.dll"
if '%OS%' == 'Windows_NT' regsvr32 -s "%OWROOT%\ci\nt386\itcc.dll"
REM setup right COMSPEC for non-standard COMSPEC setting on NT based systems
if not '%OS%' == 'Windows_NT' goto nowinnt
if '%NTDOS%' == '1' goto nowinnt
set COMSPEC=%WINDIR%\system32\cmd.exe
set COPYCMD=/y
:nowinnt
echo Open Watcom build environment (%OWTOOLS% version=%OWTOOLSVER%)