Subject: 29.0.50; [PATCH] [Treesitter] tree_sitter/api.h file not found when compiling Emacs

From: Daniel Martín <[email-masked]>
Date: Mon, 10 Oct 2022 13:06:13 +0200

When trying to compile the Emacs Treesiter branch, I got the following
compilation error:

In file included from emacs.c:140:
./treesit.h:23:10: fatal error: 'tree_sitter/api.h' file not found
#include <tree_sitter/api.h>
         ^~~~~~~~~~~~~~~~~~~
1 error generated.

The reason is that the Makefile is not referring to the correct C
compiler flags because of a typo.  I've attached a patch to correct the
problem.

Thanks.

>From 6abc91130d2035f2a86a40f9bed28cc68e17a06a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Mart=C3=ADn?= <[email-masked]>
Date: Mon, 10 Oct 2022 13:03:30 +0200
Subject: [PATCH] Fix typo in Makefile.in

* src/Makefile.in (TREE_SITTER_CFLAGS): Set the correct C flags.
---
 src/Makefile.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Makefile.in b/src/Makefile.in
index eb537e2127..0d27f3e6db 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -344,7 +344,7 @@ JSON_CFLAGS =
 JSON_OBJ = @JSON_OBJ@
 
 TREE_SITTER_LIBS = @TREE_SITTER_LIBS@
-TREE_SITTER_FLAGS = @TREE_SITTER_FLAGS@
+TREE_SITTER_CFLAGS = @TREE_SITTER_CFLAGS@
 TREE_SITTER_OBJ = @TREE_SITTER_OBJ@
 
 INTERVALS_H = dispextern.h intervals.h composite.h
-- 
2.34.1