File: rules

package info (click to toggle)
libaunit 25.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,360 kB
  • sloc: ada: 5,615; python: 243; makefile: 223; sh: 92; xml: 13
file content (52 lines) | stat: -rwxr-xr-x 1,740 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
#!/usr/bin/make -f

DPKG_EXPORT_BUILDFLAGS := 1
DEB_BUILD_MAINT_OPTIONS := hardening=+all
DEB_ADAFLAGS_MAINT_APPEND := -gnatfno -gnatwa -gnatVa
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 /usr/share/dpkg/buildopts.mk
include $(wildcard /usr/share/ada/packaging.mk)
# wildcard in case only Build-Depends-Indep are installed.

%:
	dh $@

######################################################################
# clean target is OK.

project := -Plib/gnat/aunit.gpr
static := -XAUNIT_LIBRARY_KIND=static
shared := -XAUNIT_LIBRARY_KIND=relocatable \
  -XAUNIT_LIBRARY_VERSION=libaunit.so.$(aunit_SO_VERSION)

override_dh_auto_build-arch:
	gprbuild $(project) $(static) $(GPRBUILDFLAGS)
	gprbuild $(project) $(shared) $(GPRBUILDFLAGS)

override_dh_auto_install-arch:
	gprinstall $(project) $(static) $(static_GPRINSTALLFLAGS)
	gprinstall $(project) $(shared) $(call shared_GPRINSTALLFLAGS,aunit)

######################################################################
INSTALLED_EXAMPLES := \
  debian/libaunit-doc/usr/share/doc/libaunit-dev/examples/*/

.PHONY: execute_after_dh_installexamples-indep
execute_after_dh_installexamples-indep:
  # Replace duplicate files with symlinks.
	rdfind -makeresultsfile false -makesymlinks true $(INSTALLED_EXAMPLES)
  # Make these symlinks relative.
	symlinks -r -s -c $(INSTALLED_EXAMPLES)

override_dh_auto_build-indep:
  ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
    # Avoid dh_auto_build (make -jN would launch several sphinx).
	$(MAKE) -Cdoc aunit_cb.html aunit_cb.pdf aunit_cb.txt \
	  $(DEB_BUILD_OPTION_PARALLEL:%=SPHINXOPTS=-j%)
  endif

override_dh_auto_install-indep: