pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/textproc/tree-sitter
Module Name: pkgsrc
Committed By: wiz
Date: Wed Jan 18 16:32:26 UTC 2023
Modified Files:
pkgsrc/textproc/tree-sitter: grammar.mk
Log Message:
tree-sitter: support grammars where sources are not in ${WRKSRC}/src
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/textproc/tree-sitter/grammar.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/textproc/tree-sitter/grammar.mk
diff -u pkgsrc/textproc/tree-sitter/grammar.mk:1.3 pkgsrc/textproc/tree-sitter/grammar.mk:1.4
--- pkgsrc/textproc/tree-sitter/grammar.mk:1.3 Wed Jan 18 13:28:15 2023
+++ pkgsrc/textproc/tree-sitter/grammar.mk Wed Jan 18 16:32:26 2023
@@ -1,4 +1,4 @@
-# $NetBSD: grammar.mk,v 1.3 2023/01/18 13:28:15 wiz Exp $
+# $NetBSD: grammar.mk,v 1.4 2023/01/18 16:32:26 wiz Exp $
#
# Common logic to build and install tree-sitter grammars.
#
@@ -7,20 +7,21 @@
#
GRAMMAR_LIBRARY_NAME?= lib${PKGBASE}
+GRAMMAR_SOURCE_DIR?= src
USE_LANGUAGES+= c c++
do-build:
- cd ${WRKSRC}/src && \
+ cd ${WRKSRC}/${GRAMMAR_SOURCE_DIR} && \
${CC} ${CFLAGS} -std=c99 -I. -c -fPIC parser.c
- cd ${WRKSRC}/src && \
+ cd ${WRKSRC}/${GRAMMAR_SOURCE_DIR} && \
if [ -f scanner.c ]; then ${CC} ${CFLAGS} -std=c99 -I. -c -fPIC scanner.c; fi
- cd ${WRKSRC}/src && \
+ cd ${WRKSRC}/${GRAMMAR_SOURCE_DIR} && \
if [ -f scanner.cc ]; then ${CXX} ${CXXFLAGS} -I. -c -fPIC scanner.cc; fi
- cd ${WRKSRC}/src && \
+ cd ${WRKSRC}/${GRAMMAR_SOURCE_DIR} && \
${CXX} -shared -o ${GRAMMAR_LIBRARY_NAME}.so *.o
INSTALLATION_DIRS+= lib
do-install:
- ${INSTALL_LIB} ${WRKSRC}/src/${GRAMMAR_LIBRARY_NAME}.so ${DESTDIR}${PREFIX}/lib
+ ${INSTALL_LIB} ${WRKSRC}/${GRAMMAR_SOURCE_DIR}/${GRAMMAR_LIBRARY_NAME}.so ${DESTDIR}${PREFIX}/lib
Home |
Main Index |
Thread Index |
Old Index