[VOL-5285] - JJB Upgrade toward v5
makefiles/include.mk
--------------------
o Define new lib var sandbox-root= pointing at the build directory.
o Added a comment section at the bottom to document declared vars.
makefiles/virtualenv/requirements-txt.mk
----------------------------------------
o Rework pip -r requirements.txt logic to be dependency driven.
o pip install will be run when requirements.txt is modified.
makefiles/virtualenv/include.mk
-------------------------------
o Populate venv-abs-path= with sandbox-root= to insulate against
$(PWD) path changes.
o Split logic into separate makefiles so include.mk remains small.
o Rework dependencies to leverage the new requirements-txt.mk logic.
Misc
----
o Rework help help-* targets to not display everything, all the time.
o make help : display venv (primary target).
o make venv-help : display exteneded help, venv targets and flags.
[HOWTO: test]
% git clone onf-make
% cd onf-make
% touch requirements.txt
% make help | grep venv
% make venv-help
% make venv
% make venv-requirements
% touch requirements.txt
% make venv-requirements
Change-Id: I9e12bc45c73a0e2bc90b1fd11c87ccffc7ebe57a
diff --git a/makefiles/include.mk b/makefiles/include.mk
index 1bea64e..e9021ba 100644
--- a/makefiles/include.mk
+++ b/makefiles/include.mk
@@ -29,6 +29,9 @@
## -----------------------------------------------------------------------
## [LOADER] Define path vars based on library include directory
## -----------------------------------------------------------------------
+sandbox-root := $(dir $(abspath $(firstword $(MAKEFILE_LIST))))
+sandbox-root := $(patsubst %/,%,$(sandbox-root))
+
$(foreach makefile,$(lastword $(MAKEFILE_LIST)),\
$(foreach makedir,$(abspath $(dir $(makefile))),\
$(eval include $(makedir)/library-makefiles.mk)\
@@ -90,4 +93,15 @@
$(if $(DEBUG),$(warning LEAVE))
+## -----------------------------------------------------------------------
+## [VARS]
+## sandbox-root Path to top level directory containing [mM]akefile
+##
+## onf-mk-top Path to makefiles/ containing onf-make/ and local/
+## onf-mk-tmp Limited scratch area for repo:onf-make use
+##
+## [DEPRECATE]
+## ONF_MAKEDIR Replace with onf-mk-top/ {onf-mk}
+## MAKEDIR Replace with onf-mk-top/ {local}
+## -----------------------------------------------------------------------
# [EOF]