@@ -50,6 +50,10 @@ sub workspace_file_name {
50
50
return $_ [0]-> get_modified_workspace_name(' default' , ' .gpj' );
51
51
}
52
52
53
+ sub is_absolute_path {
54
+ my $path = shift ;
55
+ return ($path =~ / ^\/ .+/ || $path =~ / ^[a-zA-Z]:.+/ );
56
+ }
53
57
54
58
sub pre_workspace {
55
59
my ($self , $fh ) = @_ ;
@@ -60,7 +64,11 @@ sub pre_workspace {
60
64
if (defined $$prjs [0]) {
61
65
my $fh = new FileHandle();
62
66
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 )) {
64
72
while (<$fh >) {
65
73
if (/ ^#primaryTarget=(.+)$ / ) {
66
74
$tgt = $1 ;
@@ -87,13 +95,17 @@ sub pre_workspace {
87
95
my $ghs_os_dir = defined $ENV {GHS_OS_DIR } ? $ENV {GHS_OS_DIR } : ' C:\ghs\int1146' ;
88
96
my $ghs_bsp_name = defined $ENV {GHS_BSP_NAME } ? $ENV {GHS_BSP_NAME } : " sim800" ;
89
97
98
+ my $ace_root = $ENV {ACE_ROOT };
99
+ my $tao_root = $ENV {TAO_ROOT };
100
+
90
101
# # Print out the preliminary information
91
102
print $fh " #!gbuild$crlf " ,
92
103
" macro __OS_DIR=$ghs_os_dir$crlf " ,
93
104
" macro __BSP_NAME=$ghs_bsp_name$crlf " ,
94
105
" 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 " ,
97
109
" macro __LIBS_DIR_BASE=\$ {__OS_DIR}\\ libs$crlf " ,
98
110
" primaryTarget=$tgt$crlf " ,
99
111
" customization=\$ {__OS_DIR}\\ target\\ integrity.bod$crlf " ,
@@ -104,7 +116,9 @@ sub pre_workspace {
104
116
" \t --libcxx$crlf " ,
105
117
" \t :sourceDir=.$crlf " ,
106
118
" \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 " ,
108
122
" \t -language=cxx$crlf " ,
109
123
" \t --new_style_casts$crlf " ,
110
124
" \t -non_shared$crlf " ;
@@ -165,12 +179,13 @@ sub mix_settings {
165
179
my $outdir = $self -> get_outdir();
166
180
167
181
# 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
+ # }
174
189
175
190
# # Things that seem like they should be set in the project
176
191
# # actually have to be set in the controlling project file.
0 commit comments