#!/usr/bin/make -f # Debian build script for log4Ada # Copyright 2009-2016 Xavier Grave # Copyright 2016-2020 Nicolas Boulenguez $(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