![]() |
1
0
有两种方法可以解决这个问题,创建一个单独的自动工具构建过程,或者去掉自动工具和手工代码,或者创建一个新的工具
myprojectfoo | +-- src | +-- man | +-- messages | +-- lib | +-- include | +-- others
请看上面的插图,这是一个虚构的项目,名为
现在,根据我对你的理解: myprojectfoo | \ / +-- sXc | / \ +-- man | +-- messages | +-- lib | \ / +-- incXude | / \ +-- others
你想把枪拿出来吗
我能想到的最好办法是,你最终必须做出决定, 您要提取的项目源的子集有多大 生成文件.am , 生成文件.in ... 借用一个现有的简单Makefile模板来构建它并像这样调用它 make -f MyMakefile
SUBDIRS = src include ACLOCAL_AMFLAGS = -I m4
采集样本
AC_PREREQ(2.63) AC_INIT([mysubsetprojectfoo], [0.1a], [foo@bar.baz]) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([-Wall -Werror]) AM_GNU_GETTEXT_VERSION([0.17]) AM_GNU_GETTEXT([external]) AM_CFLAGS= # Checks for programs. AC_HEADER_STDC AC_PROG_CC AC_ARG_ENABLE([debug], [ --enable-debug Turn on debugging], [case "${enableval}" in yes) debug=true ;; no) debug=false ;; *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;; esac],[debug=false]) AM_CONDITIONAL([DEBUG], [test x$debug = xtrue]) # Checks for libraries. AC_CHECK_LIB([mylib], [mylib_function], [:]) if test "$mylib" = :; then AC_MSG_ERROR([MyLib is missing.\ This can be downloaded from 'http://www.foo.baz']) fi AC_CONFIG_HEADERS([config.h]) # Checks for header files. # FROM running 'autoscan' on the source directory AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h locale.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h syslog.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_INLINE AC_C_CONST AC_TYPE_SIGNAL AC_TYPE_PID_T AC_TYPE_UID_T AC_TYPE_SIZE_T # Checks for library functions. AC_FUNC_FORK AC_FUNC_MALLOC AC_CHECK_FUNCS([atexit inet_ntoa memset regcomp socket strdup strerror]) AC_CONFIG_FILES([Makefile src/Makefile include/Makefile]) AC_OUTPUT
|
![]() |
Mr.H. · 如何在外部文件中定义函数? 7 年前 |
![]() |
Jon Goe · 实现SeekArc时生成同步失败 7 年前 |
![]() |
Farzad J · VSTS中PowerShell脚本的打包管理器 7 年前 |
![]() |
vladfau · Maven没有在多模型项目中构建兄弟依赖关系 7 年前 |