Quantcast
Viewing all articles
Browse latest Browse all 3

Answer by Omer Dagan for If conditions in a Makefile, inside a target

You can simply use shell commands. If you want to suppres echoing the output, use the "@" sign. For example:

clean:
    @if [ "test" = "test" ]; then\
        echo "Hello world";\
    fi

Note that the closing ";" and "\" are necessary.


Viewing all articles
Browse latest Browse all 3

Trending Articles