#!/usr/bin/make -f # Build script for GNATColl in Debian. # Copyright (c) 2014-2018 Nicolas Boulenguez # 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: libgnatcoll\([0-9.]\+\)$$/GNATCOLL_VERSION:=\1/p; \ ' debian/control),$(eval $(line))) DEB_BUILD_MAINT_OPTIONS := hardening=+all DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed -Wl,--no-undefined \ -Wl,--no-copy-dt-needed-entries -Wl,--no-allow-shlib-undefined include /usr/share/dpkg/architecture.mk include /usr/share/dpkg/buildflags.mk include /usr/share/ada/debian_packaging-$(GNAT_VERSION).mk %: dh $@ --with ada-library .PHONY: override_dh_auto_clean # We can do better than gprclean. # static and relocatable, but not static-pic # Prevent Makefile from messing with gprconfig # (NORMALIZED_TARGET is wrong at least for i386 and hurd-i386). .PHONY: override_dh_auto_build-arch override_dh_auto_build-arch: $(MAKE) \ TARGET=$(DEB_HOST_GNU_TYPE) \ NORMALIZED_TARGET=$(DEB_HOST_GNU_TYPE) \ LIBRARY_TYPES='static relocatable' \ GNATCOLL_VERSION=$(GNATCOLL_VERSION) \ GPRBUILD_OPTIONS='$(BUILDER_OPTIONS) $(foreach v,ADAFLAGS CFLAGS CPPFLAGS LDFLAGS,"-X$(v)=$($(v))")' override_dh_auto_clean:: rm -fr lib obj .PHONY: override_dh_auto_build-indep override_dh_auto_build-indep: ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) $(MAKE) -C docs html latexpdf text SPHINXOPTS=-j$(BUILDER_JOBS) endif override_dh_auto_clean:: $(MAKE) -C docs clean # Ignore upstream install target. .PHONY: override_dh_auto_install # Mimic 'dh --with sphinxdoc', but without adding sphinx-common to # Build-Depends for arch-only builds. .PHONY: override_dh_installdocs-indep override_dh_installdocs-indep: dh_installdocs -i dh_sphinxdoc