]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix unit-cc not loading configure cache when building files.
authorPeter Powell <petpow@saberuk.com>
Wed, 27 Aug 2014 21:01:54 +0000 (22:01 +0100)
committerPeter Powell <petpow@saberuk.com>
Wed, 27 Aug 2014 21:01:54 +0000 (22:01 +0100)
make/unit-cc.pl

index 7474365aae60cf25da23d9da52ad095a2f580d64..a494fb74b06d712a21278c5f22c91cee0e6ef139 100755 (executable)
@@ -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') {