automake 用法

来源:互联网 发布:win10下装mac os双系统 编辑:程序博客网 时间:2024/05/19 04:29

今天下载了一个开源项目,编译后发现除了src文件夹以外还有很多文件研究了一下

结论是可以用automake之类的东西来自动管理很是方便,总的说来主要是要编写Makefile.am文件


现在总结如下:

先建立helloWorld.c,不用多说了吧,然后就可以使用auto系列工具了

1.autoscan
2.修改configure.scan 为 configure.in
增加AM_INIT_AUTOMAKE(helloWorld, 1.0)
AC_OUTPUT(Makefile)
3.aclocal
4.autoconf
5.编写Makefile.am
AUTOMAKE_OPTIONS= foreign
bin_PROGRAMS= helloWorld
helloWorld_SOURCES= helloWorld.c
6.automake
7.autoheader
7.automake --add-missing
8.运行./configure
9.make

万能的autoreconf 一步步的执行auto系列是不是非常繁琐,只要保证configure.ac 和Makefile.am正确只需要执行下面的命令

autoreconf -v --install

就万事大吉了

另外新学习到一条有用的命令删除当前文件夹下制定的文件名之外的所有文件

方法一:

rm -rf  `ls -I helloWorld.c`

方法二:

rm -rf  `ls | egrep -v '(helloWorld.c|Makefile.am)'`



--launcher.GTK_version
2
--launcher.appendVmargs
-vm
/opt/jdk1.8.0_25/bin/java
-vmargs

0 0
原创粉丝点击