Skip to content
Snippets Groups Projects
Commit 8de05941 authored by Ron Sluiter's avatar Ron Sluiter
Browse files

TOP added to macro list.

parent 6f8f3b5f
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,8 @@ $savedir = Cwd::getcwd(); ...@@ -13,6 +13,8 @@ $savedir = Cwd::getcwd();
Cwd::chdir($top); Cwd::chdir($top);
$top_abs = Cwd::getcwd(); $top_abs = Cwd::getcwd();
Cwd::chdir($savedir); Cwd::chdir($savedir);
# Add TOP to macro list.
$applications{TOP} = $top_abs;
unlink("${outfile}"); unlink("${outfile}");
open(OUT,">${outfile}") or die "$! opening ${outfile}"; open(OUT,">${outfile}") or die "$! opening ${outfile}";
...@@ -38,14 +40,16 @@ foreach $file (@files) { ...@@ -38,14 +40,16 @@ foreach $file (@files) {
#prefix = post #prefix = post
($prefix,$post) = /(.*)\s* \s*(.*)/; ($prefix,$post) = /(.*)\s* \s*(.*)/;
} }
else { else
# $base = $applications{$macro}; {
if ($macro eq "TOP") { $base = $applications{$macro};
$base = $top; if ($base eq "")
{
#print "error: $macro was not previously defined\n";
}
else
{
$post = $base . $post; $post = $base . $post;
#print "info: \$macro= $macro \$base= $base \$post= $post\n";
} else {
print "error: $macro is not TOP\n";
} }
} }
push(@files,"$post") push(@files,"$post")
...@@ -59,14 +63,14 @@ foreach $file (@files) { ...@@ -59,14 +63,14 @@ foreach $file (@files) {
# prefix = post # prefix = post
($prefix,$post) = /(.*)\s*=\s*(.*)/; ($prefix,$post) = /(.*)\s*=\s*(.*)/;
} else { } else {
if ($macro eq "TOP") { $base = $applications{$macro};
$base = $top_abs; if ($base eq "") {
#print "error: $macro was not previously defined\n";
} else {
$post = $base . $post; $post = $base . $post;
#print "info: \$macro= $macro \$base= $base \$post= $post\n";
} else {
print "error: $macro is not TOP\n";
} }
} }
$applications{$prefix} = $post;
if ( -d "$post") { #check that directory exists if ( -d "$post") { #check that directory exists
print OUT "\n"; print OUT "\n";
if ( -d "$post/bin/$arch") { #check that directory exists if ( -d "$post/bin/$arch") { #check that directory exists
......
...@@ -2,7 +2,6 @@ eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*- ...@@ -2,7 +2,6 @@ eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*-
if $running_under_some_shell; # makeIocCdCommands.pl if $running_under_some_shell; # makeIocCdCommands.pl
use Cwd; use Cwd;
use Env;
$cwd = cwd(); $cwd = cwd();
#hack for sun4 #hack for sun4
...@@ -25,6 +24,8 @@ print OUT "top = \"$top\"\n"; ...@@ -25,6 +24,8 @@ print OUT "top = \"$top\"\n";
$topbin = "${top}/bin/${arch}"; $topbin = "${top}/bin/${arch}";
#skip check that top/bin/${arch} exists; src may not have been builT #skip check that top/bin/${arch} exists; src may not have been builT
print OUT "topbin = \"$topbin\"\n"; print OUT "topbin = \"$topbin\"\n";
# Add TOP to macro list.
$applications{TOP} = $top;
@files =(); @files =();
push(@files,"$top/config/RELEASE"); push(@files,"$top/config/RELEASE");
...@@ -45,13 +46,13 @@ foreach $file (@files) { ...@@ -45,13 +46,13 @@ foreach $file (@files) {
($prefix,$post) = /(.*)\s* \s*(.*)/; ($prefix,$post) = /(.*)\s* \s*(.*)/;
} }
else { else {
if ($macro eq "TOP") { $base = $applications{$macro};
$base = $top; if ($base eq "") {
$post = $base . $post; #print "error: $macro was not previously defined\n";
#print "info: \$macro= $macro \$base= $base \$post= $post\n"; }
} else { else {
print "error: $macro is not TOP\n"; $post = $base . $post;
} }
} }
push(@files,"$post") push(@files,"$post")
} }
...@@ -64,14 +65,14 @@ foreach $file (@files) { ...@@ -64,14 +65,14 @@ foreach $file (@files) {
# prefix = post # prefix = post
($prefix,$post) = /(.*)\s*=\s*(.*)/; ($prefix,$post) = /(.*)\s*=\s*(.*)/;
} else { } else {
if ($macro eq "TOP") { $base = $applications{$macro};
$base = $top; if ($base eq "") {
$post = $base . $post; #print "error: $macro was not previously defined\n";
#print "info: \$macro= $macro \$base= $base \$post= $post\n"; } else {
} else { $post = $base . $post;
print "error: $macro is not TOP\n"; }
}
} }
$applications{$prefix} = $post;
$app = lc($prefix); $app = lc($prefix);
if ( -d "$post") { #check that directory exists if ( -d "$post") { #check that directory exists
print OUT "$app = \"$post\"\n"; print OUT "$app = \"$post\"\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment