Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2
3 # generate documentation unless nodoc requested
4 ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
5 MANPAGES = debian/build/hx.1
6 endif
7
8 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
9 export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
10 export DEB_CXXFLAGS_MAINT_APPEND = -Wall -pedantic
11
12 # trust upstream optimization level unless explicitly disabled
13 ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
14 export DEB_CFLAGS_MAINT_STRIP = -O2
15 export DEB_CXXFLAGS_MAINT_STRIP = -O2
16 # match additional tunings set in build profile "opt"
17 export RUSTFLAGS = -C lto -C codegen-units=1
18 endif
19
20 ABI_FILE = debian/hx-plugin-dev/usr/share/hx-plugin-dev/plugin-abi
21
22 # avoid network during build
23 export HELIX_DISABLE_AUTO_GRAMMAR_BUILD = 1
24
25 %:
26 dh $@
27
28 execute_after_dh_auto_install: $(MANPAGES)
29 mkdir --parents debian/build
30 cp contrib/completion/hx.zsh debian/build/_hx
31 mkdir --parents debian/hx-plugin-dev/usr/share/hx-plugin-dev
32 find languages.toml runtime/queries -type f -exec sha256sum {} + \
33 | perl -anle 'push@r,"$$F[1]\n$$F[0]\n";END{print sort@r}' \
34 | sha256sum \
35 | perl -nE 'say "hx-plugin-abi-$$1" if /^([0-9a-f]{16})/' \
36 > $(ABI_FILE)
37
38 # build manpages
39 # set XDG_CACHE_HOME to make build reproducible (bug#1100016)
40 debian/build/hx.1: XDG_CACHE_HOME = /home/\$USER/.cache
41 debian/build/hx.1: debian/build/%.1: debian/hx/usr/bin/%
42 mkdir --parents debian/build
43 help2man --section 1 --no-info \
44 --name "efficient command-line modal text-editor" \
45 --output $@ $< \
46 || { $1 --help; false; }
47
48 override_dh_gencontrol:
49 dh_gencontrol -phx -- -V'hx:PluginAbi=$(shell cat $(ABI_FILE))'
50 dh_gencontrol --remaining-packages