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.
次のルールを定義しました。
$(OUTDIR)/%_sorted.bam: $(eval SAMPLE:=$(subst _sorted,,$(notdir $(basename $@)))) (...) do something with $(SAMPLE)
安全に使用できますか (= ルールの「ローカル変数」ですか?)
make -j (number of jobs)
または変数 $(SAMPLE) は、ルールの(同時の)呼び出しごとに置き換えられますか?
はい、できます。GNU make は、実行前にレシピ全体を展開します。ジョブ サーバー モードは、make によって生成されたサブプロセスの実行にのみ影響し、それ以外はすべてシングル スレッドです。