0

これは簡単なことの1つであり、私はすでに解決策を探すのに多くの時間を費やしています...

makefileに変数があります

$(targets): target1.o target2.o target3.o

ここで、この変数に基づいてtarget1.d target2.d target3.dのコマンドを実行したいのですが、それを実行するincludeための正しいワンライナーコマンドは何ですか?

4

1 に答える 1

2
targets_obj := target1.o target2.o target3.o
$(targets): $(targets_obj)
-include $(targets_obj:.o=.d)
于 2012-05-17T15:24:23.330 に答える