【发布时间】:2012-03-17 10:04:59
【问题描述】:
我正在尝试学习 GNU 自动工具,并且我正在学习一些教程,我尝试从以下步骤逐步完成:
http://kern-81.homepage.t-online.de/autotools_tutorial.pdf
但我有一个问题,在第 8 页手动编写了 Makefile.in 和一行:
BINDIR=@bindir@
之后
autoconf
./configure
在我生成的 makefile 中,我得到了
BINDIR=${exec_prefix}/bin
但是当我这样做时
@echo $(exec_prefix)
似乎这个变量是空的,所以我会的一切
make install
会转到/bin,这有点奇怪,为什么它没有设置为/usr/bin,我应该向autoconf发出一些参数吗?
同样在这个 .pdf 文件中写道:
bindir is an output variable of AC INIT which also detects includedir, srcdir, libdir, and others.
是真的吗?因为在这个 autoconf.am 的例子中是:
AC_INIT(helloworld, 0.0.1, dev@helloworld.org)
所以这个简单的宏可以完成所有这些吗?如果是,怎么做?
【问题讨论】:
-
您可能打错字了,或者误解了您的结果。生成的 Makefile 中应该有一行将 exec_prefix 设置为 ${prefix},
标签: makefile autotools autoconf