diff --git a/config/makeConfigAppInclude.pl b/config/makeConfigAppInclude.pl index f8d52a99..a1ee0750 100644 --- a/config/makeConfigAppInclude.pl +++ b/config/makeConfigAppInclude.pl @@ -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