Here’s how to do it:
You can execute a shell command in a Makefile using ();
E.g.
echoTarget:
(echo "I'm an echo")
Just be sure to put a tab character before each line in the shell command.
i.e. you will need a tab before (echo “I’m an echo”)
Here’s what will work for activating virtualenv:
activate:
( \
source path/to/virtualenv/activate; \
pip install -r requirements.txt; \
)