我正在编写一个使用 autotools 进行编译/安装的库。我的目录树有点像这样
/src/
file1.cpp
file2.cpp
/include/
dir/
header1.hpp
header2.hpp
subdir/
header.hpp
configure.ac
Makefile.am
我想在 $(includedir)/subdir/
中的 include/subdir/*
中安装 header 。我怎么做?不,递归生成文件不是一种选择。递归 Make 被认为是有害的。
http://miller.emu.id.au/pmiller/books/rmch/
最佳答案
尝试:
subdirheadersdir = $(includedir)/subdir
subdirheaders_HEADERS = include/subdir/header.hpp
请注意,您不能使用通配符(如 include/subdir/*.hpp
)。您必须列出所有文件。此外,subdirheaders
只是一个示例名称。您可以使用任何您想要的。
关于c++ - 使用 automake 安装 header ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13088672/