File: rules

package info (click to toggle)
libgmpada 1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 424 kB
  • sloc: ada: 4,956; makefile: 142; ansic: 55; sh: 15; sed: 11
file content (39 lines) | stat: -rwxr-xr-x 1,106 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
#!/usr/bin/make -f

$(foreach line,$(shell sed -n '\
  s/^ gnat, gnat-\([0-9.]\+\),$$/ \
    GNAT_VERSION:=\1 \
  /p;\
  s/^Package: lib[a-z-]\+\([0-9.]\+\)$$/ \
    SOVERSION:=\1 \
  /p;\
  ' debian/control),$(eval $(line)))

DEB_BUILD_MAINT_OPTIONS := hardening=+all
DEB_LDFLAGS_MAINT_APPEND := -Wl,--no-undefined \
  -Wl,--no-copy-dt-needed-entries -Wl,--no-allow-shlib-undefined
include /usr/share/dpkg/buildflags.mk
include /usr/share/ada/debian_packaging-$(GNAT_VERSION).mk

%:
	dh $@

.PHONY: override_dh_auto_build
override_dh_auto_build:
  # -gnatn is very useful for the thin binding.
	dh_auto_build -- \
	  $(foreach v,CFLAGS CPPFLAGS LDFLAGS SOVERSION,$(v)='$($(v))') \
	  ADAFLAGS='$(ADAFLAGS) -gnatn' \
	  GNATMAKE_OPTIONS='$(BUILDER_OPTIONS)'

.PHONY: override_dh_auto_test
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_test -- \
	  $(foreach v,CFLAGS CPPFLAGS LDFLAGS SOVERSION,$(v)='$($(v))') \
	  ADAFLAGS='$(ADAFLAGS) -gnata' \
	  GNATMAKE_OPTIONS='$(BUILDER_OPTIONS)'
endif

# Ignore this target from upstream Makefile.
.PHONY: override_dh_auto_install