forcing order of prerequisites in Makefiles

前端 未结 2 1278
走了就别回头了
走了就别回头了 2021-01-04 06:23

I have a third party makefile, and I\'d like one of the targets (T1) to not be built until another, custom target (T2) is built first. Normally, this would be accomplished

2条回答
  •  天命终不由人
    2021-01-04 06:49

    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 $^
    

提交回复
热议问题