File: rules

package info (click to toggle)
tree-sitter-markdown 0.2.3-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 5,656 kB
  • sloc: ansic: 136,980; javascript: 957; lisp: 78; python: 57; makefile: 46; cpp: 21; sh: 18
file content (34 lines) | stat: -rwxr-xr-x 1,096 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

export DEB_VERSION_UPSTREAM
export TREE_SITTER_SRC_DIR_MARKDOWN = /usr/src/tree-sitter/markdown/${DEB_VERSION_UPSTREAM}/
export TREE_SITTER_SRC_DIR_MARKDOWN_INLINE = /usr/src/tree-sitter/markdown_inline/${DEB_VERSION_UPSTREAM}/
export ALL_EXTENSIONS=1

%:
	dh $@

debian/%/Makefile: debian/Makefile.in
	mkdir -p debian/$*
	sed -e "s/@PARSER_NAME@/$*/" -e "s/@PARSER_VER@/$(DEB_VERSION_UPSTREAM)/g" $< > $@

override_dh_auto_clean:

override_dh_auto_build:
	cd tree-sitter-markdown && tree-sitter generate --no-bindings
	cd tree-sitter-markdown-inline && tree-sitter generate --no-bindings
	dh_auto_build --buildsystem=rust

# Do not run Makefile install
override_dh_auto_install:
	dh_auto_install --buildsystem=rust

override_dh_install: debian/markdown/Makefile debian/markdown_inline/Makefile
	dh_install

override_dh_auto_test:
	cd tree-sitter-markdown && XDG_CACHE_HOME=$(CURDIR)/debian/.cache tree-sitter test
	cd tree-sitter-markdown-inline && XDG_CACHE_HOME=$(CURDIR)/debian/.cache tree-sitter test
	dh_auto_test --buildsystem=rust