Support .ifndef and !defined when doing OPTIONS checking.

This commit is contained in:
Joe Marcus Clarke 2004-10-12 19:40:05 +00:00
parent 074f04db2a
commit 5d94d62196
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=119087
4 changed files with 4 additions and 2 deletions

View file

@ -9,6 +9,7 @@
PORTNAME= portlint
PORTVERSION= 2.6.8
PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= # none
DISTFILES= # none

View file

@ -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, ".

View file

@ -9,6 +9,7 @@
PORTNAME= portlint
PORTVERSION= 2.6.8
PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= # none
DISTFILES= # none

View file

@ -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, ".