From 96f05c895d214b648de44ac8c23c1e9b6f4bad17 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 15 Aug 2018 18:30:12 -0600 Subject: [PATCH] tools/Config.mk: Add function CATFILE definition. Currently only used in apps/builtin/Makefile. --- tools/Config.mk | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tools/Config.mk b/tools/Config.mk index 49ac49ec82..ecde90af8b 100644 --- a/tools/Config.mk +++ b/tools/Config.mk @@ -212,8 +212,8 @@ endif # Depends on these settings defined in board-specific Make.defs file # installed at $(TOPDIR)/Make.defs: # -# LD - The command to invoke the linker (includes any options) -# OBJCOPY - The command to invoke the object cop (includes any options) +# LD - The command to invoke the linker (includes any options) +# OBJCOPY - The command to invoke the object cop (includes any options) # # Depends on this settings defined in board-specific defconfig file installed # at $(TOPDIR)/.config: @@ -268,6 +268,19 @@ define MOVEFILE endef endif +# CATFILE - Cat and append a list of files +# USAGE: $(call CATFILE,dest,src1,src2,src3,...) + +ifeq ($(CONFIG_WINDOWS_NATIVE),y) +define CATFILE + $(Q) type $(2) >> $1 +endef +else +define CATFILE + $(Q) cat $(2) >> $1 +endef +endif + # CLEAN - Default clean target ifeq ($(CONFIG_WINDOWS_NATIVE),y)