I have a rule like below just for test
test:
ifeq (1,1)
$(info --)
endif
echo kkk
when I run make test, it shows
makefile:41: *** commands commence before first target. Stop.
What is wrong?
edit
according to Florian Weimer, we should indent the $(info --) line. But If I write
test:
ifeq (1,1)
$(info --)
endif
echo kkk
test2:
ifeq (1,1)
$(info --)
endif
echo kkk
then make test will complain that
makefile:11: *** commands commence before first target. Stop.
So doesn't make always scan the whole makefile? It seems that it doesn't stop after rule test is finished
echo kkkis not right? it is indented by a tab, and interpreted by shell - user15964