aboutsummaryrefslogtreecommitdiffstats
path: root/util/mkfiles.pl
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2008-01-11 11:59:37 +0000
committerAndy Polyakov <appro@openssl.org>2008-01-11 11:59:37 +0000
commit4287ade5b451c94337f4b0fe842acd96fe0b97f5 (patch)
tree3da87827ebfc02359193aa8f9e25b41adc0a4e50 /util/mkfiles.pl
parent7398053149ca6f86584baec02fd71e2e99a737f2 (diff)
downloadopenssl-4287ade5b451c94337f4b0fe842acd96fe0b97f5.tar.gz
Automate assembler support in mk1mf even further.
Diffstat (limited to 'util/mkfiles.pl')
-rwxr-xr-xutil/mkfiles.pl15
1 files changed, 13 insertions, 2 deletions
diff --git a/util/mkfiles.pl b/util/mkfiles.pl
index 55a313cdb0..823676c60b 100755
--- a/util/mkfiles.pl
+++ b/util/mkfiles.pl
@@ -67,6 +67,8 @@ my @dirs = (
"tools"
);
+%top;
+
foreach (@dirs) {
&files_dir ($_, "Makefile");
}
@@ -110,8 +112,8 @@ while (<IN>)
$o =~ s/\s+$//;
$o =~ s/\s+/ /g;
- $o =~ s/\$[({]([^)}]+)[)}]/$sym{$1}/g;
- $sym{$s}=$o;
+ $o =~ s/\$[({]([^)}]+)[)}]/$top{$1} or $sym{$1}/ge;
+ $sym{$s}=($top{$s} or $o);
}
}
@@ -121,6 +123,15 @@ foreach (sort keys %sym)
{
print "$_=$sym{$_}\n";
}
+if ($dir eq "." && defined($sym{"BUILDENV"}))
+ {
+ foreach (split(' ',$sym{"BUILDENV"}))
+ {
+ /^(.+)=/;
+ $top{$1}=$sym{$1};
+ }
+ }
+
print "RELATIVE_DIRECTORY=\n";
close (IN);