make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Exit value


From: David Baird
Subject: RE: Exit value
Date: Wed, 18 Aug 2004 13:58:42 +0300

Henry Oppermann wrote:
> way to gain access to this exit value?  I have a case where 
> an assembler
> returns a code which is valid for <= 4.  Above that value, I 
> want to exit.
> Make exits if the value is >0.
> 
> Limited to cmd.exe on Windows systems.

Try the following, if you have perl:

%.o: %.s
        $(ASM) -o $@ $< || if errorlevel 5 perl -e "exit 1"

The idea is that the errorlevel check is only executed when the exit
code from the assembler is non-zero, and the Perl command will return an
error only if the errorlevel is above 4.

-David





reply via email to

[Prev in Thread] Current Thread [Next in Thread]