And*_*uer 9 automake autoconf ocaml
我有一个Makefile.am用于编译Ocaml源代码的ocamlbuild.但是,即使我有
AM_INIT_AUTOMAKE([foreign no-dependencies])
Run Code Online (Sandbox Code Playgroud)
在我的configure.ac,automake认为必须有一个C编译器来安装exectuables.也就是说,如果我将Makefile.am目标可执行文件放入bin_PROGRAMS使用ocamlbuild构建,则autoreconf(版本1.11.3)告诉我:
Makefile.am: C source seen but `CC' is undefined
Makefile.am: The usual way to define `CC' is to add `AC_PROG_CC'
Makefile.am: to `configure.ac' and run `autoconf' again.
autoreconf: automake failed with exit status: 1
Run Code Online (Sandbox Code Playgroud)
我不希望有AC_PROG_CC,因为我的源代码不包括C.它是纯粹的Ocaml程序编写.我能做什么?(我有同样的问题libexec_PROGRAMS.)
它可能是不需要的,但只是简单地将AC_PROG_CC添加到Makefile.am会有什么损害吗?阻力最小的路径和所有.
解决这个有着十年历史的邮件列表消息:
http://lists.gnu.org/archive/html/automake/2003-01/msg00057.html
听起来您可能需要将progname_SOURCES定义为空.如果我正确理解了帖子,如果省略显式声明,则progname_SOURCES将隐式定义为progname.c.