[kernel] workaround a gcc-4.1 bug which cannot see that word will be initialized
[openwrt.git] / scripts / feeds
index 4b53fd1..e51b17c 100755 (executable)
@@ -15,6 +15,14 @@ my $mk=`which gmake`;        # select the right 'make' program
 chomp($mk);            # trim trailing newline
 $mk or $mk = "make";   # default to 'make'
 
+# check version of make
+my @mkver = split /\s+/, `$mk -v`, 4;
+my $valid_mk = 1;
+$mkver[0] =~ /^GNU/ or $valid_mk = 0;
+$mkver[1] =~ /^Make/ or $valid_mk = 0;
+$mkver[2] >= "3.81" or $valid_mk = 0;
+$valid_mk or die "Unsupported version of make found: $mk\n";
+
 my @feeds;
 my %build_packages;
 my %installed;
@@ -72,7 +80,7 @@ sub update_location($$)
                return $old_url ? 1 : 0;
        }
 
-       return 0;       
+       return 0;
 }
 
 sub update_index($)
@@ -319,10 +327,11 @@ sub install_package {
 
        # install all dependencies
        foreach my $vpkg (@{$srcpackage{$src}}, $pkg) {
-               foreach my $dep (@{$vpkg->{depends}}, @{$vpkg->{builddepends}}) {
+               foreach my $dep (@{$vpkg->{depends}}, @{$vpkg->{builddepends}}, @{$vpkg->{"builddepends/host"}}) {
                        next if $dep =~ /@/;
                        $dep =~ s/^\+//;
                        $dep =~ s/^.+://;
+                       $dep =~ s/\/.+$//;
                        next unless $dep;
                        install_package($feed, $dep) == 0 or $ret = 1;
                }
@@ -338,7 +347,7 @@ sub refresh_config {
        system("rm -f tmp/.packageinfo");
 
        # refresh the config
-       if ($default) { 
+       if ($default) {
                system("$mk oldconfig CONFDEFAULT=\"$default\" Config.in >/dev/null 2>/dev/null");
        } else {
                system("$mk defconfig Config.in >/dev/null 2>/dev/null");
This page took 0.022021 seconds and 4 git commands to generate.