| 新建helloworld目录,里边有一个源码文件helloworld.c。 $ autoscan |
新生成的文件configure.scan改名为configure.in,并编辑修改内容,去掉无关的语句:
| ===================configure.in内容开始============= # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_INIT(helloworld.c) AM_INIT_AUTOMAKE(helloworld, 1.0) # Checks for programs. AC_PROG_CC # Checks for libraries. # Checks for header files. # Checks for typedefs, structures, and compiler characteristics. # Checks for library functions. AC_OUTPUT(Makefile) =====================configure.in内容结束====== |

本文详细介绍了如何一步步构建一个自动化构建过程,从创建helloworld目录和源代码开始,通过$autoscan、$aclocal、$autoconf等命令生成configure和aclocal.m4文件。接着,创建Makefile.am文件并使用automake生成Makefile.in,最终通过运行configure和make命令完成代码的编译和运行。这一过程涉及到软件配置管理的重要工具,如autoconf、automake和m4。
最低0.47元/天 解锁文章
2511

被折叠的 条评论
为什么被折叠?



