【发布时间】:2021-11-01 20:54:13
【问题描述】:
在我的 Automake 项目中,我有一定数量的子包,我想根据配置时间选项在其中切换。根据 Automake 文档,这是可能的:https://www.gnu.org/software/automake/manual/html_node/Subdirectories-with-AC_005fSUBST.html
所以我正在做以下事情:
# configure.ac
if test_condition_1 ; then
SUBDIR_TO_BUILD=dir1
elif test_condition_2 ; then
SUBDIR_TO_BUILD=dir2
else
SUBDIR_TO_BUILD=dir3
fi
AC_SUBST(SUBDIR_TO_BUILD)
...
# Makefile.am
SUBDIR_TO_BUILD=@SUBDIR_TO_BUILD@
SUBDIRS=$(SUBDIR_TO_BUILD)
DIST_SUBDIRS=dir1 dir2 dir3
...
但是,如果我尝试运行 autoreconf,我会收到以下错误:
Makefile.am:4: error: required directory $(SUBDIR_TO_BUILD) does not exist
【问题讨论】: