I have e perl script that executes another script from another folder. the executed script contains compilation commands on gcc. the problem is that the paths that are given to gcc are relative to the second (the executed script) path not to the first script. How can I solve this?
FIRST SCRIPT (perl script)
Code:
my $status = system("../fsl_serializer_parser/external/generate2.bat");
if (($status >>=8) != 0)
{
die "Failed to generate pp1.txt";
}
SECOND SCRIPT (generate2.bat)
Code:
D:\users\b12573\Work\bld_3c_0015\ptfw_repos\collaterals\fsl_serializer_parser\external>type generate2.bat
gcc -I..\..\..\interface -I..\..\..\interface\framework -I..\..\..\interface\modules -I..\..\..\eab_h223\include -I..\..
\..\eab_video_ti\include -I..\..\..\eab_video_it\include -I..\..\..\eab_ecan\include -I..\..\..\fsl_ss7\include -E -P ..
\..\..\interface\sdf_comp_types.h > pp1.txt
Hope I made myself understood.
Please help!