mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 04:10:06 -04:00
test: use powershell by default
This commit is contained in:
parent
67f5acb882
commit
c08821bb79
1 changed files with 16 additions and 15 deletions
|
|
@ -9,15 +9,16 @@ SRC_DIR ?= ./src
|
||||||
DEST_DIR ?= ./dest
|
DEST_DIR ?= ./dest
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
MKDIR ?= mkdir
|
SHELL := powershell.exe
|
||||||
RM ?= cmd /C rmdir /Q /S
|
.SHELLFLAGS := -NoProfile
|
||||||
CP ?= copy
|
RM := Remove-Item -Force
|
||||||
TARGET ?= parser.dll
|
CP := Copy-Item -Recurse
|
||||||
|
MKDIR := New-Item -ItemType directory
|
||||||
|
TARGET := parser.dll
|
||||||
else
|
else
|
||||||
MKDIR ?= mkdir -p
|
RM := rm -rf
|
||||||
RM ?= rm -rf
|
CP := cp
|
||||||
CP ?= cp
|
TARGET := parser.so
|
||||||
TARGET ?= parser.so
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(wildcard src/*.cc),)
|
ifneq ($(wildcard src/*.cc),)
|
||||||
|
|
@ -38,13 +39,13 @@ $(TARGET): $(OBJECTS)
|
||||||
$(CC) -c $(CXXFLAGS) -I$(SRC_DIR) -o $@ $<
|
$(CC) -c $(CXXFLAGS) -I$(SRC_DIR) -o $@ $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(OBJECTS) $(TARGET)
|
$(foreach file, $(OBJECTS), $(RM) $(file))
|
||||||
|
$(RM) $(TARGET)
|
||||||
|
|
||||||
install: $(TARGET)
|
$(DEST_DIR):
|
||||||
$(MKDIR) $(DEST_DIR)
|
test -d $(DEST_DIR) || $(MKDIR) $(DEST_DIR)
|
||||||
|
|
||||||
|
install: $(TARGET) $(DEST_DIR)
|
||||||
$(CP) $^ $(DEST_DIR)
|
$(CP) $^ $(DEST_DIR)
|
||||||
|
|
||||||
uninstall:
|
.PHONY: clean
|
||||||
$(RM) $(DEST_DIR)/$(TARGET)
|
|
||||||
|
|
||||||
.PHONY: clean uninstall
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue