Dpkg::Vendor::Debian: Move time64 buildflags feature from future to abi
[dpkg.git] / scripts / mk / vendor.mk
blobf7c61bf6f1704bf05a8a0d0bb2f0d1cfc1144b86
1 # This Makefile fragment (since dpkg 1.16.1) defines the following
2 # vendor-related variables:
4 # DEB_VENDOR: output of «dpkg-vendor --query Vendor».
5 # DEB_PARENT_VENDOR: output of «dpkg-vendor --query Parent» (can be empty).
7 # This Makefile fragment also defines a set of "dpkg_vendor_derives_from"
8 # macros that can be used to verify if the current vendor derives from
9 # another vendor. The unversioned variant defaults to the v0 version if
10 # undefined, which can be defined explicitly to one of the versions or the
11 # versioned macros can be used directly. The following are example usages:
13 # - dpkg_vendor_derives_from (since dpkg 1.16.1)
15 # ifeq ($(shell $(call dpkg_vendor_derives_from,ubuntu)),yes)
16 # ...
17 # endif
19 # - dpkg_vendor_derives_from_v0 (since dpkg 1.19.3)
21 # ifeq ($(shell $(call dpkg_vendor_derives_from_v0,ubuntu)),yes)
22 # ...
23 # endif
25 # - dpkg_vendor_derives_from_v1 (since dpkg 1.19.3)
27 # dpkg_vendor_derives_from = $(dpkg_vendor_derives_from_v1)
28 # ifeq ($(call dpkg_vendor_derives_from,ubuntu),yes)
29 # ...
30 # endif
31 # ifeq ($(call dpkg_vendor_derives_from_v1,ubuntu),yes)
32 # ...
33 # endif
35 dpkg_late_eval ?= $(or $(value DPKG_CACHE_$(1)),$(eval DPKG_CACHE_$(1) := $(shell $(2)))$(value DPKG_CACHE_$(1)))
37 DEB_VENDOR = $(call dpkg_late_eval,DEB_VENDOR,dpkg-vendor --query Vendor)
38 DEB_PARENT_VENDOR = $(call dpkg_late_eval,DEB_PARENT_VENDOR,dpkg-vendor --query Parent)
40 dpkg_vendor_derives_from_v0 = dpkg-vendor --derives-from $(1) && echo yes || echo no
41 dpkg_vendor_derives_from_v1 = $(shell $(dpkg_vendor_derives_from_v0))
43 dpkg_vendor_derives_from ?= $(dpkg_vendor_derives_from_v0)