Commit | Line | Data |
---|---|---|
1479465f GJ |
1 | # Makefile snippet defining the following vendor-related variables: |
2 | # | |
3 | # DEB_VENDOR: output of dpkg-vendor --query Vendor | |
4 | # DEB_PARENT_VENDOR: output of dpkg-vendor --query Parent (can be empty) | |
5 | # | |
6 | # The snippet also defines a macro "dpkg_vendor_derives_from" that you can | |
7 | # use to verify if the current vendor derives from another vendor with a | |
8 | # simple test like this one: | |
9 | # ifeq ($(call dpkg_vendor_derives_from ubuntu),yes) | |
10 | # ... | |
11 | # endif | |
12 | ||
13 | dpkg_late_eval ?= $(or $(value DPKG_CACHE_$(1)),$(eval DPKG_CACHE_$(1) := $(shell $(2)))$(value DPKG_CACHE_$(1))) | |
14 | ||
15 | DEB_VENDOR = $(call dpkg_late_eval,DEB_VENDOR,dpkg-vendor --query Vendor) | |
16 | DEB_PARENT_VENDOR = $(call dpkg_late_eval,DEB_PARENT_VENDOR,dpkg-vendor --query Parent) | |
17 | ||
18 | dpkg_vendor_derives_from = dpkg-vendor --derives-from $(1) && echo yes || echo no |