当前位置: 技术问答>linux和unix
请教关于AUTOMAKE问题
来源: 互联网 发布时间:2016-04-12
本文导语: 我刚接触linux编程(非计算机专业),很多地方不了解,对于我的问题请各位不吝赐教! 我根据书上一步一步的学automake来生成makefile,可是在autoscan,configure.scan改名,aclocal,autoconf,autoheader,自己编写脚本配置makefile.am统...
我刚接触linux编程(非计算机专业),很多地方不了解,对于我的问题请各位不吝赐教!
我根据书上一步一步的学automake来生成makefile,可是在autoscan,configure.scan改名,aclocal,autoconf,autoheader,自己编写脚本配置makefile.am统统顺利进行之后,运行automake --add-missing时出现以下错误:
configure.in: no proper invocation of AM_INIT_AUTOMAKE was found.
configure.in: You should verify that configure.in invokes AM_INIT_AUTOMAKE,
configure.in: that aclocal.m4 is present in the top-level directory,
configure.in: and that aclocal.m4 was recently regenerated (using aclocal).
automake: no `Makefile.am' found or specified
-------------------------------------------
文件列表:
autoscan.log config.status hello missing
config.h configure hello.c mkinstalldirs
config.h.in configure.in install-sh
-------------------------------------------
configure.in的内容如下:
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
AC_CONFIG_SRCDIR([hello.c])
AC_CONFIG_HEADER([config.h])
# Checks for programs.
AC_PROG_CC
# Checks for libraries.
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_OUTPUT
------------------------------------------------
makefile.am内容如下:
AUTOMAKE_OPTIONS=foreign
bin_PROGRAMS= hello
hello_SOURCES= hello.c
-----------------------------------------------
请各位大侠帮忙,不胜感激!!!!!!!!!我的可用分不多,不好意思啊。。。。。。
我根据书上一步一步的学automake来生成makefile,可是在autoscan,configure.scan改名,aclocal,autoconf,autoheader,自己编写脚本配置makefile.am统统顺利进行之后,运行automake --add-missing时出现以下错误:
configure.in: no proper invocation of AM_INIT_AUTOMAKE was found.
configure.in: You should verify that configure.in invokes AM_INIT_AUTOMAKE,
configure.in: that aclocal.m4 is present in the top-level directory,
configure.in: and that aclocal.m4 was recently regenerated (using aclocal).
automake: no `Makefile.am' found or specified
-------------------------------------------
文件列表:
autoscan.log config.status hello missing
config.h configure hello.c mkinstalldirs
config.h.in configure.in install-sh
-------------------------------------------
configure.in的内容如下:
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
AC_CONFIG_SRCDIR([hello.c])
AC_CONFIG_HEADER([config.h])
# Checks for programs.
AC_PROG_CC
# Checks for libraries.
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_OUTPUT
------------------------------------------------
makefile.am内容如下:
AUTOMAKE_OPTIONS=foreign
bin_PROGRAMS= hello
hello_SOURCES= hello.c
-----------------------------------------------
请各位大侠帮忙,不胜感激!!!!!!!!!我的可用分不多,不好意思啊。。。。。。
|
在你的 configure.in 中加上 AM_INIT_AUTOMAKE
|
看了下,你好像没有aclocal.m4这个文件! 需要用aclocal来自动生成!
|
你看有没有aclocal.m4文件产生,有了就OK了!