aboutsummaryrefslogtreecommitdiff
path: root/sbolint
diff options
context:
space:
mode:
Diffstat (limited to 'sbolint')
-rwxr-xr-xsbolint17
1 files changed, 17 insertions, 0 deletions
diff --git a/sbolint b/sbolint
index 5dbeb6d..bf6e25e 100755
--- a/sbolint
+++ b/sbolint
@@ -1174,6 +1174,7 @@ sub check_script {
my ($prgnam, $version, $build, $tag, $need_doinst, $need_douninst, $slackdesc, $makepkg, $install);
my ($cdpkg, $codestart, $lint_enabled, $print_pkg_name, $pkg_type, $arch_lineno);
my ($old_arch, $old_flags, $have_py2, $have_py3);
+ my ($libsuf_set, $flags_set, $libsuf_used, $flags_used);
$lint_enabled = 1;
for(@lines) {
@@ -1249,6 +1250,14 @@ 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
@@ -1423,6 +1432,14 @@ sub check_script {
if($have_py2 && $have_py3) {
log_note("$file: it looks like this build includes both python2 and python3 code. consider splitting it into separate python2- and python3- builds.");
}
+
+ if($flags_set && (!$flags_used)) {
+ log_warning("$file:$flags_set: SLKCFLAGS gets set, but never used.");
+ }
+
+ if($libsuf_set && (!$libsuf_used)) {
+ log_warning("$file:$libsuf_set: LIBDIRSUFFIX gets set, but never used.");
+ }
}
sub findem {