【问题标题】:automake subdir-objects is disabled自动制作子目录对象被禁用
【发布时间】:2016-12-07 22:16:19
【问题描述】:

我在使用 automake 时遇到以下错误。我知道您可以将 AUTOMAKE_OPTIONS = subdir-objects" 放在 Makefile.am 的顶部。但是如何为所有文件设置此行为,所以我不需要逐个进行?

Makefile.am:454: warning: source file 'libs/esl/src/esl_threadmutex.c' is in a subdirectory,
          Makefile.am:454: but option 'subdir-objects' is disabled
          Makefile.am:454: warning: source file 'libs/esl/ivrd.c' is in a subdirectory,
          Makefile.am:454: but option 'subdir-objects' is disabled
          Makefile.am:454: warning: source file 'libs/esl/src/esl_json.c' is in a subdirectory,
          Makefile.am:454: but option 'subdir-objects' is disabled
          Makefile.am:454: warning: source file 'libs/esl/src/esl_buffer.c' is in a subdirectory,
          Makefile.am:454: but option 'subdir-objects' is disabled
          tests/unit/unit.mk:6: warning: source file 'tests/unit/switch_event.c' is in a subdirectory,
          tests/unit/unit.mk:6: but option 'subdir-objects' is disabled
          Makefile.am:854:   'tests/unit/unit.mk' included from here
          tests/unit/unit.mk:13: warning: source file 'tests/unit/switch_hash.c' is in a subdirectory,
          tests/unit/unit.mk:13: but option 'subdir-objects' is disabled
          Makefile.am:854:   'tests/unit/unit.mk' included from here
          Makefile.am:441: warning: source file 'src/tone2wav.c' is in a subdirectory,
          Makefile.am:441: but option 'subdir-objects' is disabled
          Makefile.am: installing 'build/config/depcomp'

【问题讨论】:

    标签: linux gnu-make automake


    【解决方案1】:

    这不是您“逐案”添加的内容,因为AUTOMAKE_OPTIONS 适用于整个项目。它也被认为是将来应该使用的唯一方法,因此是警告;现在它是可选的。

    您也可以在configure.acAM_INIT_AUTOMAKE 中设置它,请参阅Autotools Mythbuster(完全披露:我是作者),了解您可以使用的全套自动制作选项。

    【讨论】:

    • 当我说逐个案例时,我的意思是每个项目而不是单个文件/文件夹。我正在寻找在 automake 配置中通用的选项。不更新每个项目configue.ac。谢谢
    • 那就没有了。没有 automake config 这样的东西。
    猜你喜欢
    • 1970-01-01
    • 2016-08-03
    • 2014-02-06
    • 2018-02-13
    • 2016-03-24
    • 1970-01-01
    • 2017-08-28
    • 1970-01-01
    相关资源
    最近更新 更多