【问题标题】:.SUFFIXES refuses to work in Automake.SUFFIXES 拒绝在 Automake 中工作
【发布时间】:2018-01-04 06:35:21
【问题描述】:

我的 Makefile.am 中有以下构造,我需要将其移植到 Automake 中使用。

.SUFFIXES: .o .c .cpp

现在我尝试使用 'automake -a --foreign' 但这给了我以下错误:

Makefile.am:73: error: use variable 'SUFFIXES', not target '.SUFFIXES'

如果我将 Makefile.am 更改为如下所示:

SUFFIXES: .o .c .cpp

然后 automake 成功运行,但是在运行 "make" 时,我得到:

 cd . && /bin/bash ./config.status Makefile 
config.status: creating Makefile
(CDPATH="${ZSH_VERSION+.}:" && cd . && )
/bin/bash: -c: line 0: syntax error near unexpected token `)'
/bin/bash: -c: line 0: `(CDPATH="${ZSH_VERSION+.}:" && cd . && )'
make: *** [config.h.in] Error 1

知道我哪里出错了吗?任何帮助将不胜感激,因为网上没有太多可做的。谢谢:)

【问题讨论】:

    标签: makefile automake


    【解决方案1】:

    您对SUFFIXES 使用了不正确的语法

    SUFFIXES = .o .c .cpp
    

    automake 可能已经知道这些后缀,所以如果没有更多上下文,很难说你是否真的需要SUFFIXES

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-11-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-12
      相关资源
      最近更新 更多