summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-08-31 14:42:00 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-08-31 14:42:00 +0200
commitf41b5c2b4e8b69a871a4d7d00fa8df3dd3786dad (patch)
tree52eb65060dcbd767f96d20977db8200a3017db66
parent2ddee67dc28afe12b1cde61a32bcc1c403ae8185 (diff)
parent8258232b7beaf48330eb522a78fe320bb636d59b (diff)
Merge pull request #910 from SaberUK/insp20+even-more-build-system-fixes
Fix unit-cc not loading configure cache when building files.
-rwxr-xr-xmake/unit-cc.pl16
1 files changed, 16 insertions, 0 deletions
diff --git a/make/unit-cc.pl b/make/unit-cc.pl
index 7474365aa..a494fb74b 100755
--- a/make/unit-cc.pl
+++ b/make/unit-cc.pl
@@ -30,6 +30,22 @@ my $type = shift;
my $out = shift;
my $verbose = ($type =~ s/-v$//);
+## BEGIN HACK: REMOVE IN 2.2!
+sub read_config_cache {
+ my %cfg = ();
+ open(CACHE, '../.config.cache') or return %cfg;
+ while (my $line = <CACHE>) {
+ next if $line =~ /^\s*($|\#)/;
+ my ($key, $value) = ($line =~ /^(\S+)="(.*)"$/);
+ $cfg{$key} = $value;
+ }
+ close(CACHE);
+ return %cfg;
+}
+
+our %config = read_config_cache();
+## END HACK
+
if ($type eq 'gen-ld') {
do_static_find(@ARGV);
} elsif ($type eq 'static-ld') {