Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31b6b944 authored by Sasha Smundak's avatar Sasha Smundak
Browse files

Add copy-files macro

To allow refactoring a lot of product configuration makefiles.

Bug: 190051051
Test: treehugger
Change-Id: I1d22ed6f3df17fb616bd272c0d928aa1fdb9729a
parent 72602c46
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -77,6 +77,16 @@ define find-copy-subdir-files
$(sort $(shell find $(2) -name "$(1)" -type f | $(SED_EXTENDED) "s:($(2)/?(.*)):\\1\\:$(3)/\\2:" | sed "s://:/:g"))
endef

#
# Convert file file to the PRODUCT_COPY_FILES/PRODUCT_SDK_ADDON_COPY_FILES
# format: for each file F return $(F):$(PREFIX)/$(notdir $(F))
# $(1): files list
# $(2): prefix

define copy-files
$(foreach f,$(1),$(f):$(2)/$(notdir $(f)))
endef

# ---------------------------------------------------------------
# Check for obsolete PRODUCT- and APP- goals
ifeq ($(CALLED_FROM_SETUP),true)