■ [Ruby] 長いコマンドライン 短くする解決策としては mkmf.rbのcreate_headerを使う($defsから-D,-Uを取り除く処理は追加) Makefileで@を使ってコマンドラインを隠し、代わりにコンパイル中のファイル名を表示 という案が某所で出た。2番目はおいらの案ではあるが、Linux 2.6.xで導入されたmake V=1で切り替えられる機構が気に入っていたので前からあってもいいと思ってた。 でもV=1をどうやってるのか調べたらGNU makeに依存していて参考にならなかったり。 例えば #! /bin/sh if [ "$1" = 1 ]; then shift echo "$@" fi "$@" というrun.shを作って % echo 'all:; @sh run.sh $(V) cc -c foo.c' >Makefile % touch foo.c %