TOP/拡張スクリプト/ビルド依存関係の追加

ビルド依存関係の追加

概要

TTVC Developer が作成する Makefile に項目を追加する例を提示します。

記述はプロジェクト設定のその他タブの拡張スクリプトで指定したスクリプトファイルに記述します。

ビルド時に文字列を表示するだけの疑似ターゲットを追加

local temp = MakeCommandEntry( "temp" );
temp.included_in_build = true;
temp.commands.append( "echo temp" );

Developer.current_structure.additional_make_commands.append( temp );

作成する実行ファイルが実行時に特定のファイルが必要な場合

作成する実行ファイルが、実行時にプロジェクト内の特定のファイルが必要な場合があります。 その場合、更新があった場合のみコピー、クリーン時には削除をするようにします。

local filename = "need_file.dat";
local target_file = Developer.current_structure.output_directory_name + "\\" + filename;
{
  local temp = MakeCommandEntry( target_file );
  temp.included_in_build = true;
  temp.depends.append( filename );
  temp.commands.append( "copy /Y $? $@" );
  Developer.current_structure.additional_make_commands.append( temp );
}
{
  local temp = MakeCommandEntry( "need_file_clean" );
  temp.included_in_clean = true;
  temp.commands.append( "del " + target_file );
  Developer.current_structure.additional_make_commands.append( temp );
}

TOP/拡張スクリプト/ビルド依存関係の追加