Makefile
$ sudo apt-get install make
使用make命令测试
autoconf
$ sudo apt-get install autoconf
automake
$ sudo apt-get install automake
example
过程 25.1. autoconf and automake step by step
-
create directory
% mkdir devel % cd devel % mkdir hello % cd hello
create a file
vim hello.c #include int main(int argc, char** argv) { printf(``Hello, GNU!\n''); return 0; }
-
autoscan
neo@debian:~/workspace/devel/hello$ autoscan neo@debian:~/workspace/devel/hello$ ls autoscan.log configure.scan hello.c
-
configure.in
cp configure.scan configure.in neo@debian:~/workspace/devel/hello$ aclocal neo@debian:~/workspace/devel/hello$ autoconf neo@debian:~/workspace/devel/hello$ ls autom4te.cache autoscan.log configure configure.in configure.scan hello.c
-
Makefile.am
neo@debian:~/workspace/devel/hello$ vim Makefile.am neo@debian:~/workspace/devel/hello$ cat Makefile.am AUTOMAKE_OPTIONS= foreign bin_PROGRAMS= hello hello_SOURCES= hello.c neo@debian:~/workspace/devel/hello$
$ 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?
原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。