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;
上面的makefile给出了以下错误 第6行:语法错误:意外的文件结尾
答案 0 :(得分:3)
删除此行中的尾随空白:
$(SHELL) Install.sh $(HOMEDIR) 1 ;\