$(HOST_DIR)/bin/mkfs.axfs -s -a $(TARGET_DIR) $@
endef
-$(eval $(call ROOTFS_TARGET,axfs))
+$(eval $(rootfs))
$(HOST_DIR)/bin/create_compressed_fs - 65536 > $@
endef
-$(eval $(call ROOTFS_TARGET,cloop))
+$(eval $(rootfs))
# Since this function will be called from within an $(eval ...)
# all variable references except the arguments must be $$-quoted.
-define ROOTFS_TARGET_INTERNAL
+define inner-rootfs
# extra deps
ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs \
endef
-define ROOTFS_TARGET
- $(call ROOTFS_TARGET_INTERNAL,$(1),$(call UPPERCASE,$(1)))
-endef
+# $(pkgname) also works well to return the filesystem name
+rootfs = $(call inner-rootfs,$(pkgname),$(call UPPERCASE,$(pkgname)))
include $(sort $(wildcard fs/*/*.mk))
ROOTFS_CPIO_POST_GEN_HOOKS += ROOTFS_CPIO_UBOOT_MKIMAGE
endif
-$(eval $(call ROOTFS_TARGET,cpio))
+$(eval $(rootfs))
ROOTFS_CRAMFS_DEPENDENCIES = host-cramfs
-$(eval $(call ROOTFS_TARGET,cramfs))
+$(eval $(rootfs))
ROOTFS_EXT2_POST_GEN_HOOKS += ROOTFS_EXT2_SYMLINK
endif
-$(eval $(call ROOTFS_TARGET,ext2))
+$(eval $(rootfs))
ROOTFS_ISO9660_POST_GEN_HOOKS += ROOTFS_ISO9660_GEN_HYBRID
endif
-$(eval $(call ROOTFS_TARGET,iso9660))
+$(eval $(rootfs))
endef
endif
-$(eval $(call ROOTFS_TARGET,jffs2))
+$(eval $(rootfs))
$(HOST_DIR)/bin/genromfs -d $(TARGET_DIR) -f $@
endef
-$(eval $(call ROOTFS_TARGET,romfs))
+$(eval $(rootfs))
$(HOST_DIR)/bin/mksquashfs $(TARGET_DIR) $@ $(ROOTFS_SQUASHFS_ARGS)
endef
-$(eval $(call ROOTFS_TARGET,squashfs))
+$(eval $(rootfs))
tar $(TAR_OPTS) -cf $@ --null --no-recursion -T - --numeric-owner)
endef
-$(eval $(call ROOTFS_TARGET,tar))
+$(eval $(rootfs))
rm $(BUILD_DIR)/ubinize.cfg
endef
-$(eval $(call ROOTFS_TARGET,ubi))
+$(eval $(rootfs))
$(HOST_DIR)/sbin/mkfs.ubifs -d $(TARGET_DIR) $(UBIFS_OPTS) -o $@
endef
-$(eval $(call ROOTFS_TARGET,ubifs))
+$(eval $(rootfs))
$(HOST_DIR)/bin/mkyaffs2 --all-root $(TARGET_DIR) $@
endef
-$(eval $(call ROOTFS_TARGET,yaffs2))
+$(eval $(rootfs))