function [buildHookEnvVars, buildHookPathPrepends] = buildHooksAfterCodeGen...
(handles, lAnchorDir, lBuildFolder,...
buildInfo, lBuildInfoInstr, lTemplateMakefile, ...
lInstrumentedObjectCodeFolder, ...
lInstrumentedObjectCodeFolderShared, ...
lCodeGenerationId)
%

% Copyright 2013-2018 The MathWorks, Inc.

if ~isempty(handles)

lBuildFolderInstr = fullfile(lBuildFolder, lInstrumentedObjectCodeFolder);

% Folder that build hook must execute from
lExecuteFromFolder = lBuildFolder;

coder.coverage.BuildHook.initializeHookData...
(handles, lAnchorDir, ...
lBuildFolderInstr,...
lInstrumentedObjectCodeFolder, ...
lInstrumentedObjectCodeFolderShared, ...
buildInfo, lBuildInfoInstr,...
lBuildFolder);

[buildHookEnvVars, buildHookPathPrepends] = ...
coder.coverage.BuildHook.dispatch_after_code_generation...
(handles, lExecuteFromFolder, lTemplateMakefile, lCodeGenerationId);
else
buildHookEnvVars = {};
buildHookPathPrepends = {};
end