Changeset View
Changeset View
Standalone View
Standalone View
ports-mgmt/portlint/src/portlint.pl
Show First 20 Lines • Show All 1,644 Lines • ▼ Show 20 Lines | if ($makevar{OPTIONS_SUB}) { | ||||
# special cases for PORTDOCS/PORTEXAMPLES | # special cases for PORTDOCS/PORTEXAMPLES | ||||
push @popt, "DOCS" if $makevar{PORTDOCS}; | push @popt, "DOCS" if $makevar{PORTDOCS}; | ||||
push @popt, "EXAMPLES" if $makevar{PORTEXAMPLES}; | push @popt, "EXAMPLES" if $makevar{PORTEXAMPLES}; | ||||
# uniq(@popt) | # uniq(@popt) | ||||
my %seen = (); | my %seen = (); | ||||
@popt = grep { !$seen{$_}++ } @popt; | @popt = grep { !$seen{$_}++ } @popt; | ||||
} | } | ||||
foreach my $i (@popt) { | |||||
if ($i eq 'PORTDOCS') { | |||||
if (!grep(/^DOCS$/, @opt)) { | |||||
&perror("FATAL", $file, -1, "PORTDOCS appears in plist ". | |||||
"but DOCS is not listed in OPTIONS_DEFINE."); | |||||
} | |||||
} elsif ($i eq 'PORTEXAMPLES') { | |||||
if (!grep(/^EXAMPLES$/, @opt)) { | |||||
&perror("FATAL", $file, -1, "PORTEXAMPLES appears in plist ". | |||||
"but EXAMPLES is not listed in OPTIONS_DEFINE."); | |||||
} | |||||
} | |||||
} | |||||
foreach my $i ((@opt, @aopt)) { | foreach my $i ((@opt, @aopt)) { | ||||
# skip global options | # skip global options | ||||
next if ($i eq 'DOCS' or $i eq 'NLS' or $i eq 'EXAMPLES' or $i eq 'IPV6' or $i eq 'X11' or $i eq 'DEBUG'); | next if ($i eq 'DOCS' or $i eq 'NLS' or $i eq 'EXAMPLES' or $i eq 'IPV6' or $i eq 'X11' or $i eq 'DEBUG'); | ||||
if (!grep(/^$i$/, (@mopt, @popt))) { | if (!grep(/^$i$/, (@mopt, @popt))) { | ||||
if ($whole !~ /\n${i}_($m)(_\w+)?(.)?=[^\n]+/) { | if ($whole !~ /\n${i}_($m)(_\w+)?(.)?=[^\n]+/) { | ||||
if (!$slaveport) { | if (!$slaveport) { | ||||
&perror("WARN", $file, -1, "$i is listed in ". | &perror("WARN", $file, -1, "$i is listed in ". | ||||
"OPTIONS_DEFINE, but no PORT_OPTIONS:M$i appears."); | "OPTIONS_DEFINE, but no PORT_OPTIONS:M$i appears."); | ||||
▲ Show 20 Lines • Show All 1,916 Lines • Show Last 20 Lines |