• Bug#872381: dpkg-dev: optimize Makefile snippets for debian/rules (5/5)

    From Nicolas Boulenguez@1:229/2 to All on Wed Jan 10 22:10:01 2024
    [continued from previous message]

    scripts/mk/buildapi.mk | 8 +++++++-
    1 file changed, 7 insertions(+), 1 deletion(-)

    diff --git a/scripts/mk/buildapi.mk b/scripts/mk/buildapi.mk
    index ba6b43543..1462866c7 100644
    --- a/scripts/mk/buildapi.mk
    +++ b/scripts/mk/buildapi.mk
    @@ -4,7 +4,13 @@ ifndef dpkg_buildapi.mk_included
    dpkg_buildapi.mk_included :=

    # Default API level when not set.
    -DPKG_BUILD_API ?= $(shell dpkg-buildapi)
    +ifndef DPKG_BUILD_API
    + # Run dpkg-buildapi if the variable is actually expanded,
    + # but then replace the recursive definition with a non-recursive one
    + # (and of course return the asked value).
    + DPKG_BUILD_API = \
    + $$(eval DPKG_BUILD_API := $$(shell dpkg-buildapi))$$(DPKG_BUILD_API) +endif

    # We could use only built-in GNU make functions, but that seems too much
    # complexity given no integer operators, given that we currently have to
    --
    2.39.2


    From e1ea3f3e5752f304b36140019293092b0564b771 Mon Sep 17 00:00:00 2001
    From: Nicolas Boulenguez <nicolas@debian.org>
    Date: Sun, 13 Feb 2022 13:41:26 +0100
    Subject: [PATCH 8/8] scripts/mk: improve details in documentation

    architecture.mk: give more details
    Mention default.mk as an alternative in included scripts.
  • From Nicolas Boulenguez@1:229/2 to All on Wed Apr 10 19:50:02 2024
    [continued from previous message]

    -DEB_PARENT_VENDOR = $(call dpkg_late_eval,DEB_PARENT_VENDOR,dpkg-vendor --query Parent)
    +dpkg_lazy ?= $(eval $(1) = $(2)$$($(1)))
    +dpkg_lazy_set ?= $(call dpkg_lazy,$(1),$$(eval $(1) := $(2)))
    +$(call dpkg_lazy_set,DEB_VENDOR,$$(shell dpkg-vendor --query Vendor))
    +$(call dpkg_lazy_set,DEB_PARENT_VENDOR,$$(shell dpkg-vendor --query Parent))

    dpkg_vendor_derives_from_v0 = dpkg-vendor --derives-from $(1) && echo yes || echo no
    dpkg_vendor_derives_from_v1 = $(shell $(dpkg_vendor_derives_from_v0))
    --
    2.39.2

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)