summaryrefslogtreecommitdiff
path: root/NetWare/bat/Buildtype.bat
blob: 9f39da724142fdc6b6410a441b20134e87ef0187 (plain)
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
@echo off
@rem AUTHOR: sgp
@rem CREATED: 24th July 2000
@rem LAST REVISED: 6th April 2001
@rem Batch file to set debug/release build and toggle D2 flag for 
@rem debugging in case of debug build.
@rem This file calls ToggleD2.bat which switches b/n d2 & d1 flags

if "%1" == "" goto Usage
if "%1" == "/now" goto now
if "%1" == "/?" goto usage
if "%1" == "/h" goto usage

if "%1" == "r" goto set_type_rel
if "%1" == "R" goto set_type_rel

if "%1" == "d" goto set_type_dbg
if "%1" == "D" goto set_type_dbg

Rem Invalid input, display help message
goto Usage
 
:set_type_rel
set MAKE_TYPE=Release
echo ....Build set to %MAKE_TYPE%
goto set_d2_off

:set_type_dbg
set MAKE_TYPE=Debug
echo ....Build set to %MAKE_TYPE%
if "%2" == "" goto set_d2_off
call ToggleD2 %2

goto exit

:set_d2_off
call ToggleD2 off
goto exit

:now
if "%MAKE_TYPE%" == "" echo MAKE_TYPE is not set, hence it defaults to Release build
if not "%MAKE_TYPE%"  == "" echo Current build type is - %MAKE_TYPE%
call ToggleD2 /now
goto exit

:Usage
 @echo on
 @echo "Usage: buildtype r/R|d/D [on/off]"  
 @echo      on/off - Toggling D2 flag for debug build
 @echo "Usage: buildtype /now"  - To display current setting
 @echo Ex. buildtype d on

:exit