]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/ibl.git/blob - src/setupenv.bat
i2c reader utility
[keystone-rtos/ibl.git] / src / setupenv.bat
1 @echo off
3 rem  Setup the ibl build environment
6 set PATH=t:\gen\gnu\99-11-01\cygwin-b20\H-i586-cygwin32\bin;c:\tools\c6xx\cgen6_1_12\c6000\cgtools\bin
7 set PATH=%PATH%;%SystemRoot%\system32;%SystemRoot%;t:\ti_pdsp_cgen\20091120
9 set PERL=//t/gen/perl/activestate/5_6_1_635/bin/perl
10 set PERLDOS=t:\gen\perl\activestate\5_6_1_635\bin\perl
12 set CYGWINPATH=//t/gen/gnu/99-11-01/cygwin-b20/H-i586-cygwin32/bin
13 set TOOLSC6X=c:/tools/c6xx/cgen6_1_12/c6000
14 set TOOLSC6XDOS=c:\tools\c6xx\cgen6_1_12\c6000\
16 set TOOLC6XSRC=t:\c6xx\cgen6_1_12\c6000
17 set TOOLC6XDST=c:\tools\c6xx\cgen6_1_12\c6000
19 rem splint libraries
20 set LARCH_PATH=e:\splint-3.1.1\lib
22 rem Generate path to makedep, then set it 
23 rm -f mkdeppath.bat
24 rem sh -c "makedepdir=`pwd`;echo set MAKEDEPPATH=`dirname $makedepdir`/make/makedep/makedep.exe" >mkdeppath.bat
25 sh -c "makedepdir=`pwd`;echo set MAKEDEPPATH=`pwd`/make/makedep/makedep.exe" >mkdeppath.bat
26 call mkdeppath.bat
29 rem ************************* Tools Copy/Validation **************************
30 rem If the "bypass" option is not provided, validate/copy the tools
31 rem *********************************************************************
32 if "%1" == "bypass" goto environment
34 rem check, but don't copy tools
35 if "%1" == "" goto toolcheck
37 rem copy tools if check fails
38 if "%1" == "enable_write" goto toolcopy
40 rem error: invalid argument
41 echo =========================== INVALID ARGUMENT ============================
42 echo Option "%1" is invalid.  Valid options are:
43 echo "bypass":       configure environment without checking tools
44 echo "enable_write": *****ERASE***** all files in %TOOLDST%, 
45 echo                 and replace with correct tools
46 echo =========================== INVALID ARGUMENT ============================
47 goto end
49 :toolcheck
50 echo Verifying local tools
51 goto toolperl
53 :toolcopy
54 echo UPDATING local tools
55 :toolperl
56 %PERLDOS% make\cpytools\cpytools.pl %TOOLC6XSRC% %TOOLC6XDST% %1
57 rem note: windows is stupid; "errorlevel 1" means "retval >= 1"
58 if errorlevel 1 goto error
60 echo Local tools are good
61 goto environment
64 rem ************************** Bad Tools *************************************
65 rem Tools are bad; deconfigure environment and print error
66 rem **************************************************************************
67 :error
68 set TOOLS=
69 set TOOLSDOS=
70 set MAKEDEPPATH=
72 echo ============================== BAD TOOLS =================================
73 echo * Build environment is NOT configured.  You may rerun script with:
74 echo *
75 echo * %0 bypass       
76 echo *    configure environment without checking tools.  This option is
77 echo *    is used when the user will manually configure the tools.
78 echo *
79 echo * %0 enable_write 
80 echo *    [*** DANGEROUS OPTION ***]
81 echo *    This option 
82 echo *        1) *** DANGER *** Recursively deletes all files in subdirectories
83 echo *           %DST365% and %TOOLDST%
84 echo *        2) Copies correct tools from the subdirectories
85 echo *           %SRC365% and %TOOLSRC%
86 echo *               
87 echo ============================== BAD TOOLS =================================
89 :environment
90 :end