Order of processing components in makefile

前端 未结 4 1944
死守一世寂寞
死守一世寂寞 2020-12-09 01:17

In a makefile, the dependency line is of the form -

abc: x y z

All three of the components (x,y,z) are themselves targets in dependency lin

4条回答
  •  佛祖请我去吃肉
    2020-12-09 01:37

    You really shouldn't depend on the order in which they are executed - all else being equal, all three recipes for those prerequisites could run in parallel.

    The only hard rule is that all prerequisites must be met before the target recipe is run.

    If there are no dependencies between x, y and z, and no parallel execution, GNU make appears to run them in the order you specified them, but this is not guaranteed in the docs.

提交回复
热议问题