home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / icc4v108.zip / icc4.cmd next >
OS/2 REXX Batch file  |  2001-03-11  |  19KB  |  509 lines

  1. /*************************************************************************
  2.  
  3.  $Author: root $
  4.  $Date: 2001/03/01 12:32:43 $
  5.  $Id: icc4.cmd,v 1.14 2001/03/01 12:32:43 root Exp $
  6.  $Log: icc4.cmd,v $
  7.  Revision 1.14  2001/03/01 12:32:43  root
  8.  *** empty log message ***
  9.  
  10.  Revision 1.13  2001/01/31 12:54:10  root
  11.  *** empty log message ***
  12.  
  13.  Revision 1.3  2000/08/21 11:28:03  tyano
  14.  *** empty log message ***
  15.  
  16.  Revision 1.2  2000/08/20 12:56:45  tyano
  17.  *** empty log message ***
  18.  
  19.  Revision 1.1.1.1  2000/08/20 03:05:18  tyano
  20.  VAC++ 4.0 vacbld frontend like ICC
  21.  
  22.  $Revision: 1.14 $
  23.  $Name:  $
  24.  
  25. *************************************************************************/
  26. signal on novalue name error
  27. if RxFuncQuery('SYSLOADFUNCS') then do
  28.    call RxFuncAdd 'SYSLOADFUNCS', 'REXXUTIL', 'SYSLOADFUNCS'
  29.    call SysLoadFuncs
  30. end /* do */
  31. if arg() = 0 then exit 4
  32. !.alias = ''
  33. !.bin = ''
  34. !.call = 'optlink'
  35. !.dbgunref = 0
  36. !.debug = 0
  37. !.dname = ''
  38. !.dump = 0
  39. !.enumsize = ''
  40. !.exepack = ''
  41. !.extlen = ''
  42. !.fastfloat = 0
  43. !.fastint = 0
  44. !.gendll = 0
  45. !.hidedeflib = 0
  46. !.ignerrno = 0
  47. !.ignprag = ''
  48. !.initauto = ''
  49. !.isocall = ''
  50. !.libansi = 0
  51. !.libdll = 0
  52. !.longlong = 0
  53. !.map = ''
  54. !.mode = 'EXE'
  55. !.mtlib = 1
  56. !.nodigraph = 0
  57. !.noro = 0
  58. !.obj = ''
  59. !.optchain = 0
  60. !.optfunc = 0
  61. !.optinline = 0
  62. !.optlevel = ''
  63. !.optsched = 0
  64. !.optsize = 0
  65. !.optstack = 0
  66. !.pack = ''
  67. !.parmdw = 0
  68. !.pm = 'VIO'
  69. !.profile = 0
  70. !.remexcep = 0
  71. !.remstackprob = 0
  72. !.remunref = 0
  73. !.report = ''
  74. !.ring0 = 0
  75. !.rtti = ''
  76. !.signed = 0
  77. !.signedbf = 0
  78. !.stalone = 0
  79. !.stack = ''
  80. !.tiled = 0
  81. !.tname = ''
  82. !.tune = ''
  83. !.verstr = ''
  84. !.xname = ''
  85. a = ' ' || arg(1)
  86. defs.0 = 0
  87. undefs.0 = 0
  88. !.showprogress = 0
  89. !.codestore = value('tmp', , 'os2environment') || '\icc4.ics'
  90. !.clean = 0
  91. incl.0 = 1
  92. incl.1 = translate(directory(), '/', '\')
  93. do forever
  94.    parse var a b ' -' o a
  95.    if o = '' then leave
  96.    select
  97.       when o = 'CLEANCODESTORE' then !.clean = 1
  98.       when o = 'NOCODESTORE' then !.codestore = ''
  99.       when o = 'W2' then !.report = 'W'
  100.       when o = 'W3' then !.report = 'I'
  101.       when o = 'J-' then !.signed = 0
  102.       when o = 'Mp' then !.call = 'optlink'
  103.       when o = 'Ms' then !.call = 'system'
  104.       when o = 'Mc' then !.call = 'cdecl'
  105.       when o = 'Mt' then !.call = 'stdcall'
  106.       when o = 'O-' then !.optlevel = 0
  107.       when o = 'O2' then !.optlevel = 2
  108.       when o = 'O3' then !.optlevel = 3
  109.       when o = 'qautothread' then nop
  110.       when o = 'qnoautothread' then nop
  111.       when o = 'qbitfields=signed' then !.signedbf = 1
  112.       when o = 'qbitfields=unsigned' then !.signedbf = 0
  113.       when o = 'qdbgunref' then !.dbgunref = 1
  114.       when o = 'qnodbgunref' then !.dbgunref = 0
  115.       when o = 'qdigraph' then !.nodigraph = 0
  116.       when o = 'qnodigraph' then !.nodigraph = 1
  117.       when o = 'qignerrno' then !.ignerrno = 1
  118.       when o = 'qignprag=disjoint' then !.ignprag = 'opt(pragmaDisjoint,yes)'
  119.       when o = 'qignprag=isolated' then !.ignprag = 'opt(pragmaIsolated,yes)'
  120.       when o = 'qignprag=all' then !.ignprag = 'opt(pragmaDisjoint,yes),opt(pragmaIsolated,yes)'
  121.       when o = 'qipa' then nop
  122.       when o = 'qlibansi' then !.libansi = 1
  123.       when o = 'qnolibansi' then !.libansi = 0
  124.       when o = 'qloglong' then !.longlong = 1
  125.       when o = 'qnolonglog' then !.longlong = 0
  126.       when o = 'qmakedep' then nop
  127.       when o = 'qro' then !.noro = 0
  128.       when o = 'qnoro' then !.noro = 1
  129.       when o = 'qnortti' then !.rtti = ''
  130.       when o = 'qsomvolattr' then nop
  131.       when o = 'qnosomvolattr' then nop
  132.       when o = 'Su2' then !.enumsize = 'small'
  133.       when o = 'Su1' then !.enumsize = '1'
  134.       when o = 'Rn' then !.stalone = 1
  135.       when o = 'Re' then !.stalone = 0
  136.       when wordpos(o, 'C C+') > 0 then !.mode ='OBJ'
  137.       when wordpos(o, 'W0 W1') > 0 then !.report = 'E'
  138.       when wordpos(o, 'J J+') > 0 then !.signed = 1
  139.       when wordpos(o, 'O O+ O4') then !.optlevel = 4
  140.       when wordpos(o, 'Su Su- Su+ Su4') > 0 then !.enumsize = 'int'
  141.       when abbrev(o, 'isolated_call', 13) then do
  142.          parse var o . '=' o
  143.          do while o <> ''
  144.             parse var o a ':' o
  145.             !.isocall = !.isocall || ',opt(isolatedCall,"' || a || '")'
  146.          end /* do */
  147.       end /* do */
  148.       when abbrev(o, 'SHOWPROGRESS', 12) then parse var o . '=' !.showprogress
  149.       when abbrev(o, 'CODESTORE', 9) then parse var o . '=' !.codestore
  150.       when abbrev(o, 'NOOPTFUNC', 9) then !.optfunc = 0
  151.       when abbrev(o, 'initauto', 8) then parse var o . '=' !.initauto
  152.       when abbrev(o, 'EXEPACK', 7) then parse var o . '=' !.exepack
  153.       when abbrev(o, 'OPTFUNC', 7) then !.optfunc = 1
  154.       when abbrev(o, 'PMTYPE', 6) then parse var o . '=' !.pm
  155.       when abbrev(o, 'STACK', 5) then parse var o . '=' !.stack
  156.       when abbrev(o, 'qrtti', 5) then parse var o . '=' !.rtti
  157.       when abbrev(o, 'qtune', 5) then parse var o . '=' !.tune
  158.       when abbrev(o, 'Sp', 2) then !.pack = substr(o, 3)
  159.       when abbrev(o, 'Tc', 2) then nop
  160.       when abbrev(o, 'Td', 2) then nop
  161.       when abbrev(o, 'Tp', 2) then nop
  162.       when abbrev(o, 'S', 1) then nop
  163.       when abbrev(o, 'T', 1) then call processoptiont o
  164.       when abbrev(o, 'U', 1) then do
  165.          i = undefs.0 + 1
  166.          undefs.0 = i
  167.          undefs.i = substr(o, 2)
  168.       end /* do */
  169.       when abbrev(o, 'V', 1) then parse var o "'" !.verstr "'"
  170.       when abbrev(o, 'W', 1) then nop
  171.       when abbrev(o, 'X', 1) then nop
  172.       when abbrev(o, 'D', 1) then do
  173.          i = defs.0 + 1
  174.          defs.0 = i
  175.          defs.i = substr(o, 2)
  176.       end /* do */
  177.       when abbrev(o, 'F', 1) then call processoptionf o
  178.       when abbrev(o, 'G', 1) then call processoptiong o
  179.       when abbrev(o, 'H', 1) then !.extlen = substr(o, 2)
  180.       when abbrev(o, 'I', 1) then do
  181.          o = substr(o, 2)
  182.          do while o <> ''
  183.             i = incl.0 + 1
  184.             incl.0 = i
  185.             parse var o f ';' o
  186.             call SysFileTree f, 'd.', 'DO'
  187.             if d.0 = 0 then exit 4
  188.             incl.i = d.1
  189.          end /* do */
  190.       end /* do */
  191.       when abbrev(o, 'L', 1) then nop
  192.       when abbrev(o, 'N', 1) then do
  193.          s = substr(o, 2, 1)
  194.          select
  195.             when s = 'd' then !.dname = substr(o, 3)
  196.             when s = 't' then !.tname = substr(o, 3)
  197.             when s = 'x' then !.xname = substr(o, 3)
  198.          otherwise
  199.          nop
  200.          end  /* select */
  201.       end /* do */
  202.       when abbrev(o, 'O', 1) then call processoptiono o
  203.       when abbrev(o, 'P', 1) then nop
  204.    otherwise
  205.    nop
  206.    end  /* select */
  207.    a = b a
  208. end /* do */
  209. a = b a
  210. sourcefiles = ''
  211. cppsourcefiles = ''
  212. rcsourcefiles = ''
  213. binarysourcefiles = ''
  214. binonly = 1
  215. source1 = word(a, 1)
  216. do while a <> ''
  217.    parse var a c a
  218.    s = stream(c, 'c', 'query exist')
  219.    if s = '' then exit 4
  220.    parse upper value filespec('N', s) with . '.' t
  221.    if pos(t, 'C CPP CXX RC DLG H HPP HXX SQC SQX') > 0 then binonly = 0
  222.    select
  223.       when pos(t, 'C CPP CXX H HPP HXX SQC SQX') > 0 | t = '' then cppsourcefiles = cppsourcefiles || ',"' || strip(s) || '"'
  224.       when pos(t, 'RC DLG') > 0 then rcsourcefiles = rcsourcefiles || ',"' || strip(s) || '"'
  225.    otherwise
  226.      binarysourcefiles = binarysourcefiles || ',"' || strip(s) || '"'
  227.    end  /* select */
  228.    sourcefiles = sourcefiles || ',"' || strip(s) || '"'
  229. end /* do */
  230. sourcefiles = substr(sourcefiles, 2)
  231. cppsourcefiles = substr(cppsourcefiles, 2)
  232. rcsourcefiles = substr(rcsourcefiles, 2)
  233. binarysourcefiles = substr(binarysourcefiles, 2)
  234. if !.mode = 'OBJ' & !.obj = '' then do
  235.    parse var sourcefiles '"' a '"' .
  236.    parse value filespec('N', a) with b '.' .
  237.    !.obj = filespec('D', a) || filespec('P', a) || b || '.obj'
  238. end /* do */
  239. if !.obj <> '' then do
  240.    !.bin = !.obj
  241.    if right(!.bin, 1) = '\' then do
  242.       parse value filespec('N', source1) with b '.' .
  243.       !.bin = !.bin || strip(b) || '.obj'
  244.    end /* do */
  245. end /* do */
  246. if !.bin = '' then do
  247.    parse var sourcefiles '"' a '"' .
  248.    parse value filespec('N', a) with b '.' .
  249.    a = filespec('D', a) || filespec('P', a) || b
  250.    if !.gendll then !.bin = a || '.dll'
  251.    else !.bin = a || '.exe'
  252. end /* do */
  253. if !.map = '.map' then do
  254.    parse value filespec('N', !.bin) with !.map '.' .
  255.    !.map = filespec('D', !.bin) || filespec('P', !.bin) || !.map || '.map'
  256. end /* do */
  257. sourceoption = ''
  258. targetoption = ''
  259. if !.ignprag <> '' then sourceoption = sourceoption || ',' || !.ignprag
  260. if !.isocall <> '' then sourceoption = sourceoption || !.isocall
  261. if !.optsize then sourceoption = sourceoption || ',opt(size,yes)'
  262. if !.optinline then sourceoption = sourceoption || ',opt(inline,yes),opt(autoInline,yes)'
  263. if !.optstack then sourceoption = sourceoption || 'opt(stack,yes)'
  264. if !.optchain then sourceoption = sourceoption || 'opt(stackChaining,yes)'
  265. if !.optsched then sourceoption = sourceoption || 'opt(schedule,yes)'
  266. if !.optlevel <> '' then sourceoption = sourceoption || ",opt(level," || !.optlevel || ")"
  267. if !.tune <> '' then sourceoption = sourceoption || ",opt(tune," || !.tune || ")"
  268. if !.fastfloat then sourceoption = sourceoption || ",opt(float,yes)"
  269. if !.fastint then sourceoption = sourceoption || ",opt(integer,yes)"
  270. if !.nodigraph then sourceoption = sourceoption || ',lang(digraphs,no)'
  271. if !.ignerrno then sourceoption = sourceoption || ',lang(ignerrno,yes)'
  272. if !.signed then sourceoption = sourceoption || ',lang(signedChars,yes)'
  273. if !.signedbf then sourceoption = sourceoption || ',lang(signedBitfields,yes)'
  274. if !.longlong then sourceoption = sourceoption || ',lang(longLong,yes)'
  275. if !.remexcep then sourceoption = sourceoption || ',gen(eh,no)'
  276. if !.tiled then sourceoption = sourceoption || ',gen(tiledMemory,yes)'
  277. if !.remstackprob then sourceoption = sourceoption || ',gen(probe,no)'
  278. if !.ring0 then sourceoption = sourceoption || ',gen(ring0,yes)'
  279. if !.parmdw then sourceoption = sourceoption || ',gen(parmDWord,yes)'
  280. if !.initauto <> '' then sourceoption = sourceoption || ',gen(initAuto,' || !.initauto || ')'
  281. if !.extlen <> '' then sourceoption = sourceoption || ",gen(maxMangling,ansi," || !.extlen || ")"
  282. if !.pack <> '' then sourceoption = sourceoption || ",gen(pack," || !.pack || ")"
  283. if !.enumsize <> '' then sourceoption = sourceoption || ",gen(enumSize," || !.enumsize || ")"
  284. if !.profile then sourceoption = sourceoption || ",gen(profile,yes)"
  285. if !.remunref then sourceoption = sourceoption || ",gen(unreferenced,yes)"
  286. if !.dbgunref then sourceoption = sourceoption || ",gen(debugUnreferenced,yes)"
  287. if !.noro then sourceoption = sourceoption || ",gen(readOnly,no)"
  288. if !.dump then sourceoption = sourceoption || ",gen(dump,yes)"
  289. if !.tname <> '' then sourceoption = sourceoption || ',gen(codeSeg,"' || !.tname || '")'
  290. if !.rtti <> '' then do
  291.    sourceoption = sourceoption || ',gen(rtti,' !.rtti || ')'
  292.    targetoption = targetoption || ',gen(rtti,' !.rtti || ')'
  293. end /* do */
  294. if !.xname <> '' then do
  295.    sourceoption = sourceoption || ',gen(ehCodeSeg,"' || !.xname || '")'
  296.    sourceoption = sourceoption || ',gen(ehDataSeg,"' || !.xname || '")'
  297. end /* do */
  298. if !.dname <> '' then do
  299.    sourceoption = sourceoption || ',gen(dataSeg,"' || !.dname || '")'
  300.    sourceoption = sourceoption || ',gen(uninitSeg,"' || !.dname || '")'
  301.    sourceoption = sourceoption || ',gen(constSeg,"' || !.dname || '")'
  302. end /* do */
  303. do i = 1 to defs.0
  304.    parse var defs.i n '=' v
  305.    if v = '' then sourceoption = sourceoption || ',define(' || strip(n) || ')'
  306.    else sourceoption = sourceoption || ',define(' || strip(n) || ',"' || strip(v) ||  '")'
  307. end /* do */
  308. do i = 1 to undefs.0
  309.    sourceoption = sourceoption || ',undefine(' || undefs.i || ')'
  310. end /* do */
  311. if \ binonly then do
  312.    sourceoption = sourceoption || ',gen(call,' || !.call || ')'
  313.    do i = 1 to incl.0
  314.       sourceoption = sourceoption || ',incl(searchPath,"' || translate(incl.i, '/', '\') || '")'
  315.    end /* do */
  316. end /* do */
  317. if !.stack <> '' then targetoption = targetoption || ',link(stack,' || !.stack || ')'
  318. if !.verstr <> '' then targetoption = targetoption || ',link(versionString,"' || !.verstr || '")'
  319. if !.mtlib then targetoption = targetoption || ',link(linkWithMultiThreadLib,yes)'
  320. if !.hidedeflib then targetoption = targetoption || ',link(defaultLibs,no)'
  321. if !.debug then targetoption = targetoption || ',link(debug,yes)'
  322. if !.libdll then targetoption = targetoption || ',link(linkWithSharedLib,yes)'
  323. if !.optfunc then targetoption = targetoption || ',link(optFunc,yes)'
  324. if !.map <> '' then targetoption = targetoption || ',link(map,"' || translate(!.map,'/','\') || '")'
  325. targetoption = targetoption || ',link(pmType,' || !.pm || ')'
  326. if !.exepack <> '' then targetoption = targetoption || ',link(exePack,' || !.exepack || ')'
  327. if !.report <> '' then sourceoption = sourceoption || ',report(level,' || !.report || '")'
  328. f = SysTempFileName(value('tmp', , 'os2environment') || '\?????.icc')
  329. if left(sourceoption, 1) = ',' then sourceoption = substr(sourceoption, 2)
  330. if left(targetoption, 1) = ',' then targetoption = substr(targetoption, 2)
  331. call stream f, 'c', 'open write'
  332. if cppsourcefiles <> '' then call lineout f, 'group cppsourcefiles =' translate(cppsourcefiles, '/', '\')
  333. if rcsourcefiles <> '' then call lineout f, 'group rcsourcefiles =' translate(rcsourcefiles, '/', '\')
  334. if binarysourcefiles <> '' then call lineout f, 'group binarysourcefiles =' translate(binarysourcefiles, '/', '\')
  335. if sourceoption <> '' then call lineout f, 'option sourceoption =' sourceoption
  336. call lineout f, 'option targetoption =' targetoption
  337. call lineout f, 'option targetoption {'
  338. if !.mode = 'NUL' then call lineout f, '   target type(obj) "/dev/nul" {'
  339. else call lineout f, '   target "' || translate(!.bin, '/', '\') ||  '" {'
  340. if sourceoption <> '' then do
  341.    call lineout f, '      option sourceoption {'
  342.    if cppsourcefiles <> '' then call lineout f, '         source type(cpp) cppsourcefiles'
  343.    if rcsourcefiles <> '' then call lineout f, '         source type(rc) rcsourcefiles'
  344.    if binarysourcefiles <> '' then call lineout f, '         source binarysourcefiles'
  345.    call lineout f, '      }'
  346. end /* do */
  347. else do
  348.    if cppsourcefiles <> '' then call lineout f, '         source type(cpp) cppsourcefiles'
  349.    if rcsourcefiles <> '' then call lineout f, '         source type(rc) rcsourcefiles'
  350.    if binarysourcefiles <> '' then call lineout f, '         source binarysourcefiles'
  351. end /* do */
  352. call lineout f, '   }'
  353. call lineout f, '}'
  354. call stream f, 'c', 'close'
  355. '@copy' f value('tmp', , 'os2environment') || '\lastbld.icc >nul 2>&1'
  356. call setlocal
  357. '@call' value('vacppmain', , 'os2environment') || '\bin\setenv'
  358. if !.codestore = '' then o = '-NOC'
  359. else o = '-C' !.codestore
  360. if !.clean then do
  361.    '@vacbld' o '-CLEAN'
  362.    exit rc
  363. end /* do */
  364. if !.showprogress <> 0 then o = o '-SHOWPROGRESS=' || !.showprogress
  365. '@vacbld' o f
  366. code = rc
  367. call endlocal
  368. exit code
  369.  
  370. error:
  371. ln = sigl
  372. say condition()
  373. say ln '@' condition('C')
  374. say condition('I')
  375. say condition('D')
  376. say condition('S')
  377. exit 8
  378.  
  379. processoptiont: procedure expose !.
  380. parse arg opt
  381. opt = substr(opt, 2)
  382. do while opt <> ''
  383.    parse var opt c 2 opt
  384.    if pos(left(opt, 1), '+-*') > 0 then parse var opt v 2 opt
  385.    else v = ''
  386.    c = c || v
  387.    select
  388.       when abbrev(c, 'n', 1) then nop
  389.       when wordpos(c, 'i i+ m m+') then !.debug = 1
  390.       when c = 'i- m-' then !.debug = 0
  391.       when wordpos(c, 'x x+') then !.dump = 1
  392.       when c = 'x-' then !.dump = 0
  393.    otherwise
  394.    nop
  395.    end  /* select */
  396. end /* do */
  397. return
  398.  
  399. processoptiono: procedure expose !.
  400. parse arg opt
  401. opt = substr(opt, 2)
  402. do while opt <> ''
  403.    parse var opt c 2 opt
  404.    if pos(left(opt, 1), '+-*') > 0 then parse var opt v 2 opt
  405.    else v = ''
  406.    c = c || v
  407.    select
  408.       when abbrev(c, 'l m', 1) then nop
  409.       when wordpos(c, 'c c+') then !.optsize = 1
  410.       when c = 'c-' then !.optsize = 0
  411.       when wordpos(c, 'i i+') then !.optinline = 1
  412.       when c = 'i-' then !.optinline = 0
  413.       when wordpos(c, 'p p+') then !.optstack = 1
  414.       when c = 'p-' then !.optstack = 0
  415.       when wordpos(c, 'q q+') then !.optchain = 1
  416.       when c = 'q-' then !.optchain = 0
  417.       when wordpos(c, 's s+') then !.optsched = 1
  418.       when c = 's-' then !.optsched = 0
  419.    otherwise
  420.    nop
  421.    end  /* select */
  422. end /* do */
  423. return
  424.  
  425. processoptiong: procedure expose !.
  426. parse arg opt
  427. opt = substr(opt, 2)
  428. do while opt <> ''
  429.    parse var opt c 2 opt
  430.    if pos(left(opt, 1), '+-*') > 0 then parse var opt v 2 opt
  431.    else v = ''
  432.    c = c || v
  433.    select
  434.       when abbrev(c, 'a b k u v w y z', 1) then nop
  435.       when wordpos(c, 'e e+') then !.gendll = 0
  436.       when c = 'e-' then !.gendll = 1
  437.       when wordpos(c, 'x x+') then !.remexcep = 1
  438.       when c = 'x-' then !.remexcep = 0
  439.       when wordpos(c, 'd d+') then !.libdll = 1
  440.       when c = 'd-' then !.libdll = 0
  441.       when wordpos(c, 't t+') then !.tiled = 1
  442.       when c = 't-' then !.tiled = 0
  443.       when wordpos(c, 's s+') then !.remstackprob = 1
  444.       when c = 's-' then !.remstackprob = 0
  445.       when wordpos(c, 'r r+') then !.ring0 = 1
  446.       when c = 'r-' then !.ring0 = 0
  447.       when wordpos(c, 'p p+') then !.parmdw = 1
  448.       when c = 'p-' then !.parmdw = 0
  449.       when wordpos(c, 'n n+') then !.hidedeflib = 1
  450.       when c = 'n-' then !.hidedeflib = 0
  451.       when wordpos(c, 'm m+') then !.mtlib = 1
  452.       when c = 'm-' then !.mtlib = 0
  453.       when wordpos(c, 'l l+') then !.remunref = 1
  454.       when c = 'i-' then !.remunref = 0
  455.       when wordpos(c, 'i i+') then !.fastint = 1
  456.       when c = 'i-' then !.fastint = 0
  457.       when wordpos(c, 'h h+') then !.profile = 1
  458.       when c = 'h-' then !.profile = 0
  459.       when wordpos(c, 'f f+') then !.fastfloat = 1
  460.       when c = 'f-' then !.fastfloat = 0
  461.       when c = '3' then !.tune = 'x86'
  462.       when c = '4' then !.tune = '486'
  463.       when c = '5' then !.tune = 'pentium'
  464.       when c = '6' then !.tune = 'pentium2'
  465.    otherwise
  466.    nop
  467.    end  /* select */
  468. end /* do */
  469. return
  470.  
  471. processoptionf: procedure expose !.
  472. parse arg opt
  473. opt = substr(opt, 2)
  474. do while opt <> ''
  475.    parse var opt c 2 opt
  476.    if pos(left(opt, 1), '+-*') > 0 then parse var opt v 2 opt
  477.    else v = ''
  478.    c = c || v
  479.    select
  480.       when wordpos(c, 'a i l n t w') > 0 then leave
  481.       when wordpos(c, 'a+ a- i+ i- l+ l- n+ n- t+ t- w+ w-') > 0 then nop
  482.       when abbrev(c, 'b', 1) then nop
  483.       when wordpos(c, 'c c+') > 0 then !.mode = 'NUL'
  484.       when c = 'm' then do
  485.          !.map = opt
  486.          if !.map = '' then !.map = '.map'
  487.          leave
  488.       end /* do */
  489.       when c = 'm+' then !.map = '.map'
  490.       when c = 'o' then do
  491.          !.mode = 'OBJ'
  492.          !.obj = opt
  493.          leave
  494.       end /* do */
  495.       when c = 'o+' then do
  496.          !.mode = 'OBJ'
  497.          !.obj = ''
  498.       end /* do */
  499.       when c = 'e' then do
  500.          !.mode = 'EXE'
  501.          !.bin = opt
  502.          leave
  503.       end /* do */
  504.    otherwise
  505.    nop
  506.    end  /* select */
  507. end /* do */
  508. return
  509.