automake工作流程

本文记录了使用Autotools工具集(包括autoscan、aclocal、autoconf、automake等)进行项目的配置和构建过程。从运行autoscan开始,到解决过程中出现的各种问题,如缺少必要的配置文件和命令执行错误等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

emcc@emcc-desktop:~/work$ ls
test.c
emcc@emcc-desktop:~/work$ autoscan
emcc@emcc-desktop:~/work$ ls
autoscan.log  configure.scan  test.c
emcc@emcc-desktop:~/work$ vi autoscan.log
emcc@emcc-desktop:~/work$ vi configure.scan
emcc@emcc-desktop:~/work$ vi configure.scan
emcc@emcc-desktop:~/work$ aclocal
aclocal: `configure.ac' or `configure.in' is required
emcc@emcc-desktop:~/work$ ls
autoscan.log  configure.scan  test.c
emcc@emcc-desktop:~/work$ mv configure.scan configure.in
emcc@emcc-desktop:~/work$ aclocal
emcc@emcc-desktop:~/work$ ls
autom4te.cache  autoscan.log  configure.in  test.c
emcc@emcc-desktop:~/work$ autoconf
emcc@emcc-desktop:~/work$ ls
autom4te.cache  autoscan.log  configure  configure.in  test.c
emcc@emcc-desktop:~/work$ 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 for any configure output
emcc@emcc-desktop:~/work$ ls
autom4te.cache  autoscan.log  configure  configure.in  test.c
emcc@emcc-desktop:~/work$ automake
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 for any configure output
emcc@emcc-desktop:~/work$ vi Makefile.am
emcc@emcc-desktop:~/work$ 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 for any configure output
automake: Did you forget AC_CONFIG_FILES([Makefile]) in configure.in?
emcc@emcc-desktop:~/work$ vi Makefile.am
emcc@emcc-desktop:~/work$ automake--add-missing
bash: automake--add-missing:找不到命令
emcc@emcc-desktop:~/work$ 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 for any configure output
automake: Did you forget AC_CONFIG_FILES([Makefile]) in configure.in?
emcc@emcc-desktop:~/work$ ls
autom4te.cache  autoscan.log  configure  configure.in  Makefile.am  test.c
emcc@emcc-desktop:~/work$ cd autom4te.cache/
emcc@emcc-desktop:~/work/autom4te.cache$ ls
output.0  requests  traces.0
emcc@emcc-desktop:~/work/autom4te.cache$ cd ../
emcc@emcc-desktop:~/work$ ls
autom4te.cache  autoscan.log  configure  configure.in  Makefile.am  test.c
emcc@emcc-desktop:~/work$ ls
autom4te.cache  autoscan.log  config.log  config.status  configure  configure.in  configure.scan  test.c
emcc@emcc-desktop:~/work$ ./config
bash: ./config: 没有该文件或目录
emcc@emcc-desktop:~/work$ ./configure
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
configure: creating ./config.status
config.status: error: cannot find input file: config.h.in
emcc@emcc-desktop:~/work$ make
make: *** 没有指明目标并且找不到 makefile。 停止。
emcc@emcc-desktop:~/work$

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值