[VOL-5315] Add support for tool pre-commit and repo:onf-make
.pre-commit-config.yaml
-----------------------
o Install basic config for pre-commit tool use.
lf/transition.mk
----------------
o Legacy mode: add deps to checkout submodule
when repo:onf-make library makefiles are included.
lf/onf-make/makefiles/commands/pre-commit/
------------------------------------------
o Define convenience target 'pre-commit
o A virtualenv is installed on demand as a dependency.
o Invoke tool pre-commit.
lf/
Makefile
.gitmodules
-----------
o Add repo:onf-make as a git submodule.
o Facilitate replacing local copy & paste makefiles/ with
a refactored library equivalent.
Change-Id: Ife154010c6ff3c8f1df38c8ebbef0d3b178cb529
diff --git a/Makefile b/Makefile
index 10c2b8e..011de3c 100755
--- a/Makefile
+++ b/Makefile
@@ -19,21 +19,34 @@
.DEFAULT_GOAL := help
-TOP ?= .
-MAKEDIR ?= $(TOP)/makefiles
-
-$(if $(VERBOSE),$(eval export VERBOSE=$(VERBOSE))) # visible to include(s)
+$(if $(findstring disabled-joey,$(USER)),\
+ $(eval USE_LF_MK := 1)) # special snowflake
##--------------------##
##---] INCLUDES [---##
##--------------------##
-include $(MAKEDIR)/include.mk
-ifdef LOCAL_LINT
- include $(MAKEDIR)/lint/golang/sca.mk
-endif
+ifdef USE_LF_MK
+ include lf/include.mk
+else
+ include lf/transition.mk
+endif # ifdef USE_LF_MK
+
+
+# TOP ?= .
+# MAKEDIR ?= $(TOP)/makefiles
+#
+# $(if $(VERBOSE),$(eval export VERBOSE=$(VERBOSE))) # visible to include(s)
+
+##--------------------##
+##---] INCLUDES [---##
+##--------------------##
+# include $(MAKEDIR)/include.mk
+# ifdef LOCAL_LINT
+# include $(MAKEDIR)/lint/golang/sca.mk
+# endif
# set default shell
-SHELL = bash -e -o pipefail
+# SHELL = bash -e -o pipefail
# Variables
VERSION ?= $(shell cat ./VERSION)
@@ -225,7 +238,7 @@
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------
-clean: distclean ## Removes any local filesystem artifacts generated by a build
+clean :: distclean ## Removes any local filesystem artifacts generated by a build
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------
@@ -268,7 +281,7 @@
| awk 'BEGIN {FS=":.* ## "}; {printf "%-25s : %s\n", $$1, $$2};'
@printf '\n'
@printf ' %-33.33s %s\n' 'mod-update' \
- 'Alias for makefile targets mod-tidy + mod-vendor
+ 'Alias for makefile targets mod-tidy + mod-vendor'
@printf ' %-33.33s %s\n' 'mod-tidy' \
'Refresh packages, update go.mod and go.sum'
@printf ' %-33.33s %s\n' 'mod-vendor' \