-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from semgrep/martin/upgrade-tree-sitter
Upgrade to tree-sitter 0.22.6
- Loading branch information
Showing
3 changed files
with
82 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- ../../downloads/tree-sitter-0.22.6/Makefile.orig 2024-05-05 13:47:18.000000000 -0700 | ||
+++ ../../downloads/tree-sitter-0.22.6/Makefile 2024-06-18 19:52:35.772310737 -0700 | ||
@@ -8,12 +8,12 @@ | ||
|
||
# collect sources | ||
ifneq ($(AMALGAMATED),1) | ||
- SRC := $(wildcard lib/src/*.c) | ||
- # do not double-include amalgamation | ||
- SRC := $(filter-out lib/src/lib.c,$(SRC)) | ||
+ SRC := $(wildcard lib/src/*.c) | ||
+ # do not double-include amalgamation | ||
+ SRC := $(filter-out lib/src/lib.c,$(SRC)) | ||
else | ||
- # use amalgamated build | ||
- SRC := lib/src/lib.c | ||
+ # use amalgamated build | ||
+ SRC := lib/src/lib.c | ||
endif | ||
OBJ := $(SRC:.c=.o) | ||
|
||
@@ -28,21 +28,20 @@ | ||
SONAME_MINOR := $(word 2,$(subst ., ,$(VERSION))) | ||
|
||
# OS-specific bits | ||
-ifeq ($(OS),Windows_NT) | ||
- $(error "Windows is not supported") | ||
-else ifeq ($(shell uname),Darwin) | ||
- SOEXT = dylib | ||
- SOEXTVER_MAJOR = $(SONAME_MAJOR).dylib | ||
- SOEXTVER = $(SONAME_MAJOR).$(SONAME_MINOR).dylib | ||
- LINKSHARED += -dynamiclib -Wl,-install_name,$(LIBDIR)/libtree-sitter.$(SONAME_MAJOR).dylib | ||
+ | ||
+ifeq ($(shell uname),Darwin) | ||
+ SOEXT = dylib | ||
+ SOEXTVER_MAJOR = $(SONAME_MAJOR).dylib | ||
+ SOEXTVER = $(SONAME_MAJOR).$(SONAME_MINOR).dylib | ||
+ LINKSHARED += -dynamiclib -Wl,-install_name,$(LIBDIR)/libtree-sitter.$(SONAME_MAJOR).dylib | ||
else | ||
- SOEXT = so | ||
- SOEXTVER_MAJOR = so.$(SONAME_MAJOR) | ||
- SOEXTVER = so.$(SONAME_MAJOR).$(SONAME_MINOR) | ||
- LINKSHARED += -shared -Wl,-soname,libtree-sitter.so.$(SONAME_MAJOR) | ||
+ SOEXT = so | ||
+ SOEXTVER_MAJOR = so.$(SONAME_MAJOR) | ||
+ SOEXTVER = so.$(SONAME_MAJOR).$(SONAME_MINOR) | ||
+ LINKSHARED += -shared -Wl,-soname,libtree-sitter.so.$(SONAME_MAJOR) | ||
endif | ||
ifneq ($(filter $(shell uname),FreeBSD NetBSD DragonFly),) | ||
- PCLIBDIR := $(PREFIX)/libdata/pkgconfig | ||
+ PCLIBDIR := $(PREFIX)/libdata/pkgconfig | ||
endif | ||
|
||
all: libtree-sitter.a libtree-sitter.$(SOEXT) tree-sitter.pc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters