Changeset 672
- Timestamp:
- Mar 11, 2010, 2:57:32 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mkspecs/os2-g++/emxexpw.cmd
r655 r672 35 35 G.!eol = '0D0A'x 36 36 37 G.!Default Template =,37 G.!DefaultDllTemplate =, 38 38 "LIBRARY ${name} INITINSTANCE TERMINSTANCE"G.!eol||, 39 39 "DESCRIPTION '${bldlevel}'"G.!eol||, 40 "DATA MULTIPLE NONSHARED"G.!eol||, 41 "EXPORTS" 42 /* <-- ${exports} go here */ 40 "DATA MULTIPLE NONSHARED" 41 /* <-- EXPORTS + ${exports} go here */ 42 43 G.!DefaultExeTemplate =, 44 "NAME ${name} ${exetype}"G.!eol||, 45 "DESCRIPTION '${bldlevel}'" 46 /* <-- EXPORTS + ${exports} go here */ 43 47 44 48 G.!StatsTemplate =, … … 63 67 Opt.!DefTemplate = '' 64 68 Opt.!DefMap = '' 69 Opt.!ExeType = '' 65 70 Opt.!Quiet = 0 66 71 Opt.!Objects.0 = 0 … … 95 100 /* check options */ 96 101 if (Opt.!DefFile == '') then call Error "E_NoDefFile" 102 if (Opt.!ExeType \== '' & Opt.!DefMap \== '') then 103 call Error "E_UnexpectedOption", "-map "Opt.!DefMap 97 104 if (Opt.!DefMap \== '') then 98 105 if (Opt.!Objects.0 == 0) then call Error "E_NoObjectFiles" … … 102 109 parse value filespec('N', Opt.!DefFile) with Opt.!LibName '.' . 103 110 end 111 if (Opt.!ExeType \== '') then 112 G.!DefaultTemplate = G.!DefaultExeTemplate 113 else 114 G.!DefaultTemplate = G.!DefaultDllTemplate 104 115 105 116 /* check emxexp.exe existence */ … … 160 171 exports_tail = '' 161 172 162 /* write stuff before ${exports} */163 if (Opt.!DefTemplate = '') then do164 call lineout Opt.!DefFile, ReplaceMacros(G.!DefaultTemplate)165 have_exports_macro = 1166 end167 else do168 parse value WriteTemplatedDEF('B') with have_exports_macro' 'exports_tail169 end170 171 call lineout Opt.!DefFile172 173 173 /* if there are no object files, jsut leave the EXPORTS section empty */ 174 174 if (Opt.!Objects.0 == 0) then 175 175 have_exports_macro = 0 176 177 /* write stuff before ${exports} */ 178 if (Opt.!DefTemplate == '') then do 179 call lineout Opt.!DefFile, ReplaceMacros(G.!DefaultTemplate) 180 if (have_exports_macro) then 181 call lineout Opt.!DefFile, 'EXPORTS' 182 end 183 else do 184 parse value WriteTemplatedDEF('B') with have_exports_macro' 'exports_tail 185 end 186 187 call lineout Opt.!DefFile 176 188 177 189 if (have_exports_macro) then do … … 261 273 if (Opt.!DefTemplate == '') then do 262 274 call lineout Opt.!DefFile, ReplaceMacros(G.!DefaultTemplate) 275 call lineout Opt.!DefFile, 'EXPORTS' 263 276 have_exports_macro = 1 264 277 end … … 298 311 str = Replace(str, '${vendor}', Opt.!LibVendor) 299 312 str = Replace(str, '${bldlevel}', Opt.!LibBldLevel) 313 str = Replace(str, '${exetype}', Opt.!ExeType) 300 314 301 315 return str … … 666 680 Opt.!DefMap = G.!opts.i 667 681 end 682 when (o == 'exe') then do 683 i = i + 1 684 Opt.!ExeType = G.!opts.i 685 end 668 686 when (o == 'q') then do 669 687 Opt.!Quiet = 1 … … 747 765 say ' -template <file> : DEF file template [default: none]' 748 766 say ' -map <file> : Input/output map file [default: none]' 767 say ' -exe <string> : Executable type [default: none]' 749 768 /* say ' -q : Be quiet [default: be loud]' */ 750 769 say 751 770 say '<input_file> is one or more object files to process (wildcards' 752 say 'are NOT supported).' 771 say 'are NOT supported). This argument may be omitted in -exe mode (see below)' 772 say 'or if it is only necessary to attach the description to the DLL. If' 773 say '-map is specified, this argument may not be omitted.' 753 774 say 754 775 say '<response_file> contains options and input files delimited with' … … 767 788 say 'make these assignments persistent from build to build.' 768 789 say 769 say 'If -template option is not empty, the given file is used as a template' 790 say 'If the -exe option is given, the script generates a .DEF file for the' 791 say 'executable rather than for the DLL, which is useful for specifying the' 792 say 'executable type (passed as an option value, either WINDOWCOMPAT or WINDOWAPI)' 793 say 'and for embedding the application description into the executable. The -map' 794 say 'option is not allowed in -exe mode.' 795 say 796 say 'If the -template option is not empty, the given file is used as a template' 770 797 say 'to generate the resulting DEF file. The following macros are recognized:' 771 798 say … … 775 802 say '- ${vendor} is replaced with the library vendor string;' 776 803 say '- ${exports} is replaced with the list of exported entries.' 804 say 805 say 'In -exe mode, the following macro is additionally recognized:' 806 say 807 say '- ${exetype} is replaced with the specified EXE type.' 777 808 say 778 809 say 'In addition to the above, there is also the ${bldlevel} macro that is' … … 938 969 e.E_CantDeleteFile = 'Cannot delete file ''%1'' (RC = %2).' 939 970 e.E_InvalidOption = 'Invalid option: ''%1''.' 971 e.E_UnexpectedOption = 'Unexpected option: ''%1''.' 940 972 e.E_FileNotFound = 'File not found: ''%1''.' 941 973 e.E_NoDefFile = 'No output DEF file.'
Note:
See TracChangeset
for help on using the changeset viewer.