Changeset 2940
- Timestamp:
- Jan 7, 2007, 4:18:23 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/env.cmd
r2801 r2940 1 /* 2 echo this is a rexx script! 3 cancel & quit & exit 4 */ 1 5 /* $Id: $ */ 2 6 /** @file … … 27 31 * Constants. 28 32 */ 29 asBuildTypes.0 = 3;33 asBuildTypes.0 = 2; 30 34 asBuildTypes.1 = 'debug'; 31 asBuildTypes.2 = 'profile'; 32 asBuildTypes.3 = 'release'; 35 asBuildTypes.2 = 'release'; 33 36 asStages.0 = 2 34 37 asStages.1 = 'stage1' … … 46 49 fRm = 0; 47 50 fUseStagedGcc = 1; 51 fUseBuildEnv = 1; 48 52 sBuildType = 'debug'; 49 53 sBuildTarget = 'os2'; 54 sBuildArch = 'x86'; 50 55 do i = 1 to words(sArgs) 51 56 /* extract word */ … … 108 113 * (kBuild actually decides this) 109 114 */ 110 sPathOut = sPathRoot'\out\'sBuildTarget' \'sBuildType111 sPathOutF = sPathRootF'/out/'sBuildTarget' /'sBuildType115 sPathOut = sPathRoot'\out\'sBuildTarget'.'sBuildArch'\'sBuildType 116 sPathOutF = sPathRootF'/out/'sBuildTarget'.'sBuildArch'/'sBuildType 112 117 113 118 /* … … 132 137 do i = 1 to asBuildTypes.0 133 138 sMode = asBuildTypes.i; 134 call EnvAddFront 1, 'PATH', sPathRoot'\out\'sBuildTarget' \'sMode'\dist\bin;'135 call EnvAddFront 1, 'PATH', sPathRoot'\out\'sBuildTarget' \'sMode'\dist\usr\omfhackbin;'136 call EnvAddFront 1, 'PATH', sPathRoot'\out\'sBuildTarget' \'sMode'\dist\usr\bin;'137 call EnvAddFront 1, 'PATH', sPathRootF'/out/'sBuildTarget' /'sMode'/dist/bin;'138 call EnvAddFront 1, 'PATH', sPathRootF'/out/'sBuildTarget' /'sMode'/dist/usr/bin;'139 call EnvAddFront 1, 'C_INCLUDE_PATH', sPathRootF'/out/'sBuildTarget' /'sMode'/dist/usr/include;'140 call EnvAddFront 1, 'CPLUS_INCLUDE_PATH', sPathRootF'/out/'sBuildTarget' /'sMode'/dist/usr/include;'141 call EnvAddFront 1, 'COBJ_INCLUDE_PATH', sPathRootF'/out/'sBuildTarget' /'sMode'/dist/usr/include;'142 call EnvAddFront 1, 'LIBRARY_PATH', sPathRootF'/out/'sBuildTarget' /'sMode'/dist/lib;'143 call EnvAddFront 1, 'LIBRARY_PATH', sPathRootF'/out/'sBuildTarget' /'sMode'/dist/usr/lib;'144 call EnvAddFront 1, 'LIBRARY_PATH', sPathRootF'/out/'sBuildTarget' /'sMode'/dist/usr/lib/gcc-lib/i386-pc-os2-emx/3.3.5;'139 call EnvAddFront 1, 'PATH', sPathRoot'\out\'sBuildTarget'.'sBuildArch'\'sMode'\dist\bin;' 140 call EnvAddFront 1, 'PATH', sPathRoot'\out\'sBuildTarget'.'sBuildArch'\'sMode'\dist\usr\omfhackbin;' 141 call EnvAddFront 1, 'PATH', sPathRoot'\out\'sBuildTarget'.'sBuildArch'\'sMode'\dist\usr\bin;' 142 call EnvAddFront 1, 'PATH', sPathRootF'/out/'sBuildTarget'.'sBuildArch'/'sMode'/dist/bin;' 143 call EnvAddFront 1, 'PATH', sPathRootF'/out/'sBuildTarget'.'sBuildArch'/'sMode'/dist/usr/bin;' 144 call EnvAddFront 1, 'C_INCLUDE_PATH', sPathRootF'/out/'sBuildTarget'.'sBuildArch'/'sMode'/dist/usr/include;' 145 call EnvAddFront 1, 'CPLUS_INCLUDE_PATH', sPathRootF'/out/'sBuildTarget'.'sBuildArch'/'sMode'/dist/usr/include;' 146 call EnvAddFront 1, 'COBJ_INCLUDE_PATH', sPathRootF'/out/'sBuildTarget'.'sBuildArch'/'sMode'/dist/usr/include;' 147 call EnvAddFront 1, 'LIBRARY_PATH', sPathRootF'/out/'sBuildTarget'.'sBuildArch'/'sMode'/dist/lib;' 148 call EnvAddFront 1, 'LIBRARY_PATH', sPathRootF'/out/'sBuildTarget'.'sBuildArch'/'sMode'/dist/usr/lib;' 149 call EnvAddFront 1, 'LIBRARY_PATH', sPathRootF'/out/'sBuildTarget'.'sBuildArch'/'sMode'/dist/usr/lib/gcc-lib/i386-pc-os2-emx/3.3.5;' 145 150 do j = 1 to asStages.0 146 call EnvAddFront 1,'BEGINLIBPATH', sPathRoot'\out\'sBuildTarget' \'sMode'\obj\gcc\gcc\'asStages.j';'151 call EnvAddFront 1,'BEGINLIBPATH', sPathRoot'\out\'sBuildTarget'.'sBuildArch'\'sMode'\obj\gcc\gcc\'asStages.j';' 147 152 end 148 call EnvAddFront 1, 'BEGINLIBPATH', sPathRoot'\out\'sBuildTarget'\'sMode'\dist\lib;' 149 call EnvAddFront 1, 'BEGINLIBPATH', sPathRoot'\out\'sBuildTarget'\'sMode'\dist\usr\lib;' 150 end 151 152 /* setup */ 153 'call BuildEnv.cmd unixõ vac365õ vac308õ toolkit452õ toolkit40õ emxõ emxpgccõ gcc302õ gcc303õ gcc321õ gcc322õ gcc335õ' 154 if (\fRm) then 155 'call BuildEnv.cmd cvs~ emx~ svn~' 153 call EnvAddFront 1, 'BEGINLIBPATH', sPathRoot'\out\'sBuildTarget'.'sBuildArch'\'sMode'\dist\lib;' 154 call EnvAddFront 1, 'BEGINLIBPATH', sPathRoot'\out\'sBuildTarget'.'sBuildArch'\'sMode'\dist\usr\lib;' 155 end 156 if (fUseBuildEnv) then 157 'call BuildEnv.cmd unixõ vac365õ vac308õ toolkit452õ toolkit40õ emxõ emxpgccõ gcc302õ gcc303õ gcc321õ gcc322õ gcc335õ' 158 159 /* Basics */ 160 if (fUseBuildEnv & \fRm) then 161 'call BuildEnv.cmd cvs~ emx~ ';/*svn~'*/ 162 156 163 /* We do not want any influence from the emx, that's only runtime stuff. */ 157 if (1) then 158 do 159 call EnvSet 0, 'LIBRARY_PATH' 160 call EnvSet 0, 'C_INCLUDE_PATH' 161 call EnvSet 0, 'CPLUS_INCLUDE_PATH' 162 call EnvSet 0, 'COBJ_INCLUDE_PATH' 163 end 164 164 call EnvSet 0, 'LDPATH' 165 call EnvSet 0, 'LIBRARY_PATH' 166 call EnvSet 0, 'C_INCLUDE_PATH' 167 call EnvSet 0, 'CPLUS_INCLUDE_PATH' 168 call EnvSet 0, 'COBJ_INCLUDE_PATH' 169 170 /* GCC */ 165 171 if (fUseStagedGcc | fRm) then 166 172 call GCC3xx 'gcc335', 'install', fRm, 1, 'gcc335' … … 212 218 /* kBuild. */ 213 219 call EnvSet fRm, 'PATH_KBUILD', sPathkBuildF 214 call EnvAddFront fRm, 'PATH', sPathkBuild'\bin\ x86.os2;'215 call EnvAddFront fRm, 'BEGINLIBPATH', sPathkBuild'\bin\ x86.os2;'220 call EnvAddFront fRm, 'PATH', sPathkBuild'\bin\os2.x86;' 221 call EnvAddFront fRm, 'BEGINLIBPATH', sPathkBuild'\bin\os2.x86;' 216 222 call EnvSet fRm, 'BUILD_TYPE', sBuildType 217 223 call EnvSet fRm, 'BUILD_TARGET', sBuildTarget … … 224 230 /* unixroot - todo: check for this and don't override existing unixroot! */ 225 231 call EnvSet fRm, 'UNIXROOT', sPathToolsF 226 call EnvAddFront fRm,'PATH', '.;' /* the sucker gets removed by 'buildenv toolkit40õ' */232 call EnvAddFront 1, 'PATH', '.;' /* the sucker gets removed by 'buildenv toolkit40õ' */ 227 233 call EnvAddFront fRm, 'PATH', sPathToolsF'/usr/bin;' 228 234 call EnvAddFront fRm, 'PATH', sPathTools'\usr\bin;' … … 267 273 call EnvSet 1, 'EMXSHELL' 268 274 call EnvSet fRm, 'SHELL', sPathToolsF'/bin/sh.exe' 269 call EnvSet fRm, 'MAKE', sPathkBuildF'/bin/x86.os2/kmk.exe'275 /*call EnvSet fRm, 'MAKE', sPathkBuildF'/bin/os2.x86/kmk.exe'*/ 270 276 call EnvSet fRM, 'PERLLIB_PREFIX', 'L:/Perl/lib;'sPathToolsF'/usr/lib/perl5' 271 277 call EnvSet fRM, 'PERL_SH_DIR', sPathToolsF'/bin' … … 650 656 */ 651 657 FixCMDEnv: procedure 652 /* do this anyway653 /* check for 4OS2 first */654 Address CMD 'set 4os2test_env=%@eval[2 + 2]';655 if (value('4os2test_env',, 'OS2ENVIRONMENT') = '4') then656 return 0;657 */658 659 658 /* force environment expansion by setting a lot of variables and freeing them. 660 659 * ~6600 (bytes) */
Note:
See TracChangeset
for help on using the changeset viewer.