forcing order of prerequisites in Makefiles

依然范特西╮ 提交于 2019-11-30 17:31:00

Have T2 as an order-only prerequisite:

T1: x y z | T2
    $(MAKE) -j $^;
    # Make will run the T2 rule before this one, but T2 will not appear in $^

Could you just call Make in your build script with the two targets in the proper order, e.g.

make T2 T1

That way you don't need to make any modifications to T1.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!