Skip to content

Commit

Permalink
fix build path
Browse files Browse the repository at this point in the history
Signed-off-by: Cocoa <i@uwucocoa.moe>
  • Loading branch information
cocoa-xu committed Sep 3, 2024
1 parent 9c6a6ad commit 7b7e4d4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
MIX_APP_ENV := $(if $(MIX_ENV),$(MIX_ENV),$(if $(REBAR_PROFILE),$(REBAR_PROFILE),default))

ifndef MIX_APP_PATH
MIX_APP_PATH=_build/${MIX_ENV:-default}/lib/tflite_beam
MIX_APP_PATH=_build/$(MIX_APP_ENV)/lib/tflite_beam
endif

PRIV_DIR = $(MIX_APP_PATH)/priv
Expand Down Expand Up @@ -72,7 +74,10 @@ MAKE_BUILD_FLAGS ?= auto
build: $(NATIVE_BINDINGS_SO) fix_libusb

$(PRIV_DIR):
@ mkdir -p "$(PRIV_DIR)"
@ if [ ! -d "$(PRIV_DIR)" ]; then \
rm -rf "$(PRIV_DIR)" ; \
mkdir -p "$(PRIV_DIR)" ; \
fi

create_cache_dir:
@ mkdir -p "$(TFLITE_BEAM_CACHE_DIR)"
Expand Down Expand Up @@ -127,6 +132,7 @@ libusb: create_cache_dir
fi

$(UNICODE_DATA): $(PRIV_DIR)
echo "MIX_APP_PATH: $(MIX_APP_PATH)"
@ if [ ! -e "$(UNICODE_DATA)" ]; then \
cp -f "$(UNICODEDATA)/unicode_data.txt" "$(UNICODE_DATA)" ; \
fi
Expand Down

0 comments on commit 7b7e4d4

Please sign in to comment.