[VOL-5051] - Triage bbsim build

[VOL-5092] - verify_bbsim_unit-test repository failures in jenkins job history.

makefiles/*
-----------
  o Merge in latest library makefiles.
  o Some legacy retained:
      tools.mk => makefiles/docker/include.mk
      makefiles/lint/docker/*.mk (replace with docker/include.mk.new)

Makefile
--------
  o Remove bogus foobar target.
  o Target docs-lint now maps to library target lint-doc8.

docs/Makefile
-------------
  o venv install now handled by makefiles/virtualenv.mk
  o Replaced inlined doc8 lint target with makefiles/lint/doc8 (lint-doc8)
  o Use std defines for SHELL= and other constants.
  o Replace separator ';' with '&&' in commands using venv (detect errors).

config.mk
---------
  o Enable lint targets for doc8, docker & json.
  o More lint checks can be enabled but cleanup is needed first.

docs/Makefile
requirements.txt
----------------
  o Identified a few python module problems documented in VOL-5092.
  o Makefile wild target(%) matching stray dependencies so hardcode sphinx targets to act on.
  o Added hyphen/success to "make docs" until VOL-5092 can be straightened out.

Change-Id: Ibe4006747ee610bfe8ac0fdbb339e5e18e6e9176
diff --git a/makefiles/lint/shell.mk b/makefiles/lint/shell.mk
index da92921..704038c 100644
--- a/makefiles/lint/shell.mk
+++ b/makefiles/lint/shell.mk
@@ -1,6 +1,6 @@
 # -*- makefile -*-
 # -----------------------------------------------------------------------
-# Copyright 2017-2022 Open Networking Foundation
+# Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,20 +14,52 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 # -----------------------------------------------------------------------
+# https://gerrit.opencord.org/plugins/gitiles/onf-make
+# ONF.makefile.version = 1.0
+# -----------------------------------------------------------------------
 
-JSON_FILES ?= $(error JSON_FILES= is required)
+##-------------------##
+##---]  GLOBALS  [---##
+##-------------------##
 
-.PHONY: lint-shell
+# Gather sources to check
+# TODO: implement deps, only check modified files
+shell-check-find := find .
+# vendor scripts but they really should be lintable
+shell-check-find += -name 'vendor' -prune
+shell-check-find += -o \( -name '*.sh' \)
+shell-check-find += -type f -print0
 
-lint : lint-shell
+# shell-check    := $(env-clean) pylint
+shell-check      := shellcheck
 
+shell-check-args += --check-sourced
+shell-check-args += --external-sources
+
+##-------------------##
+##---]  TARGETS  [---##
+##-------------------##
+ifndef NO-LINT-SHELL
+  lint : lint-shell
+endif
+
+## -----------------------------------------------------------------------
+## Intent: Perform a lint check on command line script sources
+## -----------------------------------------------------------------------
 lint-shell:
-	shellcheck --version
-	find . \( -name 'staging' -o -name 'vst_venv' \) -prune \
-	    -o -name '*.sh' ! -name 'activate.sh' -print0 \
-	| xargs -0 -n1 shellcheck
+	$(shell-check) -V
+	@echo
+	$(HIDE)$(env-clean) $(shell-check-find) \
+	    | $(xargs-n1) $(shell-check) $(shell-check-args)
 
-help::
-	@echo "  lint-shell           Syntax check bash,bourne,etc sources"
+## -----------------------------------------------------------------------
+## Intent: Display command help
+## -----------------------------------------------------------------------
+help-summary ::
+	@echo '  lint-shell          Syntax check shell sources'
+
+# [SEE ALSO]
+# -----------------------------------------------------------------------
+#   o https://www.shellcheck.net/wiki/Directive
 
 # [EOF]