From 63c268fa5f9eff44ab5b0d23a2f0353634726512 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 30 May 2011 12:22:14 -0700 Subject: [PATCH] build: filter out fuse stuff except on Linux. --- build.pl | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/build.pl b/build.pl index 409f269bb..f0c420279 100755 --- a/build.pl +++ b/build.pl @@ -98,7 +98,9 @@ if ($target eq "clean") { } if ($target eq "allfast") { - foreach my $target (sort grep { !$targets{$_}{tags}{not_in_all} } keys %targets) { + my @targets = sort grep { !$targets{$_}{tags}{not_in_all} } keys %targets; + @targets = filter_os_targets(@targets); + foreach my $target (@targets) { build($target); } record_go_version(); @@ -106,7 +108,8 @@ if ($target eq "allfast") { } if ($target eq "all") { - foreach my $target (sort keys %targets) { + my @targets = filter_os_targets(sort keys %targets); + foreach my $target (@targets) { build($target); } record_go_version(); @@ -418,12 +421,26 @@ sub record_go_version { close($fh); } +sub filter_os_targets { + my @targets = @_; + my @out; + my $is_linux = (`uname` =~ /linux/i); + foreach my $t (@targets) { + if ($targets{$t}{tags}{only_os_linux} && !$is_linux) { + next; + } + push @out, $t; + } + return @out; +} + __DATA__ TARGET: clients/go/camdbinit TARGET: clients/go/camget TARGET: clients/go/camput TARGET: clients/go/cammount + =only_os_linux TARGET: clients/go/camsync TARGET: lib/go/camli/auth TARGET: lib/go/camli/blobref @@ -455,6 +472,7 @@ TARGET: lib/go/camli/test TARGET: lib/go/camli/test/asserts TARGET: lib/go/camli/third_party/github.com/hanwen/go-fuse/fuse =skip_tests + =only_os_linux TARGET: lib/go/camli/third_party/github.com/Philio/GoMySQL =skip_tests TARGET: lib/go/camli/webserver