From 1b24ce1620ab60192b86eaff5f64df9a13cd2cad Mon Sep 17 00:00:00 2001 From: "Janet B. Anderson" Date: Mon, 22 Oct 2001 19:32:27 +0000 Subject: [PATCH] Expand macros after all RELEASE files are read. --- configure/tools/convertRelease.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/configure/tools/convertRelease.pl b/configure/tools/convertRelease.pl index c21975497..c0d582d07 100755 --- a/configure/tools/convertRelease.pl +++ b/configure/tools/convertRelease.pl @@ -60,6 +60,8 @@ if ($hostarch) { $relfile .= ".$hostarch"; &readRelease($relfile, \%macros, \@apps) if (-r $relfile); } +&expandRelease(\%macros, \@apps); + # This is a perl switch statement: for ($outfile) { @@ -106,7 +108,10 @@ sub readRelease { &readRelease($path, $Rmacros, $Rapps) if (-r $path); } close IN; - +} + +sub expandRelease { + my ($Rmacros, $Rapps) = @_; # Expand any (possibly nested) macros that were defined after use while (($macro, $path) = each %$Rmacros) { while (($pre,$var,$post) = $path =~ /(.*)\$\((\w+)\)(.*)/) { @@ -197,7 +202,6 @@ sub cdCommands { } close OUT; } - sub checkRelease { $status = 0; delete $macros{TOP}; @@ -212,6 +216,7 @@ sub checkRelease { $relfile .= ".$hostarch"; &readRelease($relfile, \%check, \@order) if (-r $relfile); } + &expandRelease(\%check, \@order); delete $check{TOP}; while (($parent, $ppath) = each %check) {