我尝试执行以下操作(在网站上找到)
.PHONY: coat shoes mobile sweater socks trousers shirt pants undershirt
# target prerequisite command
# ------------------------------------------------
coat: shoes mobile sweater; @echo put on $@
shoes: socks trousers; @echo put on $@
mobile: trousers; @echo put on $@
sweater: shirt; @echo put on $@
socks: ; @echo put on $@
trousers: pants shirt; @echo put on $@
shirt: undershirt; @echo put on $@
pants: ; @echo put on $@
undershirt: ; @echo put on $@
但是在 cygwin 上执行时出现循环依赖错误。这是输出
1 MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
2 Error: Circular dependency exists in makefile
3 socks -> socks
4 Error: Circular dependency exists in makefile
5 shoes -> socks
6 Error: Circular dependency exists in makefile
7 mobile -> mobile
8 Error: Circular dependency exists in makefile
9 coat -> shoes
10 Fatal: ';' does not exist - don't know how to make it
需要帮忙...