Changeset 381 for trunk/mkspecs
- Timestamp:
- Dec 5, 2009, 12:23:42 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mkspecs/os2-g++/emxexpw.cmd
r102 r381 35 35 G.!eol = '0D0A'x 36 36 37 G.!DefaultTemplate.1 =, 38 'LIBRARY ' /* <-- ${name} goes here */ 39 G.!DefaultTemplate.2 =, 40 ' INITINSTANCE TERMINSTANCE' G.!eol||, 41 'DATA MULTIPLE NONSHARED' G.!eol||, 42 'EXPORTS' 37 G.!DefaultTemplate =, 38 "LIBRARY ${name} INITINSTANCE TERMINSTANCE"G.!eol||, 39 "DESCRIPTION '@#${vendor}:${version}#@ ${desc}'"G.!eol||, 40 "DATA MULTIPLE NONSHARED"G.!eol||, 41 "EXPORTS" 43 42 /* <-- ${exports} go here */ 44 43 … … 59 58 Opt.!LibName = '' 60 59 Opt.!LibVersion = '' 60 Opt.!LibDesc = '' 61 Opt.!LibVendor = '' 61 62 Opt.!DefTemplate = '' 62 63 Opt.!DefMap = '' … … 157 158 /* write stuff before ${exports} */ 158 159 if (Opt.!DefTemplate = '') then do 159 call lineout Opt.!DefFile,, 160 G.!DefaultTemplate.1||Opt.!LibName||G.!DefaultTemplate.2 160 call lineout Opt.!DefFile, ReplaceMacros(G.!DefaultTemplate) 161 161 have_exports_macro = 1 162 162 end … … 252 252 /* write stuff before ${exports} */ 253 253 if (Opt.!DefTemplate == '') then do 254 call lineout Opt.!DefFile,, 255 G.!DefaultTemplate.1||Opt.!LibName||G.!DefaultTemplate.2 254 call lineout Opt.!DefFile, ReplaceMacros(G.!DefaultTemplate) 256 255 have_exports_macro = 1 257 256 end … … 278 277 279 278 return 279 280 /** 281 * Replaces all known ${} macros in the given string and returns it. 282 */ 283 ReplaceMacros: procedure expose (Globals) 284 285 parse arg str 286 287 str = Replace(str, '${name}', Opt.!LibName) 288 str = Replace(str, '${version}', Opt.!LibVersion) 289 str = Replace(str, '${desc}', Opt.!LibDesc) 290 str = Replace(str, '${vendor}', Opt.!LibVendor) 291 292 return str 280 293 281 294 /** … … 312 325 epos = pos('${exports}', str) 313 326 if (epos == 0) then do 314 str = Replace(str, '${name}', Opt.!LibName) 315 str = Replace(str, '${version}', Opt.!LibVersion) 327 str = ReplaceMacros(str) 316 328 call lineout Opt.!DefFile, str 317 329 end … … 330 342 do while lines(Opt.!DefTemplate) 331 343 str = linein(Opt.!DefTemplate) 332 str = Replace(str, '${name}', Opt.!LibName) 333 str = Replace(str, '${version}', Opt.!LibVersion) 344 str = ReplaceMacros(str) 334 345 call lineout Opt.!DefFile, str 335 346 end … … 628 639 Opt.!LibVersion = G.!opts.i 629 640 end 641 when (o == 'desc') then do 642 i = i + 1 643 Opt.!LibDesc = G.!opts.i 644 end 645 when (o == 'vendor') then do 646 i = i + 1 647 Opt.!LibVendor = G.!opts.i 648 end 630 649 when (o == 'template') then do 631 650 i = i + 1 … … 678 697 say 679 698 say ' -def <file> : Output DEF file [required]' 680 say ' -name <string> : Library name [default: DEF file w/o extension]'699 say ' -name <string> : Library name [default: DEF file name w/o ext]' 681 700 say ' -version <string> : Library version [default: none]' 701 say ' -desc <string> : Library description [default: none]' 702 say ' -vendor <string> : Library vendor [default: none]' 682 703 say ' -template <file> : DEF file template [default: none]' 683 704 say ' -map <file> : Input/output map file [default: none]' … … 706 727 say 707 728 say '- ${name} is replaced with the library name;' 708 say '- ${version} is replaced with the library version;' 729 say '- ${version} is replaced with the library version string;' 730 say '- ${desc} is replaced with the library description string;' 731 say '- ${vendor} is replaced with the library vendor string;' 709 732 say '- ${exports} is replaced with the list of exported entries.' 710 733
Note:
See TracChangeset
for help on using the changeset viewer.