[EMAIL PROTECTED] wrote:
include gmsl

all:
    [EMAIL PROTECTED] /t || if errorlevel 0 cmd /c "set status=1"
    $(if $(status),@echo failed,@echo success)

Firstly, I don't know why you are doing 'include gmsl'. You don't need it for what you are trying to do.

Secondly, your use of $(if) is incorrect. Since the entire line starting $(if) will be expanded before any of the commands for all are run the value of status is irrelevant and the result you'll get will be based on the value of status in the Makefile.

What you really want to do is something like this:

all:
        @myprogram
        @if errorlevel 1 ( echo failed ) else ( echo success )

You can read more about the DOS shell here:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/batch.mspx

John.
--
John Graham-Cumming
[EMAIL PROTECTED]

Home: http://www.jgc.org/
POPFile: http://getpopfile.org/

Sign up for my Spam and Anti-spam Newsletter
at http://www.jgc.org/



_______________________________________________
Make-w32 mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/make-w32

Reply via email to