Automating the build process and RETURN 0 from batch files


It seems that no matter what the actual result is from a build step
that occurs in ABLD, the return value is '0'.  In other words, it
appears to return success even if the build breaks based on some
compile or link problem.


We ran across the same problem and solved it by scanning the output of
the ABLD command in a perl script.


$cmd="abld.bat " . join(" ", @ARGV);

open(RES, "$cmd 2>&1 |");
while(<RES>) {
        print $_;
        $error=1 if (/fatal error/i);
        $error=1 if (/^make.*Error/);

exit $error;

And when doing the build, instead of running 'ABLD XXX' you
'run perl XXX'