Here is my make target:
copy_python:
if test -d $(VIRTUAL_ENV)/lib; then \
cp -a $(VIRTUAL_ENV)/lib/python2.7/site-packages/. ./package/tmp/; \
fi
if test -d $(VIRTUAL_ENV)/lib64; then \
cp -a $(VIRTUAL_ENV)/lib64/python2.7/site-packages/. ./package/tmp/; \
fi
Here is the error:
/bin/sh: 2: Syntax error: end of file unexpected (expecting "fi")
Makefile:28: recipe for target 'copy_python' failed
make: *** [copy_python] Error 2
Why does this error occur?
You have an extra space after the ending backslash, at the end of the second cp
command. For this reason, \
no longer acts as a line continuation and the fi
on the next line is not passed to sh
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With