po: Update German programs translation
[dpkg.git] / scripts / mk / vendor.mk
blob18da22a560e27e36268302e07abeba8c23c5add2
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 or to the v1 version when on build API 1, otherwise it can be
11 # defined explicitly to one of the versions or the versioned macros can be
12 # used directly. The following are example usages:
14 # - dpkg_vendor_derives_from (since dpkg 1.16.1)
16 # ifeq ($(shell $(call dpkg_vendor_derives_from,ubuntu)),yes)
17 # ...
18 # endif
20 # - dpkg_vendor_derives_from_v0 (since dpkg 1.19.3)
22 # ifeq ($(shell $(call dpkg_vendor_derives_from_v0,ubuntu)),yes)
23 # ...
24 # endif
26 # - dpkg_vendor_derives_from_v1 (since dpkg 1.19.3)
28 # dpkg_vendor_derives_from = $(dpkg_vendor_derives_from_v1)
29 # ifeq ($(call dpkg_vendor_derives_from,ubuntu),yes)
30 # ...
31 # endif
32 # ifeq ($(call dpkg_vendor_derives_from_v1,ubuntu),yes)
33 # ...
34 # endif
36 # Note:
37 # - Only documented variables are considered public interfaces.
38 # - Expects to be included from the source tree root directory.
40 ifndef dpkg_vendor_mk_included
41 dpkg_vendor_mk_included = yes
43 ifndef dpkg_datadir
44 dpkg_datadir := $(dir $(lastword $(MAKEFILE_LIST)))
45 endif
46 include $(dpkg_datadir)/buildapi.mk
48 dpkg_late_eval ?= $(if $(filter undefined,$(flavor DPKG_CACHE_$(1))),$(eval DPKG_CACHE_$(1) := $(shell $(2)))$(value DPKG_CACHE_$(1)),$(value DPKG_CACHE_$(1)))
50 DEB_VENDOR = $(call dpkg_late_eval,DEB_VENDOR,dpkg-vendor --query Vendor)
51 DEB_PARENT_VENDOR = $(call dpkg_late_eval,DEB_PARENT_VENDOR,dpkg-vendor --query Parent)
53 dpkg_vendor_derives_from_v0 = dpkg-vendor --derives-from $(1) && echo yes || echo no
54 dpkg_vendor_derives_from_v1 = $(shell $(dpkg_vendor_derives_from_v0))
56 ifeq ($(call dpkg_build_api_ge,1),yes)
57 dpkg_vendor_derives_from ?= $(dpkg_vendor_derives_from_v1)
58 else
59 dpkg_vendor_derives_from ?= $(dpkg_vendor_derives_from_v0)
60 endif
62 endif # dpkg_vendor_mk_included