Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在汽车制造
我想将命令执行结果分配给 Makefile 变量
如何在configure.ac中做到这一点?
要将 的输出分配给echo foo变量var (即var=foo),请将其放入configure.ac:
echo foo
var
var=foo
configure.ac
AC_SUBST([var],[$( echo foo )]) # use backticks for maximal portability
或者,分配 var 然后调用AC_SUBST([var]) (没有第二个参数)。
AC_SUBST([var])