使用automake安装标头

Hri*_*nev 2 c++ automake autotools

我正在编写一个使用autotools进行编译/安装的库.我的目录树有点像这样

/src/
    file1.cpp
    file2.cpp
/include/
    dir/
        header1.hpp
        header2.hpp
        subdir/
            header.hpp
configure.ac
Makefile.am
Run Code Online (Sandbox Code Playgroud)

我想在安装头include/subdir/*$(includedir)/subdir/.我怎么做?不,递归makefile不是一种选择.递归使得被认为是有害的. http://miller.emu.id.au/pmiller/books/rmch/

Nik*_* C. 5

尝试:

subdirheadersdir = $(includedir)/subdir
subdirheaders_HEADERS = include/subdir/header.hpp
Run Code Online (Sandbox Code Playgroud)

请注意,您不能使用通配符(例如include/subdir/*.hpp).您必须列出所有文件.此外,subdirheaders只是一个示例名称.你可以使用你想要的任何东西.