我正在编写一个使用autotools进行编译/安装的库。我的目录树有点像这样
/src/
file1.cpp
file2.cpp
/include/
dir/
header1.hpp
header2.hpp
subdir/
header.hpp
configure.ac
Makefile.am
我想在include/subdir/*
的{{1}}中安装标题。我怎么做?不,递归makefile不是一种选择。递归使得被认为是有害的。
http://miller.emu.id.au/pmiller/books/rmch/
答案 0 :(得分:5)
尝试:
subdirheadersdir = $(includedir)/subdir
subdirheaders_HEADERS = include/subdir/header.hpp
请注意,您不能使用通配符(例如include/subdir/*.hpp
)。您必须列出所有文件。此外,subdirheaders
只是一个示例名称。你可以随心所欲地使用它。