Changeset 1281


Ignore:
Timestamp:
Nov 18, 2008, 6:19:46 PM (17 years ago)
Author:
John Small
Message:

Ticket 297: Various build improvements/corrections

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/ReleaseEdit.cmd

    r1137 r1281  
    1313 *      which need a version number and/or date/time:
    1414 *         *.def, file_id.diz, dll\version.h, warpin\fm2.wis
     15 *
     16 * Change log:
     17 *      18 Nov 08 JBS Ticket 297: Various build improvements/corrections
     18 *      - Use SysTempFilename instead of hard-coded temp file name
     19 *       - Commented out support for changing version in FM2.WIS
    1520 *
    1621*/
     
    4045ext = substr(translate(file), lastpos('.', file) +1)   /* if no extension, ext <-- uppercase(file) */
    4146parse value date('s') with year 5 month 7 day
    42 tmpfile = 'redit.bak'   /* If SysTempFilename is used, SysLoadFuncs first */
    43 '@if exist' tmpfile 'del' tmpfile
     47call RxFuncAdd 'SysTempFilename', 'REXXUTIL', 'SysTempFilename'
     48tmpfile = SysTempFilename('redittmp.???')
    4449'copy' file tmpfile
     50if rc \= 0 then
     51   do
     52      say;say 'Unable to copy to ' || tmpfile || '!! Proceesing aborted.'
     53      exit 1
     54   end
    4555'del' file
    4656select
     
    5666      do
    5767         'sed -r "/FM\/2 v/s/(FM\/2 v)[0-9]+\.[0-9.]+/\1' || ver || '/" ' || tmpfile || ' >' file
    58       end
    59    when ext = 'WIS' then
    60       do
    61          'sed -r -e "s/(PACKAGEID=.*Base\\)[0-9\]+/\1' || warpin_db_ver || '/" -e "s/(PACKAGEID=.*Debugging support\\)[0-9\]+/\1' || warpin_db_ver || '/" ' || tmpfile || ' >' file
    6268      end
    6369   when right(ext, length(mkstr_makefile)) = mkstr_makefile then
  • trunk/ReleaseTool.cmd

    r1276 r1281  
    1919 *    warpin packageid/database version number(s)
    2020 *
    21  * This program uses the following enviromental variables
     21 * This program uses the following enviromental variables, if set
    2222 *    SVN_EDITOR to set the text editor that is called
    2323 *    SVN_TESTER to call a cmd file that copies files to your test directory
     
    2525 *    SVN_KILL allows you to set a program to kill any running version of FM/2
    2626 *             killpid is used as default (must be in path)
     27 *
     28 * Change log:
     29 *      18 Nov 08 JBS Ticket 297: Various build improvements/corrections
     30 *              - Use same file list for option 8 and option 20
     31 *              - Set the file list for option 8 and option 20 once, in Init routine
     32 *              - Removed fm2.wis from the file list for option 8 and option 20 (not needed)
     33 *              - Added optional commit to option 20
     34 *              - Removed extraneous 'pause' in option 20
     35 *              - Fixed a bug in option 0 (run a command shell)
    2736 *
    2837*/
     
    4150
    4251
    43 globals = 'cmd prompt editor editorcmds killpid tester killtarget'
     52globals = 'cmd prompt editor editorcmds killpid tester killtarget version_filelist'
    4453
    4554parse arg ver next_ver
     
    6271         if entry \= 'N' then
    6372            do
     73               signal off Error
    6474               '@'cmd '/c 'action
     75               signal on Error
    6576               action = -1                                      /* Skip SELECT below */
    6677            end
     
    6980      when action = 0 then
    7081         do /* Open a command line */
     82            signal off Error
    7183            if right(translate(cmd), 8) = '4OS2.EXE' then
    7284               '@' || cmd 'prompt [''exit'' to return to ReleaseTool]' || prompt
     
    7688                  '@' || cmd
    7789               end
     90            signal on Error
    7891         end
    7992      when action = 1 then
     
    111124            if strip(ver) = '' then
    112125               ver = GetVer('the pending release')
    113             filelist = 'av2.def databar.def dirsize.def dll\fm3dll.def dll\fm3res.def eas.def'
    114             filelist = filelist 'fm3.def fm4.def global.def ini.def killproc.def sysinfo.def'
    115             filelist = filelist 'undel.def vcollect.def vdir.def viewinfs.def vtree.def'
    116             filelist = filelist 'warpin\fm2.wis file_id.diz dll\version.h warpin\makefile dll\internal\makefile'
    117             do f = 1 to words(filelist)
    118                call ReleaseEdit ver word(filelist, f)
     126            do f = 1 to words(version_filelist)
     127               call ReleaseEdit ver word(version_filelist, f)
    119128               say
    120129            end
    121             filelist = 'HISTORY README'
    122             do f = 1 to words(filelist)
    123                file = word(filelist, f)
     130            version_filelist2 = 'HISTORY README'
     131            do f = 1 to words(version_filelist2)
     132               file = word(version_filelist2, f)
    124133               call SysCls
    125134                                        say;say;say
     
    155164      when action = 8 then
    156165         do /* Commit code */
    157             svn_cmd = 'svn commit'
    158             say;say;say
    159             say 'Online and OK to execute: 'svn_cmd'? (Y/n)'
    160             if translate(SysGetKey()) \= 'N' then svn_cmd
     166            call CommitifOK
    161167         end
    162168      when action = 9 then
     
    177183         do /* Test the binaries */
    178184            if tester == '' then
    179               do
     185               do
    180186                  call NotYet action
    181187                  say 'Test the binaries.'
     
    186192                  say 'You should, where possible, also verify that any bugs'
    187193                  say 'that were fixed for the release are working as expected.'
    188               end
    189           else
     194               end
     195            else
     196               do  /*kills FM/2 using killpid from FM/2 utils (must be in path) and run cmd to copy files
     197                    to test directory and change to that directory must type exit to return here*/
     198                  killpid killtarget
     199                  cmd tester
     200               end
     201         end
     202      when action = 12 then
     203         do /* Lxlite */
     204            'wmake lxlite'
     205         end
     206      when action = 13 then
     207         do /* Test the release code */
     208            if tester == '' then
     209                do
     210                        call NotYet action
     211                  say 'Test the (compressed) release code.'
     212                  say
     213                  say 'Verify that all exe''s continue to load and run after being compressed.'
     214               end
     215            else
    190216              do  /*kills FM/2 using killpid from FM/2 utils (must be in path) and run cmd to copy files
    191217                    to test directory and change to that directory must type exit to return here*/
     
    194220              end
    195221         end
    196       when action = 12 then
    197          do /* Lxlite */
    198             'wmake lxlite'
    199          end
    200       when action = 13 then
    201          do /* Test the release code */
    202             if tester == '' then
    203               do
    204                   call NotYet action
    205                   say 'Test the (compressed) release code.'
    206                   say
    207                   say 'Verify that all exe''s continue to load and run after being compressed.'
    208               end
    209           else
    210               do  /*kills FM/2 using killpid from FM/2 utils (must be in path) and run cmd to copy files
    211                     to test directory and change to that directory must type exit to return here*/
    212                   killpid killtarget
    213                   cmd tester
    214               end
    215          end
    216222      when action = 14 then
    217223         do /* Build distro */
    218224            call SysCls
    219             if strip(ver) = '' then
    220                ver = GetVer('the pending release')
    221             'wmake dist FM2_VER=-' || WPI_ver(ver)
     225            'wmake dist'
    222226         end
    223227      when action = 15 then
     
    276280      when action = 20 then
    277281         do /* Set next version */
    278             if strip(next_ver) = '' then
    279                next_ver = GetVer('the next release')
    280             filelist = 'av2.def databar.def dirsize.def dll\fm3dll.def dll\fm3res.def eas.def fm3.def fm4.def global.def ini.def killproc.def sysinfo.def undel.def vcollect.def vdir.def viewinfs.def vtree.def warpin\fm2.wis file_id.diz dll\version.h'
    281             do f = 1 to words(filelist)
    282                call ReleaseEdit next_ver word(filelist, f)
     282            next_ver = GetVer('the next release')
     283            do f = 1 to words(version_filelist)
     284               call ReleaseEdit next_ver word(version_filelist, f)
    283285               say
    284                '@pause'
    285286            end
    286          end
    287 /*
    288       when action = 21 then
    289          do
    290          end
    291 */
     287            call CommitifOK version_filelist
     288         end
    292289        otherwise
    293290                nop
    294291   end
    295292        say;say;say
    296         '@pause'               
     293        if action \= 0 then
     294                '@pause'               
    297295end
    298296
     
    329327
    330328        editor = value('SVN_EDITOR',,'OS2ENVIRONMENT')
    331         if editor == '' then
    332                 editor = 'tedit'
    333    upperwrd1 = translate(word(editor, 1))
    334    if upperwrd1 = 'EPM' | upperwrd1 = 'EPM.EXE' then
    335       editorcmds = "'3'"
    336    else
    337       editorcmds = ""
    338 
    339329   cmd          = value('COMSPEC',,'OS2ENVIRONMENT')
    340330   prompt       = value('PROMPT',,'OS2ENVIRONMENT')
    341331   tester       = value('SVN_TESTER',,'OS2ENVIRONMENT')
    342332   killpid      = value('SVN_KILL',,'OS2ENVIRONMENT')
     333
     334   editorcmds = ""
     335        if editor == '' then
     336                editor = 'tedit'
     337   else
     338        do
     339                upperwrd1 = translate(word(editor, 1))
     340                if upperwrd1 = 'EPM' | upperwrd1 = 'EPM.EXE' then
     341                editorcmds = "'3'"
     342      end               
    343343   if killpid == '' then
    344344       killpid      = 'killpid'
    345345   killtarget  = ' FM/2'
     346        version_filelist = 'av2.def databar.def dirsize.def dll\fm3dll.def dll\fm3res.def'
     347        version_filelist = version_filelist 'dll\version.h eas.def fm3.def fm4.def global.def ini.def'
     348        version_filelist = version_filelist 'killproc.def sysinfo.def undel.def vcollect.def vdir.def'
     349        version_filelist = version_filelist 'viewinfs.def vtree.def file_id.diz'
     350        version_filelist = version_filelist 'warpin\makefile dll\internal\makefile'
    346351return
    347352
     
    552557   signal ErrorExit
    553558
    554 
     559CommitIfOK: procedure
     560        parse arg filelist
     561   svn_cmd = 'svn commit'
     562   say;say;say
     563   say 'Online and OK to execute: 'svn_cmd'? (Y/n)'
     564   if translate(SysGetKey()) \= 'N' then svn_cmd filelist
     565return
  • trunk/dll/makefile

    r1242 r1281  
    4242# 22 Jul 08 SHL Change from dllsyms to syms target for consistency
    4343# 06 Oct 08 SHL Add missing -dDEBUG= to CFLAGS; rework lxlite suppress logic
     44# 18 Nov 08 JBS Ticket 297: Various build improvements/corrections
    4445
    4546# Environment:
     
    6768
    6869!if $(USE_RC)
    69 RC = rc
    70 !else
    71 RC = wrc
     70RC = rc -n
     71!else
     72RC = wrc -q
    7273!endif
    7374
     
    255256
    256257$(BASERES).res: *.rc *.dlg fm3dll2.h fm3dlg.h $(ICONS)
     258  @echo. & echo Compiling resource: $* & echo.
    257259  $(RC) $(RCFLAGS) $*
    258260!if $(USE_RC)
     
    265267  @echo $(LINK) @$(BASERES).lrf @$(BASERES).def
    266268  $(LINK) @$(BASERES).lrf @$(BASERES).def
     269  @echo. & echo Compiling resource: $@ & echo.
    267270  $(RC) $(RCFLAGS2) $(BASERES).res $@
    268271  bldlevel $@
     
    297300  lxlite $@ /c:minstub
    298301!endif
     302  @echo. & echo Compiling resource: $@ & echo.
    299303  $(RC) $(RCFLAGS2) $(BASERES).res $@
    300304!ifndef DEBUG
  • trunk/makefile

    r1259 r1281  
    2323# 22 Jul 08 SHL Pass FORTIFY options to subordinate makefiles
    2424# 25 Oct 08 SHL Sanitize DEBUG usage
     25# 18 Nov 08 JBS Ticket 297: Various build improvements/corrections
    2526
    2627# Environment - see makefile_pre.mk and dll\makefile
     
    5051syms: exesyms dllsyms .symbolic
    5152
    52 dist: lxlitedll $(BASE) lxliteexe syms wpi .symbolic
     53dist: all syms lxlite wpi .symbolic
    5354
    5455# Only update resources
    5556res: .symbolic
    5657  @echo Updating resources only
    57   $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) MAKERES=1
     58  $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) MAKERES=1
    5859
    5960# make DLL components
     
    6162dll: .symbolic
    6263  cd dll
    63   $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT)
     64  $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT)
    6465  cd ..
    6566
    6667dllsyms: .symbolic
    6768  cd dll
    68   $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) syms
     69  $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) syms
    6970  cd ..
    7071
     
    7879
    7980allexe: *.mak .symbolic
    80   @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT)
     81  @for %f in ($<) do $(MAKE) -h -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT)
    8182
    8283# make SYM files
    8384
    8485exesyms: *.mak .symbolic
    85   @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) sym
     86  @for %f in ($<) do $(MAKE) -h -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) sym
    8687
    8788# make WPI files
     
    8990wpi: .symbolic
    9091  cd warpin
    91   $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(WARPIN_OPTS)
     92  $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(WARPIN_OPTS)
    9293  cd ..
    9394
     
    9899lxliteexe: *.mak .symbolic
    99100!ifndef DEBUG
    100   @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
     101  @for %f in ($<) do $(MAKE) -h -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
    101102!endif
    102103
     
    105106!ifndef DEBUG
    106107  cd dll
    107   $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
     108  $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
    108109  cd ..
    109110!endif
     
    111112cleanobj: .symbolic
    112113  cd dll
    113   $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) cleanobj
     114  $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) cleanobj
    114115  cd ..
    115116  -del *.obj
     
    117118clean:: .symbolic
    118119  cd dll
    119   $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) clean
     120  $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) clean
    120121  cd ..
    121122  -del *.exe
     
    129130distclean: clean .symbolic
    130131  cd warpin
    131   $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) distclean
     132  $(MAKE) -h $(__MAKEOPTS__) $(DEBUG_OPT) distclean
    132133  cd ..
    133134
  • trunk/makefile_post.mk

    r1259 r1281  
    77# 23 Feb 08 JBS Add support for building SYM files (Ticket 226)
    88# 25 Oct 08 JBS Rework DEBUG usage to match what C code expects
     9# 18 Nov 08 JBS Ticket 297: Various build improvements/corrections
    910
    1011!ifndef MAKERES
     
    1617$(BASE).exe: $(BASE).lrf $(BASE).obj $(BASE).res $(BASE).def .explicit
    1718  $(LINK) @$(BASE).lrf @$(BASE).def
     19  @echo. & echo Compiling resource: $@ & echo.
    1820  $(RC) $(RCFLAGS2) $(BASE).res $@
    1921  bldlevel $@
     
    4244     lxlite $@ /c:minstub
    4345!endif
     46  @echo. & echo Compiling resource: $@ & echo.
    4447  $(RC) $(RCFLAGS2) $(BASE).res $@
    4548!ifndef DEBUG
  • trunk/makefile_pre.mk

    r1259 r1281  
    1515# 22 Jul 08 SHL Pass FORTIFY to subordinate makefiles
    1616# 06 Oct 08 SHL Pass DEBUG in CFLAGS; clean up USE_RC usage
     17# 18 Nov 08 JBS Ticket 297: Various build improvements/corrections
    1718
    1819# Environment: see dll\makefile
     
    3334
    3435!ifdef USE_RC
    35 RC = rc
     36RC = rc -n
    3637!else
    37 RC = wrc
     38RC = wrc -q
    3839!endif
    3940
     
    128129!ifdef USE_RC
    129130.rc.res:
     131   @echo. & echo Compiling resource: $*.rc & echo.
    130132   $(RC) $(RCFLAGS) $*.rc
    131133   ren $*.res $*.res
    132134!else
    133135.rc.res: .AUTODEPEND
     136   @echo. & echo Compiling resource: $*.rc & echo.
    134137  $(RC) $(RCFLAGS) $*.rc
    135138!endif
Note: See TracChangeset for help on using the changeset viewer.