File: vendor.mk

package info (click to toggle)
dpkg 1.18.24
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 45,164 kB
  • ctags: 4,933
  • sloc: ansic: 32,683; perl: 22,420; sh: 9,949; cpp: 4,753; makefile: 1,478; sed: 104
file content (18 lines) | stat: -rw-r--r-- 803 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Makefile snippet defining the following vendor-related variables:
#
# DEB_VENDOR: output of dpkg-vendor --query Vendor
# DEB_PARENT_VENDOR: output of dpkg-vendor --query Parent (can be empty)
#
# The snippet also defines a macro "dpkg_vendor_derives_from" that you can
# use to verify if the current vendor derives from another vendor with a
# simple test like this one:
# ifeq ($(call dpkg_vendor_derives_from ubuntu),yes)
#   ...
# endif

dpkg_late_eval ?= $(or $(value DPKG_CACHE_$(1)),$(eval DPKG_CACHE_$(1) := $(shell $(2)))$(value DPKG_CACHE_$(1)))

DEB_VENDOR = $(call dpkg_late_eval,DEB_VENDOR,dpkg-vendor --query Vendor)
DEB_PARENT_VENDOR = $(call dpkg_late_eval,DEB_PARENT_VENDOR,dpkg-vendor --query Parent)

dpkg_vendor_derives_from = dpkg-vendor --derives-from $(1) && echo yes || echo no