From 254f6d6ad88ea246b7a3cbd66f0aa6f5d3ff99ff Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 30 May 2023 15:55:00 -0400 Subject: sbolint: detect use of LIBDIRSUFFIX and SLKCFLAGS on the same line. --- sbolint | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/sbolint b/sbolint index b153a20..8e0468f 100755 --- a/sbolint +++ b/sbolint @@ -1264,14 +1264,6 @@ sub check_script { if($output !~ m,\$\{OUTPUT:-(?:/tmp|(["'])/tmp\1)\},) { log_error("$file:$lineno: OUTPUT=\${OUTPUT:-/tmp} is required"); } - } elsif(/^[^#]*LIBDIRSUFFIX=/) { - $libsuf_set = $lineno; - } elsif(/^[^#]*SLKCFLAGS=/) { - $flags_set = $lineno; - } elsif(/^[^#]*\$\{?LIBDIRSUFFIX/) { - $libsuf_used = $lineno; - } elsif(/^[^#]*\$\{?SLKCFLAGS/) { - $flags_used = $lineno; } elsif(/^[^#]*\$\{?CWD\}?\/doinst\.sh(?:"|'|\s|>)/) { # 20220205 bkw: some scripts don't have a doinst.sh in the # script dir, but they create one with >> (the jack rt audio stuff @@ -1353,6 +1345,19 @@ sub check_script { if(/^\s*python3\s/) { $have_py3 = $lineno; } + + if(/^[^#]*LIBDIRSUFFIX=/) { + $libsuf_set = $lineno; + } + if(/^[^#]*SLKCFLAGS=/) { + $flags_set = $lineno; + } + if(/^[^#]*\$\{?LIBDIRSUFFIX/) { + $libsuf_used = $lineno; + } + if(/^[^#]*\$\{?SLKCFLAGS/) { + $flags_used = $lineno; + } } if(not defined($prgnam)) { -- cgit v1.2.3