File: rules

package info (click to toggle)
liblog4ada 1.3.1.b6dafb49-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 572 kB
  • sloc: ada: 3,168; makefile: 33; sh: 14
file content (49 lines) | stat: -rwxr-xr-x 1,540 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
#!/usr/bin/make -f
# Debian build script for log4Ada
# Copyright 2009-2016 Xavier Grave <xavier.grave@csnsm.in2p3.fr>
# Copyright 2016-2020 Nicolas Boulenguez <nicolas@debian.org>

$(foreach line,$(shell sed -n '\
  s/^ gnat, gnat-\([0-9.]\+\),$$/       gnat_version:=\1         /p;\
  s/^Package: liblog4ada\([0-9.]\+\)$$/ soname:=liblog4ada.so.\1 /p;\
 ' debian/control),$(eval $(line)))

DPKG_EXPORT_BUILDFLAGS := 1
DEB_BUILD_MAINT_OPTIONS := hardening=+all
DEB_LDFLAGS_MAINT_APPEND := \
  -Wl,--no-allow-shlib-undefined \
  -Wl,--no-copy-dt-needed-entries \
  -Wl,--no-undefined
include /usr/share/dpkg/buildflags.mk
include $(wildcard /usr/share/ada/debian_packaging-$(gnat_version).mk)
# wildcard means: not during -indep builds

%:
	dh $@

# Ignore these targets from upstream GNUmakefile.
.PHONY: $(addprefix override_dh_auto_,build-arch build-indep install clean)

override_dh_auto_build-indep:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	$(MAKE) -C doc
endif

override_dh_auto_clean:
	rm -fr lib obj-relocatable obj-static
	$(MAKE) -C doc clean

gpr := log4ada.gpr

override_dh_auto_build-arch:
	gprbuild -p $(BUILDER_OPTIONS) $(gpr) \
	  -XLIBRARY_TYPE=static
	gprbuild -p $(BUILDER_OPTIONS) $(gpr) \
	  -XLIBRARY_TYPE=relocatable \
	  -Xsoname=$(soname)

# The only effect should be to avoid a debhelper warning.
.PHONY: override_dh_installdocs override_dh_installexamples
override_dh_installdocs override_dh_installexamples: override_%:
	$* --package=liblog4ada-doc --doc-main-package=liblog4ada-doc
	$* --remaining-packages