C/C++ プロジェクト用の build specification template (ビルドスペックテンプレート) の作成
C/C++ プロジェクト用の build specification template (ビルドスペックテンプレート) を作成するには:
--variable (-V) オプションと --output (-o) オプションを使用してビルドコマンドで kwinject を実行します。
kwinject --variable <variable>=<string> --output <file>.tpl <build-command>
フィールド
- <variable> は、文字で始まり、英数字とアンダースコア文字を含む固有の文字列である必要があります。
- <string> はディレクトリパスです。
- 出力ファイルには拡張子
.tpl
が必要です。 - <build-command> は make などのビルドコマンドです。
たとえば、次のようになります。
kwinject -V SRCROOT=/builds/nightly/foosystem -o buildspec.tpl make
この例では、/builds/nightly/foosystem
は build specification template (ビルドスペックテンプレート) ですべて %(SRCROOT) に置換されます。
出力 build specification template (ビルドスペックテンプレート) からのコンパイル行の例:
compile;%(SRCROOT);/usr/bin/cc|c;%(SRCROOT)/obj/src.o;src/src.c.c;-Iinclude
build specification template (ビルドスペックテンプレート) の使用方法については、次のリンクのいずれかを選択してください。