gpt4 book ai didi

makefile - 如何在 make target 中声明自定义变量?

转载 作者:行者123 更新时间:2023-12-02 03:45:12 27 4
gpt4 key购买 nike

如何在 makefile 目标中定义动态变量?例如:

all:
VAR := $@
@echo $(VAR)

最佳答案

我意识到这是正确的方法:

all: VAR = $@
all:
@echo $(VAR)

关于makefile - 如何在 make target 中声明自定义变量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2451521/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com