File: rules

package info (click to toggle)
libalog 0.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 748 kB
  • ctags: 33
  • sloc: ada: 4,337; makefile: 145; sh: 19; ansic: 5
file content (47 lines) | stat: -rwxr-xr-x 1,082 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
#!/usr/bin/make -f

ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH)

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

ADAFLAGS := $(filter-out -Wformat -Werror=format-security, $(CFLAGS))
export ADAFLAGS

NUM_CPUS  = $(shell getconf _NPROCESSORS_ONLN)
MAKE_OPTS = NUM_CPUS=$(NUM_CPUS)

%:
	dh ${@} --with quilt

override_dh_auto_clean:
	$(MAKE) clean
	rm -rf debian/tmp-*

override_dh_quilt_patch:
	guards --config debian/patches/guards > debian/patches/series $(ARCH)
	dh_quilt_patch

override_dh_auto_build:
	$(MAKE)
	$(MAKE) LIBRARY_KIND=static
	$(MAKE) doc

override_dh_auto_install:
	$(MAKE) PREFIX=$(CURDIR)/debian/tmp/usr install
	$(MAKE) PREFIX=$(CURDIR)/debian/tmp/usr LIBRARY_KIND=static install
	rm -rf debian/tmp/usr/lib/gnat
	mkdir -p debian/tmp/usr/share/ada/adainclude
	cp debian/misc/alog.gpr debian/tmp/usr/share/ada/adainclude

override_dh_auto_test:
	$(MAKE) $(MAKE_OPTS) tests

override_dh_install:
	dh_install --fail-missing

override_dh_compress:
	dh_compress -X.ads -X.adb -XMakefile

override_dh_strip:
	dh_strip --dbg-package=libalog-dbg