2014-03-13 30 views
1

我有一個makefile是3rdParty依賴項構建器,所以它實際上只是去各種其他目錄和運行cmake /使用各種標誌,以確保我的項目的所有15-20依賴項編譯我需要的方式。更改Gnu Make -j行爲讓自己忽略,但傳遞?

大廈平行會在這裏真的幫助下,(編譯時間約2小時連續),但我需要一個「讓-jN」不運行的makefile平行的頂層,而不是運行串行(不同的3rdParty庫有內部依賴會見)並將arg傳遞給內部makefile。

有沒有辦法得到這種行爲?

回答

2

使用.NOTPARALLEL僞目標;從文檔:

`.NOTPARALLEL」

If `.NOTPARALLEL' is mentioned as a target, then this invocation of 
`make' will be run serially, even if the `-j' option is given. 
Any recursively invoked `make' command will still be run in 
parallel (unless its makefile contains this target). Any 
prerequisites on this target are ignored. 
+0

這就是我一直在尋找,謝謝! – Yeraze