2009年3月16日星期一

auto

进入你要的原代码
1.#autoscan
它会生成autoscan.log configure.scan 这俩个文件
2.#mv configure.scan configure.in
3.在项目下面创建Makefile.am在它的子目录下面也建立Makefile.am
4.在项目下面创建NEWS,README,ChangeLog,AUTHORS
5.将/usr/share/automake-1.X/目录下的depcomp和complie文件拷贝到本目录下
6.#aclocal 运行之后就会多出autom4te.cache 这个文件
7.#autoconf 运行之后就会多出configure这个文件
8.运行#automake -a之后会出现下面的
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).
解决的办法在configure.in文件中添加AM_INIT_AUTOMAKE宏,用autoheador解决剩下的问题,还不行再次运行aclocal然后就可以用automake -a了。
9.运行./configure
这样也许还是没有Makefile文件
有的时候连我们自己也不知道为什么会是这样的,然后我就把autoheader和autoconf还有automake -a再次运行了一遍,没有任何的问题了。这里是成功的。
问题又来了,make之后
[gaowei@localhost xhttpy]$ make
cd . && /bin/sh /home/gaowei/cuinx/linux/xhttpy/missing --run autoheader
rm -f stamp-h1
touch config.h.in
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make all-am
make[1]: Entering directory `/home/gaowei/cuinx/linux/xhttpy'
gcc -g -O2 -o xiyouhttpd
gcc: 没有输入文件
make[1]: *** [xiyouhttpd] 错误 1
make[1]: Leaving directory `/home/gaowei/cuinx/linux/xhttpy'
make: *** [all] 错误 2
[gaowei@localhost xhttpy]$ ls
等等解决中!
多看书,多实践!
这本书不错http://sources.redhat.com/autobook/autobook/autobook_toc.html#SEC_Contents
准备一天浏览完!下一篇就是这本的内容了!似乎有点难度,就不发表了!
上次,还学到了这么一个命令strip - Discard symbols from object files.今天再次回顾到!

没有评论:

time