mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
Support .ifndef and !defined when doing OPTIONS checking.
This commit is contained in:
parent
074f04db2a
commit
5d94d62196
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=119087
@ -9,6 +9,7 @@
|
||||
|
||||
PORTNAME= portlint
|
||||
PORTVERSION= 2.6.8
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= # none
|
||||
DISTFILES= # none
|
||||
|
@ -2331,7 +2331,7 @@ FETCH_DEPENDS DEPENDS DEPENDS_TARGET
|
||||
# check OPTIONS
|
||||
print "OK: checking OPTIONS.\n" if ($verbose);
|
||||
@oopt = ($makevar{OPTIONS} =~ /(\w+)\s+\".*?\"\s+\w+/sg);
|
||||
@mopt = ($tmp =~ /^\s*\.\s*(?:ifdef\s+|if\s+defined\s*)\(?\s*WITH(?:OUT)?_(\w+)\s*\)?/mg);
|
||||
@mopt = ($tmp =~ /^\s*\.\s*(?:ifn?def\s+|if\s+\!?\s*defined\s*)\(?\s*WITH(?:OUT)?_(\w+)\s*\)?/mg);
|
||||
foreach my $i (@oopt) {
|
||||
if (!grep(/^$i$/, @mopt)) {
|
||||
&perror("WARN: $file: $i is listed in OPTIONS, ".
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
PORTNAME= portlint
|
||||
PORTVERSION= 2.6.8
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= # none
|
||||
DISTFILES= # none
|
||||
|
@ -2331,7 +2331,7 @@ FETCH_DEPENDS DEPENDS DEPENDS_TARGET
|
||||
# check OPTIONS
|
||||
print "OK: checking OPTIONS.\n" if ($verbose);
|
||||
@oopt = ($makevar{OPTIONS} =~ /(\w+)\s+\".*?\"\s+\w+/sg);
|
||||
@mopt = ($tmp =~ /^\s*\.\s*(?:ifdef\s+|if\s+defined\s*)\(?\s*WITH(?:OUT)?_(\w+)\s*\)?/mg);
|
||||
@mopt = ($tmp =~ /^\s*\.\s*(?:ifn?def\s+|if\s+\!?\s*defined\s*)\(?\s*WITH(?:OUT)?_(\w+)\s*\)?/mg);
|
||||
foreach my $i (@oopt) {
|
||||
if (!grep(/^$i$/, @mopt)) {
|
||||
&perror("WARN: $file: $i is listed in OPTIONS, ".
|
||||
|
Loading…
Reference in New Issue
Block a user