项目根目录中的 Makefile
# Makefile
.PHONY: help
help:
@echo "Commands:"
@echo "venv : creates development environment."
# Environment
.ONESHELL:
venv:
python3 -m venv venv
source venv/bin/activate
当我跑步时:
make venv
我收到以下错误:
$ make venv
python3 -m venv venv
source venv/bin/activate
/bin/sh: 2: source: not found
Makefile:15: recipe for target 'venv' failed
make: *** [venv] Error 127
但是,在 Makefile 之外运行命令完全没有问题。有什么想法吗?