0

I have tried to execute a simple make file with if loop condition

PROJDIR:=..
$(info TEXT selected is $(TEXT))
if [ -d "$(PROJDIR)/test" ]; then
  BUILDTOOLDIR?=$(PROJDIR)/test
fi

After executing , i am getting error

Makefile:5: *** missing separator.  Stop.

I have searched some of the similar query

Makefile:6: *** missing separator. Stop

makefile:4: *** missing separator. Stop

I have tried some of the solutions

  1. With tabs.
  2. with slashes /

But nothing got worked for me . Any help ? Something i have missed here ?

tech_123
  • 90
  • 1
  • 10
  • 2
    The code shown is not a valid `makefile`. Most of it looks like basic `shell` syntax. – G.M. Aug 24 '18 at 12:38
  • You can learn the basics of writing makefiles in the [GNU Make Manual](https://www.gnu.org/software/make/manual/make.html), section [2 An Introduction to Makefiles](https://www.gnu.org/software/make/manual/make.html#Introduction) and section [3 Writing Makefiles](https://www.gnu.org/software/make/manual/make.html#Makefiles). – Mike Kinghan Aug 24 '18 at 13:51

0 Answers0