【发布时间】:2021-06-07 18:26:56
【问题描述】:
所以,在我目前拥有的 make 文件中
test1 := $(shell python script.py)
我想从 script.py 返回两个变量。我试过了:
test1,test2 := $(shell python script.py)
以上肯定不行。
实现上述目标的最佳方法是什么?
【问题讨论】:
标签: variables makefile gnu-make
所以,在我目前拥有的 make 文件中
test1 := $(shell python script.py)
我想从 script.py 返回两个变量。我试过了:
test1,test2 := $(shell python script.py)
以上肯定不行。
实现上述目标的最佳方法是什么?
【问题讨论】:
标签: variables makefile gnu-make
你可以使用:
test_all := $(shell python script.py)
test1 := $(word 1,$(test_all))
test2 := $(word 2,$(test_all))
【讨论】:
all: test1 := $(word 1,$(test)) test2 := $(word 2,$(test)) I ran: test="test one" make all.