File: rules

package info (click to toggle)
hx 25.01.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 11,268 kB
  • sloc: lisp: 24,079; xml: 109; cpp: 45; sh: 40; makefile: 23
file content (36 lines) | stat: -rwxr-xr-x 1,011 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
35
36
#!/usr/bin/make -f

# generate documentation unless nodoc requested
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
MANPAGES = debian/hx.1
endif

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
export DEB_CXXFLAGS_MAINT_APPEND  = -Wall -pedantic

# trust upstream optimization level unless explicitly disabled
ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
export DEB_CFLAGS_MAINT_STRIP = -O2
export DEB_CXXFLAGS_MAINT_STRIP = -O2
# match additional tunings set in build profile "opt"
export RUSTFLAGS = -C lto -C codegen-units=1
endif

# avoid network during build
export HELIX_DISABLE_AUTO_GRAMMAR_BUILD = 1

%:
	dh $@

execute_after_dh_auto_install: $(MANPAGES)
	mkdir --parents debian/build
	cp contrib/completion/hx.zsh debian/build/_hx

# build manpages
debian/hx.1: debian/%.1: debian/hx/usr/bin/%
	mkdir --parents $(dir $@)
	help2man --section 1 --no-info \
	 --name "efficient command-line modal text-editor" \
	 --output $@ $< \
	 || { $1 --help; false; }