Changeset 3690


Ignore:
Timestamp:
Oct 26, 2019, 7:08:59 PM (5 years ago)
Author:
Andreas Schnellbacher
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/netlabs/macros/recompile.e

    r3680 r3690  
    676676      KeyPathEFileChecks   = KeyPath'\EFileChecks' -- EFileChecks = fDifferent;...
    677677
     678      SavedEFiles      = QueryConfigKey( KeyPathEFiles)
     679      SavedEFileTimes  = QueryConfigKey( KeyPathEFileTimes)
     680      SavedEFileChecks = QueryConfigKey( KeyPathEFileChecks)
     681
     682      --------------------------------
    678683      -- 1) Check if .E file exists
    679684      do once1 = 1 to 1
     
    690695      enddo  -- once1
    691696
     697      --------------------------------
    692698      -- 2) Compare current .EX file with Netlabs .EX file and delete it if equal
    693699      do once2 = 1 to 1
     
    770776                  if fCurExFileWasLinked >= 0 then
    771777                     -- unlink works only if EX file exists
    772                      'unlink' CurExFile
     778                     'Unlink' CurExFile
    773779                     fRelinkUnlinked = 1
    774780                  endif
     
    798804                  if fCurExFileWasLinked >= 0 | fRelinkUnlinked then  -- < 0 means error or not linked
    799805                     if not fRelinkUnlinked  then  -- maybe already unlinked
    800                         'unlink' CurExFile
     806                        'Unlink' CurExFile
    801807                        if rc then
    802808                           cError = cError + 1
     
    804810                        endif
    805811                     endif
    806                      'link' BaseName
     812                     'Link' BaseName
    807813                     if rc >= 0 then
    808814                        cRelink = cRelink + 1
     
    826832               WriteBasenameLog( LogFile, Basename, fHeaderWritten, '   is older than and different from Netlabs .EX file')
    827833            elseif CurExFileTime > NetlabsExFileTime then
    828                cWarning = cWarning + 1
    829834               WriteBasenameLog( LogFile, Basename, fHeaderWritten, 'I  current .EX file "'CurExFile'"')
    830835               WriteBasenameLog( LogFile, Basename, fHeaderWritten, '   is newer than and different from Netlabs .EX file')
     
    834839      enddo  -- once2
    835840
     841      --------------------------------
    836842      -- 3) Compare current .EX file with myepm .EX file if Netlabs .EX file doesn't exist
    837843      do once3 = 1 to 1
     
    840846         endif
    841847
    842          -- Ensure that Netlabs .EX file doesn't exists
     848         -- Ensure that Netlabs .EX file doesn't exist
    843849         NetlabsExFile = NepmdRootDir'\netlabs\ex\'BaseName'.ex'
    844850         if Exist( NetlabsExFile) then
     
    861867         CurExFileTime = NepmdQueryPathInfo( CurExFile, 'MTIME')
    862868         if not rc then
    863             next = QueryConfigKey( KeyPathTime)
    864             if next <> CurExFileTime then
     869            SavedExFileTime = QueryConfigKey( KeyPathTime)
     870            if SavedExFileTime <> CurExFileTime then
    865871               fCompExFile = 1
    866872            endif
     
    869875      enddo  -- once3
    870876
     877      --------------------------------
    871878      -- 4) Check .E files and compare current .E files with Netlabs .E files or with last check
    872879      do once4 = 1 to 1
     
    878885            leave
    879886         endif
    880 
    881          -- Get list of EFiles from NEPMD.INI
    882          SavedEFiles = QueryConfigKey( KeyPathEFiles)
    883          -- Get list of times for EFiles from NEPMD.INI
    884          SavedEFileTimes = QueryConfigKey( KeyPathEFileTimes)
    885          -- Get list of check results for EFiles from NEPMD.INI
    886          SavedEFileChecks = QueryConfigKey( KeyPathEFileChecks)
    887887
    888888         if SavedEFiles = '' then
     
    925925               -- Get full pathname
    926926               FullEFile = NepmdSearchPath( EFile, 'EPMMACROPATH')
    927 
    928927               if FullEFile = '' then
    929928                  -- EFile doesn't exist
     
    10041003      enddo  -- once4
    10051004
     1005      --------------------------------
    10061006      -- 5) Run Etpm and compare compiled .E files with Netlabs .E files
    10071007      do once5 = 1 to 1
     
    10391039         endif
    10401040
     1041         -- Check E files here (after etpm) if not already done in 4)
     1042         fEFilesDone = (NewEFiles <> '')
     1043
    10411044         NewEFiles = GetEtpmFilesFromLog( EtpmLogFile)
    1042          SavedEFiles      = QueryConfigKey( KeyPathEFiles)
    1043          SavedEFileTimes  = QueryConfigKey( KeyPathEFileTimes)
    1044          SavedEFileChecks = QueryConfigKey( KeyPathEFileChecks)
    10451045         erest = NewEFiles
    10461046         frest = SavedEFiles
     
    10501050         NewEFileChecks = ''
    10511051         do while erest <> ''
     1052            -- Already processed, no need to check them here again
     1053            if fEFilesDone then
     1054               leave
     1055            endif
     1056
    10521057            -- For every EFile...
    10531058            parse value erest with EFile';'erest
    1054 /**/
    1055             -- Check E files here (after etpm) if not already done above
    1056             if SavedEFiles <> '' then
    1057                iterate
    1058             endif
    1059 /**/
    10601059            parse value frest with SavedEFile';'frest
    10611060            if EFile = SavedEFile then
     
    11401139      enddo  -- once5
    11411140
     1141      --------------------------------
    11421142      -- 6) Compare .EX files
    11431143      do once6 = 1 to 1
     
    11961196
    11971197         elseif next = 0 then  -- equal
     1198/**/
    11981199            WriteBasenameLog( LogFile, Basename, fHeaderWritten, 'I  .EX file "'ExFile'"')
    11991200            WriteBasenameLog( LogFile, Basename, fHeaderWritten, '   is equal to current .EX file')
    1200 
     1201/**/
    12011202         else                  -- error
    12021203            cError = cError + 1
     
    12061207      enddo  -- once6
    12071208
     1209      --------------------------------
    12081210      -- Don't unlink, delete or copy if Checkonly is active
    12091211      if fReplaceExFile = 1 & not fCheckOnly then
     
    13001302            endif
    13011303         endif
    1302          if NewEFiles <> '' then
     1304         if NewEFiles <> '' & NewEFileTimes <> '' & NewEFileChecks <> '' then
    13031305            DeleteConfigKey( KeyPathEFiles)
    13041306            DeleteConfigKey( KeyPathEFileTimes)
Note: See TracChangeset for help on using the changeset viewer.