xcode-select

2つのバージョンのxcodeをインストールしてハマった。

makeファイルからxcodebuildを呼出しているのだが古いxcodeの設定で実行されていてコマンドラインからうまくコンパイル出来なかった。

xcodebuildのオプションを使うのかもしれないと、少ししらべるとxcode-selectなるコマンドを発見。

xcode-select: Report or change the path to the active
              Xcode installation for this machine.

Usage: xcode-select --print-path
           Prints the path of the active Xcode folder
   or: xcode-select --switch <xcode_path>
           Sets the path for the active Xcode folder
   or: xcode-select --version
           Prints the version of xcode-select

DP版のxcodeを使うには

xcode-select --switch /Applications/Xcode5-DP4.app/Contents/Developer

を入れれば使える。元に戻すには、

xcode-select --switch /Applications/Xcode.app/Contents/Developer

を入れれば良い。