What's the difference between := and = in Makefile?

前端 未结 4 1578
既然无缘
既然无缘 2021-01-30 02:23

For variable assignment in Make, I see := and = operator. What\'s the difference between them?

4条回答
  •  自闭症患者
    2021-01-30 02:50

    This is described in the GNU Make documentation, in the section titled 6.2 The Two Flavors of Variables .

    In short, variables defined with := are expanded once, but variables defined with = are expanded whenever they are used.

提交回复
热议问题