0
我想有以下規則:GNU作出不予建設目標
foo_% bar_%:
@echo "Complex building instructions for [email protected]"
all: foo_xyz bar_xyz
,然後運行「讓所有」,並得到:
Complex building instructions for foo_xyz
Complex building instructions for bar_xyz
然而,因爲「%」匹配相同的字符串兩次(xyz)它只是第一次「建立」,所以我得到的只是第一行。
當'$ @'第二次不同時,有沒有辦法讓GNU make執行'echo'兩次?畢竟,由於$ @不同,構建指令有所不同:/