2004-03-27 02:42:33 +01:00
|
|
|
@echo off
|
2006-10-31 22:13:02 +01:00
|
|
|
rem IF NOTHING COMPILES, CHECK IF YOUR CVS CHECKOUT USES CORRECT DOS LINEBREAKS
|
2001-11-04 20:47:39 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
:- batch file to build everything
|
|
|
|
:- $Id$
|
2001-11-04 20:47:39 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
:- Syntax: BUILD [-r] [fat32|fat16] [msc|wc|tc|tcpp] [86|186|386]
|
|
|
|
:- option case is significant !!
|
2001-11-04 20:47:39 +01:00
|
|
|
|
2004-03-27 13:13:10 +01:00
|
|
|
if "%1" == "-r" call clobber.bat
|
2004-03-27 02:42:33 +01:00
|
|
|
if "%1" == "-r" shift
|
2000-05-06 21:34:20 +02:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
set XERROR=
|
2000-05-06 21:34:20 +02:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
if not exist config.bat echo You must copy CONFIG.B to CONFIG.BAT and edit it to reflect your setup!
|
|
|
|
if not exist config.bat goto abort
|
2001-11-14 00:36:45 +01:00
|
|
|
|
2004-03-27 13:13:10 +01:00
|
|
|
call config.bat
|
2006-10-31 22:13:02 +01:00
|
|
|
set dos4g=quiet
|
2001-11-04 20:47:39 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
:-----------------------------------------------------------------------
|
|
|
|
:- following is command line handling
|
|
|
|
:- options on the commandline overwrite default settings
|
|
|
|
:-----------------------------------------------------------------------
|
2001-11-04 20:47:39 +01:00
|
|
|
|
|
|
|
:loop_commandline
|
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
if "%1" == "fat32" set XFAT=32
|
|
|
|
if "%1" == "fat16" set XFAT=16
|
2001-11-04 20:47:39 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
if "%1" == "msc" set COMPILER=MSCL8
|
|
|
|
if "%1" == "wc" set COMPILER=WATCOM
|
|
|
|
if "%1" == "tc" set COMPILER=TC2
|
|
|
|
if "%1" == "tcpp" set COMPILER=TURBOCPP
|
2001-11-04 20:47:39 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
if "%1" == "86" set XCPU=86
|
|
|
|
if "%1" == "186" set XCPU=186
|
|
|
|
if "%1" == "386" set XCPU=386
|
2001-11-04 20:47:39 +01:00
|
|
|
|
|
|
|
shift
|
2004-03-27 02:42:33 +01:00
|
|
|
if not "%1" == "" goto loop_commandline
|
2002-01-23 23:29:41 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
if "%COMPILER%" == "" echo you MUST define a COMPILER variable in CONFIG.BAT
|
|
|
|
if "%COMPILER%" == "" goto abort
|
2002-01-23 23:29:41 +01:00
|
|
|
|
2004-03-27 13:13:10 +01:00
|
|
|
call default.bat
|
2002-01-23 23:29:41 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
:-----------------------------------------------------------------------
|
|
|
|
:- finally - we are going to compile
|
|
|
|
:-----------------------------------------------------------------------
|
2001-11-04 20:47:39 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
echo.
|
|
|
|
echo Process UTILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
echo.
|
2001-11-04 20:47:39 +01:00
|
|
|
cd utils
|
|
|
|
%MAKE% production
|
2004-03-27 02:42:33 +01:00
|
|
|
if errorlevel 1 goto abort-cd
|
2001-11-04 20:47:39 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
echo.
|
|
|
|
echo Process LIB ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
echo.
|
2001-11-04 20:47:39 +01:00
|
|
|
cd ..\lib
|
|
|
|
%MAKE%
|
2004-03-27 02:42:33 +01:00
|
|
|
if errorlevel 1 goto abort-cd
|
2000-05-06 21:34:20 +02:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
echo.
|
|
|
|
echo Process DRIVERS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
echo.
|
2000-05-06 21:34:20 +02:00
|
|
|
cd ..\drivers
|
2001-11-04 20:47:39 +01:00
|
|
|
%MAKE% production
|
2004-03-27 02:42:33 +01:00
|
|
|
if errorlevel 1 goto abort-cd
|
2001-11-04 20:47:39 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
echo.
|
|
|
|
echo Process BOOT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
echo.
|
2000-05-06 21:34:20 +02:00
|
|
|
cd ..\boot
|
2001-11-04 20:47:39 +01:00
|
|
|
%MAKE% production
|
2004-03-27 02:42:33 +01:00
|
|
|
if errorlevel 1 goto abort-cd
|
2000-05-06 21:34:20 +02:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
echo.
|
|
|
|
echo Process SYS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
echo.
|
2000-05-06 21:34:20 +02:00
|
|
|
cd ..\sys
|
2001-11-04 20:47:39 +01:00
|
|
|
%MAKE% production
|
2004-03-27 02:42:33 +01:00
|
|
|
if errorlevel 1 goto abort-cd
|
2001-11-04 20:47:39 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
echo.
|
|
|
|
echo Process KERNEL +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
echo.
|
2000-05-06 21:34:20 +02:00
|
|
|
cd ..\kernel
|
2001-11-04 20:47:39 +01:00
|
|
|
%MAKE% production
|
2004-03-27 02:42:33 +01:00
|
|
|
if errorlevel 1 goto abort-cd
|
2001-07-10 00:19:33 +02:00
|
|
|
|
2002-02-03 23:40:24 +01:00
|
|
|
cd ..
|
2001-07-10 00:19:33 +02:00
|
|
|
|
|
|
|
:- if you like, put some finalizing commands (like copy to floppy)
|
|
|
|
:- into build2.bat
|
|
|
|
|
|
|
|
if exist build2.bat call build2
|
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
echo.
|
|
|
|
echo Processing is done.
|
|
|
|
goto end
|
2000-05-06 21:34:20 +02:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
:-----------------------------------------------------------------------
|
|
|
|
|
|
|
|
:abort-cd
|
2000-05-06 21:34:20 +02:00
|
|
|
cd ..
|
2004-03-27 02:42:33 +01:00
|
|
|
:abort
|
|
|
|
echo Compilation was aborted!
|
2001-11-04 20:47:39 +01:00
|
|
|
set XERROR=1
|
2001-11-18 00:26:45 +01:00
|
|
|
|
2004-03-27 02:42:33 +01:00
|
|
|
:end
|
2004-03-27 13:13:10 +01:00
|
|
|
default.bat clearset
|