Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- PBMake 2.17G for Clipper, Xbase++, C and˙+--------------------------------------------------------------+ - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

      ONERROR= is the Compile Failure directive. It allows you to use
      PBMake in a way that when a compiler error is encountered, your
      editor will be invoked and you will be fast forwarded to the point
      in your source code where the error occured.

      A note about Clipper, here... Clipper does NOT normally create a
      DOS errorlevel on exit after failure.  You must place the /ES2 flag 
      in the flag directive to use this error trap feature. 

      Here is an example for Clipper and Qedit:

      FLAG= /M /N /W /ES2       ( or whatever flags you use + /ES2 )

      ONERROR= CLIPPER Q -N

      Here is an example for Clipper and MultiEdit:

      FLAG= /M /N /W /ES2       ( or whatever flags you use + /ES2 )

      ONERROR= CLIPPER ME /L

      Here's how it works:

      PBMake tells DOS to redirect the text output from your compiler
      into a file.

      When PBMake encounters a DOS error in the make process, it jumps
      to the compiler error trap in MAKE.BAT file.

      The compiler error trap executes PBERRLIN.EXE and passes in a
      bunch of information from your .MAK file:

      <parm1> = The redirected output from the compiler.
                ( defaults to ${pbm}.err, override with ERRFILE= )
      <parm2> = Batch file name to be created.
                ( defaults to ${pbm}.bat, override with ERRBAT= )
      <parm3> = The Compiler that created the error.
      <parm4> = The DOS command that invokes your editor.
      <parm5> = The directive that causes your editor to jump to a line.

      When PBERRLIN.EXE executes it parses the <parm1> file looking for
      two pieces of information. It determines the source module that
      failed, and it determines the line number where the first error
      originated. ( Please note that you are only supplying the 3,4 and
      5 <parms> in the ONERROR= line. )

      After PBERRLIN.EXE has the information it needs, it creates the file
      named in <parm2>.

      MAKE.BAT then executes the <parm2> file that was just created.

      The <parm2> file contains the editor directive to edit the failed
      compile source code and the directive to jump to the correct line
      number. It also loads the error file as the second file, so if
      there is more than one error, you can swap windows back and forth
      to fix all the errors in one shot.

      Fortunately, this takes longer to read about than to execute. It's
      really quite fast and a very time saving feature.

      The files in <parm1> and <parm2> are automatically added to the
      CLEANUP= directive.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson