why always “syntax error near unexpected token 'fi'”
I am a new to Linux .today I'm learning the makefile My script as following:
install: myapp [tab]@if [ -d $(INSTDIR) ];\ [tab]then\ [tab]cp myapp $(INSTDIR) &&\ [tab]chmod a+x $(INSTDIR)/myapp &&\ [tab]chmod og-w $(INSTDIR)/myapp &&\ [tab]echo "Installed in $(INSTDIR)";\ [tab]else\ [tab]echo "Sorry,$(INSTDIR) does not exist" ;false ;\ fi when i run the "make -f makefile install" /bin/sh:-c:line 8:syntax error near unexpected token 'fi' /bin/sh:-c:line 8:'fi' I have changed the makefile many times with many ways,but I can find out a solution.Please help me |
A couple of things enclose code in "[code] [\code]" to make it easier to read ( without the quotes ).
add a space before each of the "\" like so Code:
INSTDIR=/tmp/LFS |
All times are GMT -5. The time now is 09:20 PM. |