From 78810a6da7a1ce7fd38cb250f089c22719ec49fe Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Sun, 17 May 2026 06:33:40 +0200 Subject: [PATCH] build(make): make parser the default target --- Makefile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 7830f80..2b4fd78 100644 --- a/Makefile +++ b/Makefile @@ -49,16 +49,14 @@ ifneq ($(filter $(shell uname),FreeBSD NetBSD DragonFly),) endif endif -all: lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT) $(LANGUAGE_NAME).pc - -# Neovim expects parser/. on its runtimepath. Build with -# `make nvim-parser` after cloning so the drop-in runtime tree works. -nvim-parser: parser/tumblr.$(SOEXT) +parser: parser/tumblr.$(SOEXT) parser/tumblr.$(SOEXT): $(PARSER) $(EXTRAS) @mkdir -p parser $(TS) build --output $@ +lib: lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT) $(LANGUAGE_NAME).pc + lib$(LANGUAGE_NAME).a: $(OBJS) $(AR) $(ARFLAGS) $@ $^ @@ -86,7 +84,7 @@ $(SRC_DIR)/grammar.json: grammar.js $(PARSER): $(SRC_DIR)/grammar.json $(TS) generate $^ -install: all +install: lib install -d '$(DESTDIR)$(DATADIR)'/tree-sitter/queries/tumblr '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter '$(DESTDIR)$(PCLIBDIR)' '$(DESTDIR)$(LIBDIR)' install -m644 bindings/c/tree_sitter/$(LANGUAGE_NAME).h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h install -m644 $(LANGUAGE_NAME).pc '$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc @@ -120,4 +118,4 @@ clean: test: $(TS) test -.PHONY: all install uninstall clean test nvim-parser +.PHONY: parser lib install uninstall clean test