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
|
#!/usr/bin/make -f
export DH_VERBOSE := 1
DEB_BUILD_MAINT_OPTIONS := hardening=+all
# -gnatwn: Debian builds should not fail because of a new warning
DEB_ADAFLAGS_MAINT_APPEND := -gnatafno -gnatVa -gnatwan
# work-around for #1096181.
ifneq (,$(filter $(DEB_HOST_ARCH),armel armhf))
DEB_ADAFLAGS_MAINT_APPEND += -fno-stack-check
endif
DPKG_EXPORT_BUILDFLAGS := 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/ada/packaging.mk
%:
dh $@
# For now, DPKG_EXPORT_BUILDFLAGS above has no effect and we use the
# -cargs -largs gprbuild options. This is better than nothing, but
# cannot replace projects reading external values. For example,
# ADAFLAGS should come after defaults and take precedence
# CFLAGS CPPFLAGS should only be read by projects using C
# LDFLAGS like --as-needed should come before libraries
override_dh_auto_build:
# Compile the bin/alr executable.
gprbuild $(GPRBUILDFLAGS) -m -Palr_env.gpr \
-cargs:Ada $(ADAFLAGS) \
-cargs:C $(CFLAGS) $(CPPFLAGS) \
-largs $(LDFLAGS) \
-kargs $(GPRCONFIGFLAGS)
# Parse the output of bin/alr and generate doc/man1/*.1.
# bin/alr crashes if it cannot create HOME/.config/.
HOME='$(CURDIR)/debian/man1' \
python3 debian/generate-man.py
# Skip dwz. Failure with gcc-13:
# dwz: ./dwz.c:12035: adjust_exprloc: Assertion `refd != NULL && !refd->die_remove' failed.
override_dh_dwz:
|