【问题标题】:How to have automake install headers file in a subdirectory of include如何在include的子目录中安装automake头文件
【发布时间】:2012-10-30 00:10:53
【问题描述】:

我当前的项目在其include/tatoparser 目录中有几个文件,我想将它们与我的库一起分发。

qdii@nomada ~/MyProject $ ls include/tatoparser/
dataset.h  interface_lib.h  linkset.h  sentence.h  tagset.h

我创建了一个引用这些文件的Makefile.am

qdii@nomada ~/MyProject $ cat include/Makefile.am 
include_HEADERS = tatoparser/interface_lib.h tatoparser/sentence.h tatoparser/dataset.h tatoparser/tagset.h tatoparser/linkset.h

但是当我运行make install 时,引用的文件会被复制到/usr/include(或任何$(includedir) 设置为),我希望它们被复制到/usr/include/tatoparser

我该怎么做?

【问题讨论】:

标签: makefile autotools autoconf libtool


【解决方案1】:

使用 nobase 前缀阻止 Automake 从文件中剥离子目录路径:

nobase_include_HEADERS = tatoparser/interface_lib.h tatoparser/...

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-02-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-09
    • 1970-01-01
    相关资源
    最近更新 更多