mk: Check if setup_tools.par and image_tool is working properly.
If some dependency was added to image_tool (or its dependent modules)
without including them in devtools/mk/setup_tools_modules.lst, the
invocation of setup_tools.par will fail.
Same as factory.par, we should do a minimal check when building
setup_tools.par.
BUG=chromium:738360
TEST=make par
Change-Id: I8fa6781f7af030546129f4b9fda0fed574bd05fc
Reviewed-on: https://chromium-review.googlesource.com/1009244
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Pi-Hsun Shih <pihsun@chromium.org>
diff --git a/Makefile b/Makefile
index deae490..9481f3b 100644
--- a/Makefile
+++ b/Makefile
@@ -246,6 +246,9 @@
mkdir -p "$(PAR_OUTPUT_DIR)"
bin/tiny_par --pkg py_pkg -o "$(PAR_OUTPUT_DIR)/$(SETUP_PAR_NAME)" \
$(foreach module,$(SETUP_PAR_MODULES),-m $(module))
+ @echo -n "Checking $(SETUP_PAR_NAME) invocation..."
+ @"$(PAR_OUTPUT_DIR)/$(SETUP_PAR_NAME)" image_tool help >/dev/null 2>&1 \
+ && echo "Good"
$(call func-apply-board-resources,par,$(PAR_TEMP_DIR))
$(call func-make-par,$(PAR_OUTPUT_DIR)/$(PAR_NAME),,$(PAR_TEMP_DIR))
$(call func-make-par,$(PAR_OUTPUT_DIR)/factory-mini.par,--mini,\