Reputation: 6756
I still get error when i try run this
OS=$(shell uname -s)
#################################################################
printVar:
ifeq ($(OS),Darwin)
@echo $(OS)
endif
all:
make -j3 -f $(MAKEFILE)
terminal
$ make printVar
ifeq (Darwin,Darwin)
/bin/sh: -c: line 0: syntax error near unexpected token `Darwin,Darwin'
/bin/sh: -c: line 0: `ifeq (Darwin,Darwin)'
make: *** [printVar] Error 2
Upvotes: 0
Views: 687
Reputation: 212929
You don't want a tab before ifeq
/endif
as they are not commands:
OS=$(shell uname -s)
#################################################################
printVar:
ifeq ($(OS),Darwin)
@echo $(OS)
endif
all:
make -j3 -f $(MAKEFILE)
Upvotes: 4