build: move Build/copy-file to image-commands.mk
authorChristian Lamparter <chunkeey@gmail.com>
Sat, 8 Jan 2022 18:28:09 +0000 (19:28 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Sat, 15 Jan 2022 18:29:42 +0000 (19:29 +0100)
This is makro is present in more than one place.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
include/image-commands.mk
target/linux/apm821xx/image/Makefile
target/linux/mpc85xx/image/Makefile

index 913e1c2411e03ecaba9c75ab0507a1ed9d240af1..158af853a584d51b947252dd0fc66289329555bb 100644 (file)
@@ -196,6 +196,10 @@ define Build/check-size
        }
 endef
 
+define Build/copy-file
+       cat "$(1)" > "$@"
+endef
+
 define Build/elecom-product-header
        $(eval product=$(word 1,$(1)))
        $(eval fw=$(if $(word 2,$(1)),$(word 2,$(1)),$@))
index 2737a324368ac516afc655666ea39be5b18651ba..f4701e9f26320c6cdae76fd735444bf07bf884bf 100644 (file)
@@ -28,10 +28,6 @@ define Build/boot-script
                $@.scr
 endef
 
-define Build/copy-file
-       cat "$(1)" > "$@"
-endef
-
 define Build/dtb
        $(call Image/BuildDTB,../dts/$(DEVICE_DTS).dts,$@.dtb,,--space $(DTB_SIZE))
 endef
index b9582a2552f29fc6dadf476810a811396aedd002..2b8188403228c635c4a58f1df084dd8051dbf4da 100644 (file)
@@ -3,10 +3,6 @@
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
-define Build/copy-file
-       cat "$(1)" > "$@"
-endef
-
 define Device/Default
   PROFILES := Default
   DEVICE_DTS := $(lastword $(subst _, ,$(1)))