I would like to check if Linux system is ubuntu inside Makefile. What I do is:
copy_files:
if [ "$(head -n 1 /etc/lsb-release | cut -d '=' -f2)" = "Ubuntu" ]; then \
echo "ubuntu"; \
else \
echo "not ubuntu"; \
fi
But the above condition fails always, i.e. it always prints "not ubuntu" on an ubuntu machine. So What am I doing wrong?
$$(head -n 1 ...)
for the reasons explained in that answer, right?