使用automake安装标头

时间:2012-10-26 14:18:09

标签: c++ autotools automake

我正在编写一个使用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/

1 个答案:

答案 0 :(得分:5)

尝试:

subdirheadersdir = $(includedir)/subdir
subdirheaders_HEADERS = include/subdir/header.hpp

请注意,您不能使用通配符(例如include/subdir/*.hpp)。您必须列出所有文件。此外,subdirheaders只是一个示例名称。你可以随心所欲地使用它。

相关问题