Exit a Makefile target called by parent without throwing an error
Makefile

all: test dosomething

test:
    @echo "hello"

dosomething:
    @if [ "a" = "a" ]; then\
        echo "world";\
        exit 0;\
    fi


Running: make will return:

hello
world