File: rules

package info (click to toggle)
libtexttools 2.1.0-13
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 952 kB
  • sloc: ada: 11,394; ansic: 529; makefile: 88; sed: 75; sh: 12
file content (53 lines) | stat: -rwxr-xr-x 1,753 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
#!/usr/bin/make -f

# Copyright (c) 2003-2009 Ludovic Brenta <lbrenta@debian.org>
# Copyright (c) 2009-2018 Nicolas Boulenguez <nicolas@debian.org>

# This build script is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.

# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.

# On Debian systems, the full text of the GPL is in the file
# /usr/share/common-licenses/GPL-3.

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

DEB_BUILD_MAINT_OPTIONS := hardening=+all
include /usr/share/dpkg/default.mk
include /usr/share/ada/debian_packaging-$(GNAT_VERSION).mk

ADAFLAGS += -gnatn

%:
	dh $@ --with ada-library

# All these targets are redefined or empty. No implicit default behaviour.
.PHONY: $(addprefix override_dh_auto_, \
  configure build-arch build-indep test-arch test-indep install clean)

OPTS := $(foreach var, \
          ADAFLAGS CC CFLAGS CPPFLAGS LDFLAGS SOVERSION,$(var)="$($(var))") \
          GNATMAKE_OPTIONS="$(BUILDER_OPTIONS)"
override_dh_auto_clean:
	dh_auto_clean -- $(OPTS)
override_dh_auto_build-arch:
	dh_auto_build -a -- $(OPTS)
override_dh_auto_test-arch:
	dh_auto_test -a -- $(OPTS)

.PHONY: override_dh_compress
override_dh_compress:
	dh_compress --all $(addprefix --exclude=,.ads .adb .c .h)