forked from open-watcom/open-watcom-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.bat
30 lines (30 loc) · 952 Bytes
/
build.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
@echo off
REM Script to build the Open Watcom tools
set "OWBUILDER_OUTPUT=>>%OWROOT%\bootx.log"
cd %OWSRCDIR%\wmake
if not exist %OWOBJDIR% mkdir %OWOBJDIR%
cd %OWOBJDIR%
if exist %OWBINDIR%\wmake.exe del %OWBINDIR%\wmake.exe
if '%OWUSENATIVETOOLS%' == '1' goto native_tools
wmake -f ..\wmake clean %OWBUILDER_OUTPUT%
wmake -f ..\wmake %OWBUILDER_OUTPUT%
if errorlevel == 1 goto error_exit
goto make_builder
:native_tools
nmake -f ..\nmake clean %OWBUILDER_OUTPUT%
nmake -f ..\nmake %OWBUILDER_OUTPUT%
if errorlevel == 1 goto error_exit
:make_builder
cd %OWSRCDIR%\builder
if not exist %OWOBJDIR% mkdir %OWOBJDIR%
cd %OWOBJDIR%
if exist %OWBINDIR%\builder.exe del %OWBINDIR%\builder.exe
%OWBINDIR%\wmake -f ..\binmake clean %OWBUILDER_OUTPUT%
%OWBINDIR%\wmake -f ..\binmake bootstrap=1 builder.exe %OWBUILDER_OUTPUT%
if errorlevel == 1 goto error_exit
cd %OWSRCDIR%
builder boot
if errorlevel == 1 goto error_exit
builder build
:error_exit
cd %OWROOT%