user5400132 user5400132 - 10 days ago 4x
Linux Question

echo not working from Makefile

I have added code to Makefile something like:

ifeq "$var" "1"
var_1 := 1\
echo "g++ version OK"\
$(info $(var_1))
echo "needs to be updated"

I am using tabs everywhere in this part of code. It does not seem to work, nothing echoes at all when I run make, Makefile already contains the object files and flags etc. Does it have something to with the position of the code? I'm unable to identify. Please help.


echo is a shell command, it only works from within a recipe or $(shell ...) function.

Anywhere else use $(info ...) function.