@@ -50,6 +50,10 @@ sub workspace_file_name {
5050 return $_ [0]-> get_modified_workspace_name(' default' , ' .gpj' );
5151}
5252
53+ sub is_absolute_path {
54+ my $path = shift ;
55+ return ($path =~ / ^\/ .+/ || $path =~ / ^[a-zA-Z]:.+/ );
56+ }
5357
5458sub pre_workspace {
5559 my ($self , $fh ) = @_ ;
@@ -60,7 +64,11 @@ sub pre_workspace {
6064 if (defined $$prjs [0]) {
6165 my $fh = new FileHandle();
6266 my $outdir = $self -> get_outdir();
63- if (open ($fh , " $outdir /$$prjs [0]" )) {
67+ # my $fullpath = $$prjs[0];
68+ # $fullpath = "$outdir/$fullpath" unless ($fullpath =~ /^\/.+/ || $fullpath =~ /^[a-zA-Z]:.+/);
69+ my $fullpath = is_absolute_path($$prjs [0]) ? $$prjs [0] : " $outdir /$$prjs [0]" ;
70+
71+ if (open ($fh , $fullpath )) {
6472 while (<$fh >) {
6573 if (/ ^#primaryTarget=(.+)$ / ) {
6674 $tgt = $1 ;
@@ -87,13 +95,17 @@ sub pre_workspace {
8795 my $ghs_os_dir = defined $ENV {GHS_OS_DIR } ? $ENV {GHS_OS_DIR } : ' C:\ghs\int1146' ;
8896 my $ghs_bsp_name = defined $ENV {GHS_BSP_NAME } ? $ENV {GHS_BSP_NAME } : " sim800" ;
8997
98+ my $ace_root = $ENV {ACE_ROOT };
99+ my $tao_root = $ENV {TAO_ROOT };
100+
90101 # # Print out the preliminary information
91102 print $fh " #!gbuild$crlf " ,
92103 " macro __OS_DIR=$ghs_os_dir$crlf " ,
93104 " macro __BSP_NAME=$ghs_bsp_name$crlf " ,
94105 " macro __BSP_DIR=\$ {__OS_DIR}\\\$ {__BSP_NAME}$crlf " ,
95- " macro ACE_ROOT=%expand_path (.)$crlf " ,
96- " macro __BUILD_DIR=\$ {ACE_ROOT}\\ build$crlf " ,
106+ # "macro ACE_ROOT=%expand_path(.)$crlf",
107+ # "macro __BUILD_DIR=\${ACE_ROOT}\\build$crlf",
108+ " macro __BUILD_DIR=%expand_path (.)\\ build$crlf " ,
97109 " macro __LIBS_DIR_BASE=\$ {__OS_DIR}\\ libs$crlf " ,
98110 " primaryTarget=$tgt$crlf " ,
99111 " customization=\$ {__OS_DIR}\\ target\\ integrity.bod$crlf " ,
@@ -104,7 +116,9 @@ sub pre_workspace {
104116 " \t --libcxx$crlf " ,
105117 " \t :sourceDir=.$crlf " ,
106118 " \t :optionsFile=\$ {__OS_DIR}\\ target\\\$ {__BSP_NAME}.opt$crlf " ,
107- " \t -I\$ {ACE_ROOT}$crlf " ,
119+ # "\t-I\${ACE_ROOT}$crlf",
120+ " \t -I$ace_root$crlf " ,
121+ " \t -I$tao_root$crlf " ,
108122 " \t -language=cxx$crlf " ,
109123 " \t --new_style_casts$crlf " ,
110124 " \t -non_shared$crlf " ;
@@ -165,12 +179,13 @@ sub mix_settings {
165179 my $outdir = $self -> get_outdir();
166180
167181 # If the project file path is already an absolute path, use it.
168- my $fullpath ;
169- if ($project =~ / ^\/ .*/ || $project =~ / ^[a-zA-Z]:.*/ ) {
170- $fullpath = $project ;
171- } else {
172- $fullpath = " $outdir /$project " ;
173- }
182+ my $fullpath = is_absolute_path($project ) ? $project : " $outdir /$project " ;
183+
184+ # if ($project =~ /^\/.+/ || $project =~ /^[a-zA-Z]:.+/) {
185+ # $fullpath = $project;
186+ # } else {
187+ # $fullpath = "$outdir/$project";
188+ # }
174189
175190 # # Things that seem like they should be set in the project
176191 # # actually have to be set in the controlling project file.
0 commit comments