【发布时间】:2018-01-17 23:07:06
【问题描述】:
我有以下文件夹结构:
Top folder
|-- configure.ac
|-- Makefile.am
|-- Folder1
| `-- Makefile.inc
`-- Folder2
`-- Makefile.inc
Makefile.am 应该只包含一个子 Makefile.inc,这应该根据传递给 ./configure 的标志来决定,例如:
./configure FOLDER_TO_INCLUDE=FOLDER1
这是我尝试过的:
配置.ac:
FOLDER_TO_INCLUDE=$(FOLDER_TO_INCLUDE)
AC_SUBST(FOLDER_TO_INCLUDE)
Makefile.am:
include $(srcdir)/@FOLDER_TO_INCLUDE@/Makefile.inc
然而,最终的 Makefile 并没有包含子 .inc 内容,它只包含这一行:
include $(srcdir)/Folder1/Makefile.inc
有没有办法解决这个问题?
【问题讨论】:
标签: makefile compilation autotools automake