Makefile library merge with onf-make and voltha-lib-go
makefiles/
----------
o Import standalone makefile directories to checkin smaller parts of a mega patch.
o Build out directory hierarchy by topic and feature.
makefiles/lint/yaml/
--------------------
o Pull in logic evolved in repo:voltha-lib-go.
o Refactoring: support special snowflake targets by repository.
o ci-management and voltha-lib-go use distinct yamllint.conf files.
o Separate until there is time to review and consolidate.
o Added deps for on-demand local install of yamllint.
- requirements.txt could be used but every build would incur overhead.
Makefile
--------
o Use latest syntax from repo:onf-make.
o No need to set path variables, makefiles/include.mk can infer them.
o Added a help target to explicitly display targets and suggestions.
o Logic is bundled in libraries and use of 'make help' is not well known.
Change-Id: Id8eba6f914a7bfe9a31637901bd8fb78a387e0c2
diff --git a/Makefile b/Makefile
index 9857746..e1e394f 100644
--- a/Makefile
+++ b/Makefile
@@ -15,23 +15,21 @@
# limitations under the License.
# -----------------------------------------------------------------------
-# Makefile for testing JJB jobs in a virtualenv
.PHONY: help clean help test
.DEFAULT_GOAL := help
##-------------------##
##---] GLOBALS [---##
##-------------------##
-TOP ?= .
-MAKEDIR ?= $(TOP)/makefiles
##--------------------##
##---] INCLUDES [---##
##--------------------##
include config.mk
-include $(MAKEDIR)/include.mk
+include makefiles/include.mk
+ONF_MAKEDIR ?= $(error ONF_MAKEDIR= is required)
-VENV_DIR ?= venv-jjb
+# VENV_DIR ?= venv-jjb
JJB_VERSION ?= 2.8.0
# JJB_VERSION ?= 4.1.0
JOBCONFIG_DIR ?= job-configs
@@ -45,14 +43,24 @@
$(JOBCONFIG_DIR):
mkdir $@
+# -----------------------------------------------------------------------
+# Intent: Generate pipeline jobs
+# -----------------------------------------------------------------------
+build : jjb-gen
+
##-------------------##
##---] TARGETS [---##
##-------------------##
-include $(MAKEDIR)/targets/check.mk
-include $(MAKEDIR)/targets/tox.mk# # python unit testing
-include $(MAKEDIR)/targets/test.mk
+## Display make help summary late
+include $(ONF_MAKEDIR)/help/trailer.mk
-## Display make help late
-include $(ONF_MAKE)/help/trailer.mk
+# make help not widely in use yet so be explicit
+help ::
+ @echo
+ @echo 'Usage: $(MAKE) help ...'
+ @echo ' % make clean sterile'
+ @echo ' % make lint lint-jjb'
+ @echo ' % make test'
+ @echo ' % make help # show all available targes'
# [EOF]