[scripts] metadata.pl: fix handling of multiple conditional depends that reference...
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 23 Jun 2011 19:28:16 +0000 (19:28 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 23 Jun 2011 19:28:16 +0000 (19:28 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27267 3c298f89-4303-0410-b956-a3cf2f4a3e73

scripts/metadata.pl

index 7208e16..246520b 100755 (executable)
@@ -696,10 +696,10 @@ sub gen_package_mk() {
                                my $depstr = "\$(curdir)/$idx$suffix/compile";
                                my $depline = get_conditional_dep($condition, $depstr);
                                if ($depline) {
-                                       $deplines{$dep} = $depline;
+                                       $deplines{$depline}++;
                                }
                        }
-                       my $depline = join(" ", values %deplines);
+                       my $depline = join(" ", sort keys %deplines);
                        if ($depline) {
                                $line .= "\$(curdir)/".$pkg->{subdir}."$pkg->{src}/$type/compile += $depline\n";
                        }
@@ -756,12 +756,12 @@ sub gen_package_mk() {
                                        }
                                        $depline = get_conditional_dep($condition, $depstr);
                                        if ($depline) {
-                                               $deplines{$idx.$dep} = $depline;
+                                               $deplines{$depline}++;
                                        }
                                }
                        }
                }
-               my $depline = join(" ", values %deplines);
+               my $depline = join(" ", sort keys %deplines);
                if ($depline) {
                        $line .= "\$(curdir)/".$pkg->{subdir}."$pkg->{src}/compile += $depline\n";
                }
This page took 0.028419 seconds and 4 git commands to generate.