I want to know whether the variable CHAPTER contains spaces. I tried to use findstring without success :
CHAPTER=default
new:
ifeq (" ",$(findstring " ",$(CHAPTER)))
$(error Variable contains space)
else
echo "variable ok"
endif
This code says "variable ok" whereas I would expect the opposite.
What am I doing wrong ?
How should I do ?