【问题标题】:generate conditional block with automake使用 automake 生成条件块
【发布时间】:2015-06-13 13:30:30
【问题描述】:

我需要向 Makefile.am 添加什么样的黑魔法,以便生成的 Makefile 可以包含常规条件 make 语句:

ifeq ($(SOMETHING),1)
target:
    do this
else
target:
    do that
endif

请注意,我问的正是我的要求,没有变通方法或自动生成条件,我需要在最终的 makefile 中使用该条件。

【问题讨论】:

  • 也许可以试试AC_SUBST_FILE

标签: gnu-make automake


【解决方案1】:

让我们从明显的小变化开始:

target:
ifeq ($(SOMETHING),1)
    do this
else
    do that
endif

如果不这样做,请详细说明为什么在最终的 Makefile 中需要条件。否则这感觉就像一个 XY 问题。

【讨论】:

    猜你喜欢
    • 2011-05-14
    • 1970-01-01
    • 2011-03-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-18
    • 2013-01-11
    • 1970-01-01
    相关资源
    最近更新 更多