File: rules

package info (click to toggle)
moarvm 2020.12%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 18,652 kB
  • sloc: ansic: 268,178; perl: 8,186; python: 1,316; makefile: 768; sh: 287
file content (58 lines) | stat: -rwxr-xr-x 1,308 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/make -f
# -*- GNUmakefile -*-

# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
# export DH_OPTIONS=-v

ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
else
CROSS=
endif

# see FEATURE AREAS in dpkg-buildflags(1)
DEB_BUILD_MAINT_OPTIONS=hardening=+all

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

# Improve manpage from perldoc
MOAR_VERSION=$(shell cat VERSION)
MOAR_DATE=$(subst .,-, $(MOAR_VERSION))

# Package specific directory as libmoar is not versioned
# https://github.com/MoarVM/MoarVM/issues/74
MOAR_LIB_DIR=/usr/lib/moar
LDFLAGS += -Wl,-rpath=$(MOAR_LIB_DIR)

.PHONY: build

# This looks redundant with the implicit rule for %, but it isn't: .PHONY
# is ignored for implicit rules, so we need a separate rule for build.
build:
	dh $@

%:
	dh $@

override_dh_auto_configure:
	perl Configure.pl $(CROSS) \
		--prefix=/usr \
		--libdir=$(MOAR_LIB_DIR) \
		--debug \
		--has-libtommath \
		--has-libuv \
		--has-libatomic_ops \
		--has-libffi

override_dh_auto_build:
	perldoc -F -onroff \
		-w center:MoarVM \
		-w "release:MoarVM-$(MOAR_VERSION)" \
		-w "date:$(MOAR_DATE)" \
		docs/moar.pod > debian/moar.1
	dh_auto_build -- NOISY=1

override_dh_missing:
	dh_missing --list-missing