This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate perl
[perl5.git] / NetWare / bat / Buildtype.bat
1 @echo off
2 @rem AUTHOR: sgp
3 @rem CREATED: 24th July 2000
4 @rem LAST REVISED: 6th April 2001
5 @rem Batch file to set debug/release build and toggle D2 flag for 
6 @rem debugging in case of debug build.
7 @rem This file calls ToggleD2.bat which switches b/n d2 & d1 flags
8
9 if "%1" == "" goto Usage
10 if "%1" == "/now" goto now
11 if "%1" == "/?" goto usage
12 if "%1" == "/h" goto usage
13
14 if "%1" == "r" goto set_type_rel
15 if "%1" == "R" goto set_type_rel
16
17 if "%1" == "d" goto set_type_dbg
18 if "%1" == "D" goto set_type_dbg
19
20 Rem Invalid input and so display the help message
21 goto Usage
22  
23 :set_type_rel
24 set MAKE_TYPE=Release
25 echo ....Build set to %MAKE_TYPE%
26 goto set_d2_off
27
28 :set_type_dbg
29 set MAKE_TYPE=Debug
30 echo ....Build set to %MAKE_TYPE%
31 if "%2" == "" goto set_d2_off
32 call ToggleD2 %2
33
34 goto exit
35
36 :set_d2_off
37 call ToggleD2 off
38 goto exit
39
40 :now
41 if "%MAKE_TYPE%" == "" echo MAKE_TYPE is not set, hence it defaults to Release build
42 if not "%MAKE_TYPE%" == "" echo Current build type is - %MAKE_TYPE%
43 call ToggleD2 /now
44 goto exit
45
46 :Usage
47  @echo on
48  @echo "Usage: buildtype r/R|d/D [on/off]"  
49  @echo      on/off - Toggling only for D2 flag during debug build
50  @echo "Usage: buildtype /now"  - To display current setting
51  @echo Ex. buildtype d on
52
53 :exit