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
|
#!/usr/bin/make -f
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 /usr/share/dpkg/buildopts.mk
include $(wildcard /usr/share/ada/packaging.mk)
# wildcard means: not during -indep builds.
%:
# Skip Makefile clean and install targets. Actually, even parsing
# it would require gprconfig during -indep builds.
dh $@ --buildsystem=none
project := -Pgnatcoll.gpr -XBUILD=PROD
static := -XLIBRARY_TYPE=static
shared := -XLIBRARY_TYPE=relocatable -XGNATCOLL_VERSION=$(gnatcoll_SO_VERSION)
# Prevent Makefile from messing with gprconfig
# (NORMALIZED_TARGET is wrong at least for i386 and hurd-i386).
override_dh_auto_build-arch:
gprconfig --batch $(GPRCONFIGFLAGS)
gprbuild $(project) $(static) $(GPRBUILDFLAGS)
gprbuild $(project) $(shared) $(GPRBUILDFLAGS)
override_dh_auto_install-arch:
gprinstall $(project) $(static) $(static_GPRINSTALLFLAGS)
gprinstall $(project) $(shared) $(call shared_GPRINSTALLFLAGS,gnatcoll)
override_dh_auto_build-indep:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
# Write distrib/gnatcoll/runtime.py, present in VCS and debian/clean:
cd distrib && python3 gen_gps.py
$(MAKE) -Cdocs html latexpdf text \
$(DEB_BUILD_OPTION_PARALLEL:%=SPHINXOPTS=-j%)
endif
|