我在使用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'
答案 0 :(得分:6)
这不是你“逐个案例”添加的东西,因为AUTOMAKE_OPTIONS
适用于整个项目。据推测它也是未来应该使用的唯一方式,因此警告;现在它是选择加入。
您也可以使用configure.ac
在AM_INIT_AUTOMAKE
中进行设置,请参阅Autotools Mythbuster(完全披露:我是作者),了解您可以使用的全套automake选项。