Makefile.am, Makefile.in&nb…
2017-06-29 10:20
309 查看
Makefile.am, Makefile.in, Makefile之间关系以及aclocal, automake,
autoconf等命令作用的探究
aclocal #产生 aclocal.m4
libtoolize --force
automake --add-missing
#根据Makefile.am生成Makefile.in
autoconf #根据configure.in
生成configure
autoheader
为了弄清楚automake等一系列命令的作用,专门搜集并阅读了一些相关资料。并通过下面一个小例子,熟悉了一下这些GNU工具的使用:
例子:在/hello/目录下创建一个hello.c文件,并编译运行它:
#cd /hello/
(1)
编写源文件hello.c:
include
int main(int argc, char** argv)
{
printf("Hello, GNU!n");
return 0;
}
(2)
#autoscan
->生成 configure.scan 和 autoscan.log
(3) 将configure.scan
修改为 configure.in:
# Process this file with autoconf to produce a configure
script.
AC_INIT(hello.c)
AM_INIT_AUTOMAKE(hello, 1.0)
# Checks for programs.
AC_PROG_CC
# Checks for library functions.
AC_OUTPUT(Makefile)
(4)
#aclocal
->生成 aclocal.m4 和 autom4te.cache
(生成aclocal.m4的过程中涉及到configure.in)
(5)
#autoconf
->生成 configure (根据 configure.in, 和 aclocal.m4)
(6)
编写Makefile.am:
AUTOMAKE_OPTIONS= foreign
bin_PROGRAMS= hello
hello_SOURCES= hello.c
(7) #automake
--add-missing
->生成 Makefile.in, depcomp,
install-sh, 和 missing (根据 Makefile.am, 和 aclocal.m4)
(8)
#./configure
->生成 Makefile, config.log, 和 config.status
autoconf等命令作用的探究
aclocal #产生 aclocal.m4
libtoolize --force
automake --add-missing
#根据Makefile.am生成Makefile.in
autoconf #根据configure.in
生成configure
autoheader
为了弄清楚automake等一系列命令的作用,专门搜集并阅读了一些相关资料。并通过下面一个小例子,熟悉了一下这些GNU工具的使用:
例子:在/hello/目录下创建一个hello.c文件,并编译运行它:
#cd /hello/
(1)
编写源文件hello.c:
include
int main(int argc, char** argv)
{
printf("Hello, GNU!n");
return 0;
}
(2)
#autoscan
->生成 configure.scan 和 autoscan.log
(3) 将configure.scan
修改为 configure.in:
# Process this file with autoconf to produce a configure
script.
AC_INIT(hello.c)
AM_INIT_AUTOMAKE(hello, 1.0)
# Checks for programs.
AC_PROG_CC
# Checks for library functions.
AC_OUTPUT(Makefile)
(4)
#aclocal
->生成 aclocal.m4 和 autom4te.cache
(生成aclocal.m4的过程中涉及到configure.in)
(5)
#autoconf
->生成 configure (根据 configure.in, 和 aclocal.m4)
(6)
编写Makefile.am:
AUTOMAKE_OPTIONS= foreign
bin_PROGRAMS= hello
hello_SOURCES= hello.c
(7) #automake
--add-missing
->生成 Makefile.in, depcomp,
install-sh, 和 missing (根据 Makefile.am, 和 aclocal.m4)
(8)
#./configure
->生成 Makefile, config.log, 和 config.status
相关文章推荐
- Lesson 39 Am I&nb…
- How to use virtual path providers to dynamically load and compile content from virtual paths in
- ASP.NET 2.0: Add build-in paging feature to repeater/为repeater添加内置分页功能
- Makefile.am和Makefile.in以及Makefile之间的关系
- Configure,Makefile.am, Makefile.in, Makefile文件之间关系
- Linux下利用makefile.am和configure.in产生可安装源码包过程整理
- Atlas Control Toolkit and Source Code for the Build-in Asp.Net 2.0 Providers
- Makefile Makefile.am Makefile.in
- Makefile makefile.am makefile.in configure
- Configure,Makefile.am, Makefile.in, Makefile文件之间关系
- 关于Makefile,Makefile.in,Makefile.am的问题
- Use Windows Authentication in ASP.NET 2.0/ASP.NET 2.0 中的 Windows 身份验证
- Use Windows Authentication in ASP.NET 2.0/ASP.NET 2.0 中的 Windows 身份验证
- ASP.NET 2.0: Add build-in paging feature to repeater/为repeater添加内置分页功能
- Configure,Makefile.am, Makefile.in, Makefile文件之间关系
- Run Tasks in an ASP.NET Application Domain
- Configure,Makefile.am, Makefile.in, Makefile文件之间关系
- Checking All CheckBoxes in a GridView
- 转Configure,Makefile.am, Makefile.in, Makefile文件之间关系
- Configure,Makefile.am, Makefile.in, Makefile文件之间关系 (转载)