It is faster to check the existance of a certain library by trying importing
that library, instead of invoking pip3 for a complete list of installed
libraries. Time of the check can be significantly reduced.
# time pip3 list
...
real 0m6.038s
user 0m0.652s
sys 0m0.036s
# time python3 -c "import kconfiglib"
real 0m0.037s
user 0m0.036s
sys 0m0.000s
Tracked-On: #1588
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Reviewed-by: Anthony Xu <anthony.xu@intel.com>
This patch enables 'make menuconfig' leveraging the menuconfig.py in kconfiglib,
which shows a TUI for modifying the current configurations.
Menuconfig.py is python3 only, and thus the existence of 'python3' instead of
'python' is checked and python3 is used to run all the scripts.
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Acked-by: Geoffroy VanCutsem <geoffroy.vancutsem@intel.com>
The current implementation of the check_dep_* macros always append the
prerequisite checking target to BUILD_DEPS, but there are some cases when some
prerequisites are only necessary for some specific targets instead of general
builds.
This patch adds a second parameter to the check_dep_* macros specifying which
variable the generated target should be appended to.
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Acked-by: Geoffroy VanCutsem <geoffroy.vancutsem@intel.com>
This patch introduces the following functions for Makefiles:
check_dep_exec <exe>
Check existence of the executable <exe>
check_dep_pylib <lib>
Check existence of the python library <lib>
Calling and evaluting the functions will create a check_xxx target and add the
target to the variable BUILD_DEPS. Thus it is sufficient to add the following
to a Makefile for checking a number of build dependencies.
include deps.mk
$(eval $(call check_dep_exec,python))
$(eval $(call check_dep_pylib,Sphinx))
all: $(BUILD_DEPS) ...
v4 -> v5:
* No changes.
v3 -> v4:
* No changes.
v2 -> v3:
* No changes.
v1 -> v2:
* New in v2.
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>