Skip to content

Commit

Permalink
refactor(Makefile): use semicolon instead of error redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
xudyang1 committed Jan 12, 2025
1 parent b17a6f0 commit 5c54ffa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ nvim: | ${NVIM_PATH}
git -C ${NVIM_MASTER_PATH} fetch origin master --depth 1
git -C ${NVIM_MASTER_PATH} checkout FETCH_HEAD

LUASNIP_DETECTED_OS?=$(shell uname 2>/dev/null)
LUASNIP_DETECTED_OS?=$(shell uname;)
ifeq ($(LUASNIP_DETECTED_OS),Darwin)
# flags for dynamic linking on macos, from luarocks
# (https://github.com/luarocks/luarocks/blob/9a3c5a879849f4f411a96cf1bdc0c4c7e26ade42/src/luarocks/core/cfg.lua#LL468C37-L468C80)
Expand All @@ -47,7 +47,7 @@ ifeq ($(OS_ENV),Windows_NT)
LUASNIP_DETECTED_OS:=Windows
endif
# Example output on Windows: MINGW64_NT-10.0-19045 DESKTOP-ABCDE 3.4.10-1234567.x86_64 2024-02-14 20:17 UTC x86_64 Msys
UNAME_ALL:=$(shell uname -a 2>/dev/null)
UNAME_ALL:=$(shell uname -a;)
ifneq (,$(findstring MINGW,$(UNAME_ALL)))
LUASNIP_DETECTED_OS:=Windows
endif
Expand Down Expand Up @@ -79,7 +79,7 @@ ifeq ($(LUASNIP_DETECTED_OS),Windows)
LUA_LDLIBS?=$(if $(strip $(NEOVIM_BIN_PATH)),-L"$(NEOVIM_BIN_PATH)" -llua51,)
endif

CC_ENV:=$(or $(shell which $(CC) 2>/dev/null), $(shell which gcc 2>/dev/null), $(shell which clang 2>/dev/null))
CC_ENV:=$(shell (which $(CC) || which clang || which gcc || which cl || which zig) 2>/dev/null;)
PROJECT_ROOT:=$(CURDIR)
JSREGEXP_PATH=$(PROJECT_ROOT)/deps/jsregexp
JSREGEXP005_PATH=$(PROJECT_ROOT)/deps/jsregexp005
Expand All @@ -91,7 +91,7 @@ jsregexp:

install_jsregexp: jsregexp
# remove old binary.
rm "$(PROJECT_ROOT)/lua/luasnip-jsregexp.so" || true
rm -f "$(PROJECT_ROOT)/lua/luasnip-jsregexp.so"
# there is some additional trickery to make this work with jsregexp-0.0.6 in
# util/jsregexp.lua.
cp "$(JSREGEXP_PATH)/jsregexp.lua" "$(PROJECT_ROOT)/lua/luasnip-jsregexp.lua"
Expand Down

0 comments on commit 5c54ffa

Please sign in to comment.