File: rules

package info (click to toggle)
ccls 0.20210330-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,340 kB
  • sloc: cpp: 13,398; python: 152; makefile: 15; objc: 15; ansic: 1
file content (25 lines) | stat: -rwxr-xr-x 714 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/default.mk

CLANG_VER := $(shell ls /usr/include/clang | grep '^[0-9]\+$$'| head -n 1)
CLANG_RESOURCE_DIR := /usr/include/clang/$(CLANG_VER)
CCLS_SUBSTVARS += -Vccls:Recommends=$(shell dpkg-query -S $(CLANG_RESOURCE_DIR) | sed -e 's/: .*//')

CMAKE_OPTS += -DCCLS_VERSION=$(DEB_VERSION)
CMAKE_OPTS += -DCLANG_RESOURCE_DIR=$(CLANG_RESOURCE_DIR)

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- $(CMAKE_OPTS)

override_dh_gencontrol:
	dh_gencontrol -- $(CCLS_SUBSTVARS)

# upstream tests need building with clang-6, but we don't
override_dh_auto_test:
	CCLS=obj-$(DEB_HOST_GNU_TYPE)/ccls debian/tests/lsp-test