通过读取另一个文件的内容在makefile中创建变量 [英] Create a variable in a makefile by reading contents of another file

查看:1135
本文介绍了通过读取另一个文件的内容在makefile中创建变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从makefile即时创建一个变量,其值将是另一个数据文件的全部内容.

How can I create a variable on-the-fly from makefile, the value of which would be the entire contents of another data file.

推荐答案

我猜您想在Makefile中将变量设置为另一个文件的内容:

I'm guessing that you like to set a variable in your Makefile to the contents of another file:

FILE=test.txt
VARIABLE=`cat $(FILE)`

target:
    echo $(VARIABLE)

这篇关于通过读取另一个文件的内容在makefile中创建变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆