Changeset 9111 for trunk/tools
- Timestamp:
- Aug 24, 2002, 6:36:04 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/bin/BldLevelInf.cmd
r5030 r9111 1 /* $Id: BldLevelInf.cmd,v 1. 5 2001-01-26 21:33:13 phallerExp $1 /* $Id: BldLevelInf.cmd,v 1.6 2002-08-24 04:36:04 bird Exp $ 2 2 * 3 3 * Adds a Description string to the given .def-file. … … 5 5 * 6 6 */ 7 8 signal on novalue name NoValueHandler 7 9 8 10 if RxFuncQuery('SysLoadFuncs') = 1 then … … 31 33 32 34 /* 35 * Config stuff. 36 */ 37 iVerbose = 1; /* 0, 1 or 2. */ 38 if (getenv("BUILD_QUIET") <> '') then 39 iVerbose = 0; 40 else if (getenv("BUILD_VERBOSE") <> '') then 41 iVerbose = 2; 42 sGlobals = 'iVerbose' 43 44 /* 33 45 * Parse parameters. 34 46 */ … … 109 121 sVendor = sValue; 110 122 111 when (ch = 'R') then /* Vendor*/112 sDescription = ReadDescription(sValue, sDefFile );123 when (ch = 'R') then /* Description */ 124 sDescription = ReadDescription(sValue, sDefFileIn); 113 125 114 126 when (ch = 'P') then /* Fixpak version */ … … 188 200 */ 189 201 rc = UpdateDefFile(sDefFileIn, sDefFileOut, sDescription); 202 if (rc = 0 & iVerbose >= 1) then 203 say 'BldLevelInf: Applied build info to '''sDefFileOut'''.'; 190 204 exit(rc); 191 205 … … 194 208 * Display script syntax. 195 209 */ 196 syntax: procedure 210 syntax: procedure expose (sGlobals); 197 211 say 'Syntax: MakeDesc.cmd [options] <deffile in> <deffile out> [options]' 198 212 say ' <deffile> Defitionfile which will have an DESCRIPTION appended.' … … 227 241 * @remark Write only code... - let's hope it works. 228 242 */ 229 LookupDefine: procedure 243 LookupDefine: procedure expose (sGlobals); 230 244 parse arg '#'sDefine'='sMacro','sIncludeFile 231 245 … … 338 352 call stream sIncludeFile, 'c', 'close'; 339 353 sValue = substr(sLine, 2, iLastQuote - 2); 340 say 'Found 'sMacro'='sValue; 354 if (iVerbose >= 2) then 355 say 'Found 'sMacro'='sValue; 341 356 return sValue; 342 357 end … … 375 390 376 391 call stream sIncludeFile, 'c', 'close'; 377 say 'Found 'sMacro'='sValue; 392 if (iVerbose >= 2) then 393 say 'Found 'sMacro'='sValue; 378 394 return sValue; 379 395 end … … 395 411 * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) 396 412 */ 397 ReadDescription: procedure ;413 ReadDescription: procedure expose (sGlobals); 398 414 parse arg sDefFile, sDefFile2 399 415 … … 449 465 call stream sDefFile, 'c', 'close'; 450 466 sValue = substr(sLine, 2, iEnd - 2); 451 say 'Found Description:' sValue; 467 if (iVerbose >= 2) then 468 say 'Found Description:' sValue; 452 469 return sValue; 453 470 end … … 470 487 * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no) 471 488 */ 472 UpdateDefFile: procedure ;489 UpdateDefFile: procedure expose (sGlobals); 473 490 parse arg sDefFileIn, sDefFileOut, sDescription 474 491 … … 566 583 return 0; 567 584 585 586 /** 587 * Get environment variable value. 588 * @returns Environment variable value if set. 589 * '' if not set. 590 * @param sVar Variable name. 591 */ 592 getenv: procedure 593 parse arg sVar 594 return value(sVar,,'OS2ENVIRONMENT'); 595 596 597 /** 598 * No value handler 599 */ 600 NoValueHandler: 601 say 'NoValueHandler: line 'SIGL; 602 return 0; 603
Note:
See TracChangeset
for help on using the changeset viewer.