Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ifndef CC CC := icc endif override CC := $(CC)
次に、の結果
make
ですCC=cc。make CC=gccは正しい。
CC=cc
make CC=gcc
その後に変更ifndefすると、すべて正常に動作します。ifdefCC=icc
ifndef
ifdef
CC=icc
それはどのように機能しますか?
CCがデフォルトで定義されています。Somakeは と同等make CC=ccです。
CC
make CC=cc
条件を完全にスキップして、必要な動作を得ることができます。
override CC := icc