Add TOP to macro list.

This commit is contained in:
Ron Sluiter
2002-01-28 19:46:02 +00:00
parent d79fcdf09a
commit 65cd23a13a
+16 -12
View File
@@ -13,6 +13,8 @@ $savedir = Cwd::getcwd();
Cwd::chdir($top);
$top_abs = Cwd::getcwd();
Cwd::chdir($savedir);
# Add TOP to macro list.
$applications{TOP} = $top_abs;
unlink("${outfile}");
open(OUT,">${outfile}") or die "$! opening ${outfile}";
@@ -38,14 +40,16 @@ foreach $file (@files) {
#prefix = post
($prefix,$post) = /(.*)\s* \s*(.*)/;
}
else {
# $base = $applications{$macro};
if ($macro eq "TOP") {
$base = $top;
else
{
$base = $applications{$macro};
if ($base eq "")
{
#print "error: $macro was not previously defined\n";
}
else
{
$post = $base . $post;
#print "info: \$macro= $macro \$base= $base \$post= $post\n";
} else {
print "error: $macro is not TOP\n";
}
}
push(@files,"$post")
@@ -59,14 +63,14 @@ foreach $file (@files) {
# prefix = post
($prefix,$post) = /(.*)\s*=\s*(.*)/;
} else {
if ($macro eq "TOP") {
$base = $top_abs;
$base = $applications{$macro};
if ($base eq "") {
#print "error: $macro was not previously defined\n";
} else {
$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
print OUT "\n";
if ( -d "$post/bin/$arch") { #check that directory exists