diff options
author | Felix Fietkau <nbd@nbd.name> | 2016-07-19 11:28:34 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-07-20 10:13:50 +0200 |
commit | 1c1244193a7224e8e6430d3571a0a85c44ff0e61 (patch) | |
tree | 6ceec6ab2d31eae04cc5890ec163d8e4199f9c0a /include/image.mk | |
parent | efdf7f6499de015f6443d5347b1aa771c189bbd1 (diff) | |
download | upstream-1c1244193a7224e8e6430d3571a0a85c44ff0e61.tar.gz upstream-1c1244193a7224e8e6430d3571a0a85c44ff0e61.tar.bz2 upstream-1c1244193a7224e8e6430d3571a0a85c44ff0e61.zip |
image.mk: replace some template abstraction with make pattern rules
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'include/image.mk')
-rw-r--r-- | include/image.mk | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/include/image.mk b/include/image.mk index a8d4bcffd9..bca5d1a7c3 100644 --- a/include/image.mk +++ b/include/image.mk @@ -216,7 +216,7 @@ ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),) define Image/mkfs/ubifs - ifneq ($($(PROFILE)_UBIFS_OPTS)$(UBIFS_OPTS),) + $(if $($(PROFILE)_UBIFS_OPTS)$(UBIFS_OPTS), $(STAGING_DIR_HOST)/bin/mkfs.ubifs \ $(if $($(PROFILE)_UBIFS_OPTS), \ $(shell echo $($(PROFILE)_UBIFS_OPTS)), \ @@ -230,13 +230,13 @@ ifneq ($(CONFIG_TARGET_ROOTFS_UBIFS),) --squash-uids \ -o $(KDIR)/root.ubifs \ -d $(TARGET_DIR) - endif + ) $(call Image/Build,ubifs) - ifneq ($($(PROFILE)_UBI_OPTS)$(UBI_OPTS),) + $(if $($(PROFILE)_UBI_OPTS)$(UBI_OPTS), $(if $(wildcard ./ubinize.cfg),$(call Image/mkfs/ubifs/generate,)) $(if $(wildcard ./ubinize-overlay.cfg),$(call Image/mkfs/ubifs/generate,-overlay)) - endif + ) $(if $(wildcard ./ubinize.cfg),$(call Image/Build,ubi)) endef endif @@ -283,14 +283,8 @@ define Image/Checksum ) endef -define BuildImage/mkfs - install-images: mkfs-$(1) - .PHONY: mkfs-$(1) - mkfs-$(1): kernel_prepare - $(Image/mkfs/$(1)) - $(KDIR)/root.$(1): mkfs-$(1) - -endef +$(KDIR)/root.%: kernel_prepare + $(Image/mkfs/$*) define Device/InitProfile PROFILES := $(PROFILE) @@ -544,9 +538,8 @@ define BuildImage $(foreach device,$(TARGET_DEVICES),$(call Device,$(device))) $(foreach device,$(LEGACY_DEVICES),$(call LegacyDevice,$(device))) - $(foreach fs,$(TARGET_FILESYSTEMS) $(fs-subtypes-y),$(call BuildImage/mkfs,$(fs))) - install-images: kernel_prepare + install-images: kernel_prepare $(foreach fs,$(TARGET_FILESYSTEMS) $(fs-subtypes-y),$(KDIR)/root.$(fs)) $(foreach fs,$(TARGET_FILESYSTEMS), $(call Image/Build,$(fs)) ) |