X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=make%2Funit-cc.pl;h=a494fb74b06d712a21278c5f22c91cee0e6ef139;hb=571714e28b26cc59cbc8d27098a5ba981240ee2d;hp=7474365aae60cf25da23d9da52ad095a2f580d64;hpb=553a8da754c8cd308bad2008018849714e70f9b7;p=user%2Fhenk%2Fcode%2Finspircd.git 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 = ) { + 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') {