esp32: move check for xxd and genromfs from CMake to esp32.mk

This commit is contained in:
Ben Delarre 2017-11-11 17:52:31 -08:00 committed by Andy Green
parent 37e8ee2c00
commit dcf5a83ee4
2 changed files with 13 additions and 12 deletions

View file

@ -157,14 +157,6 @@ if(GIT_EXECUTABLE)
message("Git commit hash: ${LWS_BUILD_HASH}")
endif()
macro(confirm_command CMD NOCMD)
find_program (HAVE_CMD_${CMD} ${CMD} )
if (NOT HAVE_CMD_${CMD})
message(FATAL_ERROR "Missing command ${CMD} required for build: ${NOCMD}" )
endif()
endmacro()
if (LWS_WITH_LWSWS)
message(STATUS "LWS_WITH_LWSWS --> Enabling LWS_WITH_PLUGINS and LWS_WITH_LIBUV")
set(LWS_WITH_PLUGINS 1)
@ -224,10 +216,6 @@ if (LWS_WITH_ESP8266)
endif()
if (LWS_WITH_ESP32)
confirm_command(xxd "usually found in vim package")
confirm_command(genromfs "install genromfs package")
set(LWS_WITH_SHARED OFF)
set(LWS_WITH_MBEDTLS ON)
# set(LWS_WITHOUT_CLIENT ON)

View file

@ -8,6 +8,11 @@
SHELL=/bin/bash
# check genromfs is available
GENROMFS := $(shell command -v genromfs 2> /dev/null)
# check xxd is available
XXD := $(shell command -v xxd 2> /dev/null)
ESPPORT ?= $(CONFIG_ESPTOOLPY_PORT)
LWS_BUILD_PATH=$(PROJECT_PATH)/build
@ -22,6 +27,14 @@ export FAC
DIRNAME:=$(shell basename $$(pwd) | tr -d '\n')
$(LWS_BUILD_PATH)/pack.img: $(APP_BIN)
if [ -z "$(GENROMFS)" ]; then \
echo "ERROR: genromfs is unavailable, please install or compile genromfs" ; \
exit 1 ; \
fi; \
if [ -z "$(XXD)" ]; then \
echo "ERROR: xxd is unavailable, please install or compile xxd (usually provided by vim package)" ; \
exit 1 ; \
fi; \
GNUSTAT=stat ;\
if [ `which gstat 2>/dev/null` ] ; then GNUSTAT=gstat ; fi ;\
DIRNAME=$$(basename $$(pwd) | tr -d '\n') ;\