How can I use .NOTPARALLEL in makefile only on specific targets?

后端 未结 2 704
Happy的楠姐
Happy的楠姐 2021-01-03 05:52

I have 5 labels in Makefile:

all: label1 label2 label3 label4 last_label

I want last_label to be done last, and I want to use

2条回答
  •  天涯浪人
    2021-01-03 06:18

    Create a target specifying the four targets that can be executed in parallel & include this and last_label in the all target:

    intermediate: label1 label2 label3 label4
    
    all:
            $(MAKE) intermediate
            $(MAKE) last_label
    

    This would execute the targets specified within intermediate in parallel, but intermediate and last_label would be forced consecutively.

    (Note that the leading space before $(MAKE) is a TAB character.)

提交回复
热议问题