【问题标题】:How to install a directory tree of data with automake如何使用 automake 安装数据目录树
【发布时间】:2010-09-03 13:24:44
【问题描述】:

如何使用 automake 安装 HTML 文件、样式表和图像的目录树,而不必在每个子目录中创建 Makefile?

在顶层目录中使用以下内容

htmldir = $(docdir)/foo/html
html_DATA = \
        stylesheets/foo.css \
        images/foo.jpg \
        index.html \
        about/index.html \
        faq/index.html
EXTRA_DIST = $(html_DATA)

失败,因为在调用 install 之前没有创建子目录。

【问题讨论】:

    标签: automake


    【解决方案1】:

    你可以写

    foohtmldir = $(htmldir)/foo/html
    nobase_dist_foohtml_DATA = \
        stylesheets/foo.css \
        images/foo.jpg \
        index.html \
        about/index.html \
        faq/index.html
    

    htmldir 是用户有权使用configure --htmldir=... 修改的变量,因此如果您想写入它的某个子目录,我建议使用另一个变量。 nobase_ 前缀会告诉 Automake 在安装过程中不要剥离前导目录,而 dist_ 前缀需要分发文件。

    【讨论】:

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