diff options
| author | 2014-08-31 14:42:00 +0200 | |
|---|---|---|
| committer | 2014-08-31 14:42:00 +0200 | |
| commit | f41b5c2b4e8b69a871a4d7d00fa8df3dd3786dad (patch) | |
| tree | 52eb65060dcbd767f96d20977db8200a3017db66 | |
| parent | Merge pull request #900 from SaberUK/insp20+build-system-fixes (diff) | |
| parent | Fix unit-cc not loading configure cache when building files. (diff) | |
| download | inspircd++-f41b5c2b4e8b69a871a4d7d00fa8df3dd3786dad.tar.gz inspircd++-f41b5c2b4e8b69a871a4d7d00fa8df3dd3786dad.tar.bz2 inspircd++-f41b5c2b4e8b69a871a4d7d00fa8df3dd3786dad.zip | |
Merge pull request #910 from SaberUK/insp20+even-more-build-system-fixes
Fix unit-cc not loading configure cache when building files.
| -rwxr-xr-x | make/unit-cc.pl | 16 |
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') { |
