[英]Makefile always call all even with target
Okay, I think I'm missing something in my makefile and it's causing me headaches. 好吧,我想我在makefile中遗漏了一些东西,这让我很头疼。 In my local build I call it with "dev:"
and it does the dev target; 在我的本地构建中,我用"dev:"
调用它,它执行dev目标; Great, but I also want it to always do the "all:"
target. 很好,但我也希望它始终做"all:"
目标。 When I call make dev
it runs the dev but not the all, is there a terminology fail here? 当我调用make dev
它会运行dev而不是all,这里是否有术语失败?
here is my makefile 这是我的makefile
BUILD="build/"
STATIC="static/"
APP_NAME="Open World"
all:
# Remove the current build folder
rm -rf ${BUILD}
# Create the build directory
mkdir -p ${BUILD}
dev:
all
dev=${STATIC}dev
echo "Doing DEVELOPMENT build"
# Copy the package.json
cp ${dev}package.json ${BUILD}
prod:
echo "production"
The default (first) target is only run if no target is explicitly given. 仅当未明确指定目标时,才会运行默认(第一个)目标。 If you want it to run when another target is given then you need to make it a dependency of that target. 如果您希望在给出另一个目标时运行它,那么您需要使其成为该目标的依赖项。
dev: all
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.