xcodebuild コマンドでのビルドについて調べたこと 👐
try! Swift に参加中ですが消化不良でモヤモヤした感じだったので 気分転換に 気になることを調べました。🤓
概要
xcodebuild
コマンド-verbose
オプション有無の比較(事前クリーン有無によるビルド比較は こちらの記事 に分割しました)
前提
- 作成中の 自作ツール での話です。(脱線しまくりで進捗なしです 🤕)
diff
コマンドで比較すると順序の違いなども多く検出されるため目で比較しました。👀
-verbose とは
xcodebuild
コマンドは -help
を付けると print complete usage
されます。
これについては xcodebuild(1) Mac OS X Developer Tools Manual Page に記載がないのですがみなさんはとっくにご存知なのでしょうか 😑
$ xcodebuild -help
👇
細かい情報が得られることを期待しました。
-verbose provide additional status output
ビルドログ比較
-verbose
オプション付きのビルドログを出力します。
$ xcodebuild -target pancake -configuration Release -verbose > CommandBuildVerbose.txt
こちらの記事 で出力した -verbose
オプションなしのビルドログと比較しました。
- CommandBuildLog.txt
-verbose
なし
- CommandBuildLogVerbose.txt
-verbose
あり
$ diff CommandBuildLog.txt CommandBuildLogVerbose.txt > diffVerbose.txt
👇
明らかに異なる部分のみ抜粋しました。👀
< write-file /.../Pancake/build/Pancake.build/all-product-headers.yaml
なんやこれだけか… 🙄
all-product-headers.yaml
all-product-headers.yaml
は Xcode でビルドすると生成されないですね。
せっかくなので中身をのぞきました。👀
{ 'version': 0, 'case-sensitive': 'false', 'roots': [ { 'type': 'directory', 'name': "/.../Pancake/build/Release/PancakeKit.framework/Headers", 'contents': [ { 'type': 'file', 'name': "Pancake.h", 'external-contents': "/.../Pancake/Sources/PancakeKit/Pancake.h" }, { 'type': 'file', 'name': "PancakeKit-Swift.h", 'external-contents': "/.../Pancake/build/Release/PancakeKit.framework/Versions/A/Headers/PancakeKit-Swift.h" } ] }, { 'type': 'directory', 'name': "/.../Pancake/build/Release/PancakeKit.framework/Modules", 'contents': [ { 'type': 'file', 'name': "module.modulemap", 'external-contents': "/.../Pancake/build/Pancake.build/Release/PancakeKit.build/module.modulemap" } ] } ] }
おなかがすいたので今日はここまでです。 🙅
これ以降の内容は こちらの記事 に分割しました。