diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-10-12 15:00:07 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-10-12 15:00:07 +0000 |
commit | 25f63fe71e6cccd47d6c13a51ec8a1cd02e71d2e (patch) | |
tree | dcb00116402e95c48e8b54f5952bf548fe1cb56d /include | |
parent | 699b3a35efa5ac5552fca17f746400c996e561cf (diff) | |
download | upstream-25f63fe71e6cccd47d6c13a51ec8a1cd02e71d2e.tar.gz upstream-25f63fe71e6cccd47d6c13a51ec8a1cd02e71d2e.tar.bz2 upstream-25f63fe71e6cccd47d6c13a51ec8a1cd02e71d2e.zip |
image.mk: reduce code duplication, move prepare to a separate make target
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42873 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r-- | include/image.mk | 57 |
1 files changed, 20 insertions, 37 deletions
diff --git a/include/image.mk b/include/image.mk index f0ed31a362..e29bb001d5 100644 --- a/include/image.mk +++ b/include/image.mk @@ -250,52 +250,35 @@ define BuildImage download: prepare: + compile: + clean: + image_prepare: ifeq ($(IB),) compile: compile-targets FORCE $(call Build/Compile) - else - compile: - endif - ifeq ($(IB),) - install: compile install-targets FORCE + clean: clean-targets + $(call Build/Clean) + + image_prepare: compile FORCE $(call Image/Prepare) $(call Image/mkfs/prepare) - $(call Image/BuildKernel) - $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call Image/BuildKernel/Initramfs)) - $(call Image/InstallKernel) - $(call Image/mkfs/cpiogz) - $(call Image/mkfs/targz) - $(call Image/mkfs/ext4) - $(call Image/mkfs/iso) - $(call Image/mkfs/jffs2) - $(call Image/mkfs/jffs2_nand) - $(call Image/mkfs/squashfs) - $(call Image/mkfs/ubifs) - $(call Image/Checksum) - else - install: compile install-targets - $(call Image/BuildKernel) - $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call Image/BuildKernel/Initramfs)) - $(call Image/InstallKernel) - $(call Image/mkfs/cpiogz) - $(call Image/mkfs/targz) - $(call Image/mkfs/ext4) - $(call Image/mkfs/iso) - $(call Image/mkfs/jffs2) - $(call Image/mkfs/jffs2_nand) - $(call Image/mkfs/squashfs) - $(call Image/mkfs/ubifs) - $(call Image/Checksum) endif - ifeq ($(IB),) - clean: clean-targets - $(call Build/Clean) - else - clean: - endif + install: image_prepare install-targets FORCE + $(call Image/BuildKernel) + $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call Image/BuildKernel/Initramfs)) + $(call Image/InstallKernel) + $(call Image/mkfs/cpiogz) + $(call Image/mkfs/targz) + $(call Image/mkfs/ext4) + $(call Image/mkfs/iso) + $(call Image/mkfs/jffs2) + $(call Image/mkfs/jffs2_nand) + $(call Image/mkfs/squashfs) + $(call Image/mkfs/ubifs) + $(call Image/Checksum) compile-targets: install-targets: |