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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
|
#!/usr/bin/make -f
# Build script for Templates_Parser in Debian.
# Copyright (c) 2003-2008 Ludovic Brenta <lbrenta@debian.org>
# Copyright (c) 2013-2022 Nicolas Boulenguez <nicolas@debian.org>
# 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.
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
# On Debian systems, the full text of the GPL is in the file
# /usr/share/common-licenses/GPL-3.
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/architecture.mk
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/buildopts.mk
include /usr/share/ada/packaging.mk
# Some options are stored into makefile.setup, but some are not.
# All written options are read back, but some are overriden.
# That is why we force all values on each Make.
# Force detection of TP_XMLADA because of a regression in GCC-12.
# gnat ls -Pxmlada_dom.gpr -aP/usr/share/gpr -> found
# gnat ls -Pxmlada_dom.gpr -> not found
# gnat ls -v -> says that is searches /usr/share/gpr
# No one will ever fix this, GCC is not supporting projects anymore.
MAKE_OPTS := \
VERBOSE_MAKE=1 \
VERSION=$(templates_parser_SO_VERSION) \
DEFAULT_LIBRARY_TYPE=relocatable \
TP_XMLADA=Installed \
GPRBUILD='gprbuild $(GPRBUILDFLAGS:-j%=)' \
LIBRARY_TYPES='static relocatable' \
$(DEB_BUILD_OPTION_PARALLEL:%=PROCESSORS=%) \
$(DEB_BUILD_OPTIONS_PARALLEL:%=SPHINXOPTS=-j%) \
DOC_FORMATS="html info latexpdf text"
######################################################################
%:
dh $@
.PHONY: override_dh_auto_build-arch
override_dh_auto_build-arch:
# Gprbuild deals with parallelism. Make should not interfer.
$(MAKE) $(MAKE_OPTS)
.PHONY: override_dh_auto_build-indep
override_dh_auto_build-indep:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
# Parallelism in Make would create a race condition between sphinx
# processes. Anyway, sphinx already uses parallelism.
$(MAKE) build-doc $(MAKE_OPTS)
endif
# Skip tests, they assume that the executables are in the PATH.
.PHONY: override_dh_auto_test
override_dh_auto_install-arch:
$(MAKE) $(MAKE_OPTS) install LIBRARY_TYPES= \
GPRINST_OPTS='$(standard_GPRINSTALLFLAGS)'
$(MAKE) $(MAKE_OPTS) install-relocatable \
GPRINST_OPTS='$(call shared_GPRINSTALLFLAGS,templates_parser)'
$(MAKE) $(MAKE_OPTS) install-static \
GPRINST_OPTS='$(static_GPRINSTALLFLAGS)'
override_dh_auto_install-indep:
.PHONY: override_dh_auto_clean
override_dh_auto_clean:
$(MAKE) clean $(MAKE_OPTS)
# Prevent a warning about doc-main-package autodetection.
doc_pkg := libtemplates-parser-doc
execute_before_dh_installdocs:
dh_installdocs --package=$(doc_pkg) --doc-main-package=$(doc_pkg)
execute_before_dh_installexamples: execute_before_%:
dh_installexamples --package=$(doc_pkg) --doc-main-package=$(doc_pkg)
|