From eaf37668b14b0360d2842a186eb2b1c97efaeb07 Mon Sep 17 00:00:00 2001 From: Chuang Yu Date: Tue, 27 Aug 2024 12:00:36 +0800 Subject: [PATCH] fix: remove temporary build directory (#252) --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 7dbd582..a996dca 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,7 @@ luajit: $(BUILD_DIR)/tiktoken_core.$(EXT) lua51: $(BUILD_DIR)/tiktoken_core-lua51.$(EXT) define build_from_source + if [ -d "$(BUILD_DIR)/lua-tiktoken-temp" ]; then rm -rf $(BUILD_DIR)/lua-tiktoken-temp; fi git clone --branch v0.2.2 --depth 1 https://github.com/gptlang/lua-tiktoken.git $(BUILD_DIR)/lua-tiktoken-temp cd $(BUILD_DIR)/lua-tiktoken-temp && cargo build --features=$1 cp $(BUILD_DIR)/lua-tiktoken-temp/target/debug/libtiktoken_core.$(EXT) $(BUILD_DIR)/tiktoken_core.$(EXT)