Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

makefile giving unexpected end of file error

HOMEDIR = $(shell pwd)
DEFAULT = 4.0.3
YESDIR = $(shell echo $(@:install-%=%) | tr A-Z a-z)
NODIR = $(shell echo $(@:clean-%=%) | tr A-Z a-z)
install:
@$(MAKE) install-$(DEFAULT)   
install-%:
@cd $(HOMEDIR);\
if [ ! -e $(YESDIR) ]; then \
  echo "Library $(@:install-%=%) Version=$(YESDIR) does not exist"; \
elif [ -e $(YESDIR)/Install.sh ]; then \
    echo "Installing $(PKGNAM) version=$(YESDIR)" ; \
    cd $(YESDIR) ;\
    $(SHELL) Install.sh $(HOMEDIR) 1 ;\   
elif [ -e $(YESDIR)/Makefile ]; then \
    cd $(YESDIR); \
    $(MAKE); \
else \
    echo "Installation instruction for $(@:install-%=%) Version=$(YESDIR) does not exist"; \
fi;

the above makefile gives me the following error line 6: syntax error: unexpected end of file

like image 227
apramc Avatar asked Jan 03 '17 19:01

apramc


1 Answers

Remove trailing blanks in this line:

    $(SHELL) Install.sh $(HOMEDIR) 1 ;\   
like image 184
Cyrus Avatar answered Sep 30 '22 19:09

Cyrus