help-make
[Top][All Lists]
Advanced

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

interrupt make


From: Fritz Code
Subject: interrupt make
Date: Mon, 22 Jun 2009 12:30:29 +0200

Hi

depending on some conditions which I e.g. check with bash functions I
have to quit make (and all successive make commands and targets)
and print an error message. Reading the manual I thought $(error
myerrortext) would be right.
The message gets desiplayed but make doesn't stop! Commands and
targets get still processed!


Here an example:
If the file file doesnt exist the make call should be canceld
immedately. However the commands
echo "after cancel";\ and also the target cancel still gets executed!?

Thanks in advance


FILE := ./file


error-t:
    @echo "E R R O R";\
    $(error error-message)

cancel: test
    @(\
    echo "cancel target executed";\
    )

test:
    @(\
    echo "processing test target";\
    if [ -f ${FILE} ]; then\
        echo "file ${FILE} exists";\
    else\
        echo "file does NOT exist";\
        ${MAKE} error-t;\
        echo "after cancel";\
    fi;\
    )




-- 
Regards,
--Codefritz




reply via email to

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