summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2017-12-28 11:40:32 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2018-01-03 21:58:07 +0100
commitb6842c40977886058f3471973397872c880a0ddc (patch)
tree4fcb6516c80eb8c516ab11d56b6b1af04c65570d
parent9fc21664e850f0999c4aa358235ab2b73f4bfb60 (diff)
downloadbuildroot-b6842c40977886058f3471973397872c880a0ddc.tar.gz
buildroot-b6842c40977886058f3471973397872c880a0ddc.zip
fs: make it behave a bit more like the package infra
Currently, to register a filesystem, one has to call: $(eval $(call ROOTFS_TARGET,blabla)) This is very unlike the package infrastructure, where the name of the package is automatically guessed by the infra. It turns out that we can now do that for the filesystem infra too. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--fs/axfs/axfs.mk2
-rw-r--r--fs/cloop/cloop.mk2
-rw-r--r--fs/common.mk7
-rw-r--r--fs/cpio/cpio.mk2
-rw-r--r--fs/cramfs/cramfs.mk2
-rw-r--r--fs/ext2/ext2.mk2
-rw-r--r--fs/iso9660/iso9660.mk2
-rw-r--r--fs/jffs2/jffs2.mk2
-rw-r--r--fs/romfs/romfs.mk2
-rw-r--r--fs/squashfs/squashfs.mk2
-rw-r--r--fs/tar/tar.mk2
-rw-r--r--fs/ubi/ubi.mk2
-rw-r--r--fs/ubifs/ubifs.mk2
-rw-r--r--fs/yaffs2/yaffs.mk2
14 files changed, 16 insertions, 17 deletions
diff --git a/fs/axfs/axfs.mk b/fs/axfs/axfs.mk
index 6c795d7062..4b93df55c0 100644
--- a/fs/axfs/axfs.mk
+++ b/fs/axfs/axfs.mk
@@ -10,4 +10,4 @@ define ROOTFS_AXFS_CMD
$(HOST_DIR)/bin/mkfs.axfs -s -a $(TARGET_DIR) $@
endef
-$(eval $(call ROOTFS_TARGET,axfs))
+$(eval $(rootfs))
diff --git a/fs/cloop/cloop.mk b/fs/cloop/cloop.mk
index cbfc79b0d1..17749c5a3b 100644
--- a/fs/cloop/cloop.mk
+++ b/fs/cloop/cloop.mk
@@ -11,4 +11,4 @@ define ROOTFS_CLOOP_CMD
$(HOST_DIR)/bin/create_compressed_fs - 65536 > $@
endef
-$(eval $(call ROOTFS_TARGET,cloop))
+$(eval $(rootfs))
diff --git a/fs/common.mk b/fs/common.mk
index b06e9b5597..98232f0b9f 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -37,7 +37,7 @@ ROOTFS_USERS_TABLES = $(call qstrip,$(BR2_ROOTFS_USERS_TABLES))
# 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 \
@@ -128,8 +128,7 @@ endif
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))
diff --git a/fs/cpio/cpio.mk b/fs/cpio/cpio.mk
index c68e0bfb97..aa4d947fa5 100644
--- a/fs/cpio/cpio.mk
+++ b/fs/cpio/cpio.mk
@@ -40,4 +40,4 @@ endef
ROOTFS_CPIO_POST_GEN_HOOKS += ROOTFS_CPIO_UBOOT_MKIMAGE
endif
-$(eval $(call ROOTFS_TARGET,cpio))
+$(eval $(rootfs))
diff --git a/fs/cramfs/cramfs.mk b/fs/cramfs/cramfs.mk
index 85b98b8ccd..f880871935 100644
--- a/fs/cramfs/cramfs.mk
+++ b/fs/cramfs/cramfs.mk
@@ -16,4 +16,4 @@ endef
ROOTFS_CRAMFS_DEPENDENCIES = host-cramfs
-$(eval $(call ROOTFS_TARGET,cramfs))
+$(eval $(rootfs))
diff --git a/fs/ext2/ext2.mk b/fs/ext2/ext2.mk
index 12b87a722c..6bb4b1c7f8 100644
--- a/fs/ext2/ext2.mk
+++ b/fs/ext2/ext2.mk
@@ -43,4 +43,4 @@ endef
ROOTFS_EXT2_POST_GEN_HOOKS += ROOTFS_EXT2_SYMLINK
endif
-$(eval $(call ROOTFS_TARGET,ext2))
+$(eval $(rootfs))
diff --git a/fs/iso9660/iso9660.mk b/fs/iso9660/iso9660.mk
index 38ed3cd970..207c6aa39f 100644
--- a/fs/iso9660/iso9660.mk
+++ b/fs/iso9660/iso9660.mk
@@ -144,4 +144,4 @@ endef
ROOTFS_ISO9660_POST_GEN_HOOKS += ROOTFS_ISO9660_GEN_HYBRID
endif
-$(eval $(call ROOTFS_TARGET,iso9660))
+$(eval $(rootfs))
diff --git a/fs/jffs2/jffs2.mk b/fs/jffs2/jffs2.mk
index 9a36a75ff4..740ab3e03d 100644
--- a/fs/jffs2/jffs2.mk
+++ b/fs/jffs2/jffs2.mk
@@ -49,4 +49,4 @@ define ROOTFS_JFFS2_CMD
endef
endif
-$(eval $(call ROOTFS_TARGET,jffs2))
+$(eval $(rootfs))
diff --git a/fs/romfs/romfs.mk b/fs/romfs/romfs.mk
index eded91df0a..163751b4e2 100644
--- a/fs/romfs/romfs.mk
+++ b/fs/romfs/romfs.mk
@@ -10,4 +10,4 @@ define ROOTFS_ROMFS_CMD
$(HOST_DIR)/bin/genromfs -d $(TARGET_DIR) -f $@
endef
-$(eval $(call ROOTFS_TARGET,romfs))
+$(eval $(rootfs))
diff --git a/fs/squashfs/squashfs.mk b/fs/squashfs/squashfs.mk
index 7de7f51af1..51abd5d7d0 100644
--- a/fs/squashfs/squashfs.mk
+++ b/fs/squashfs/squashfs.mk
@@ -24,4 +24,4 @@ define ROOTFS_SQUASHFS_CMD
$(HOST_DIR)/bin/mksquashfs $(TARGET_DIR) $@ $(ROOTFS_SQUASHFS_ARGS)
endef
-$(eval $(call ROOTFS_TARGET,squashfs))
+$(eval $(rootfs))
diff --git a/fs/tar/tar.mk b/fs/tar/tar.mk
index 0e3eacbedf..e39c2fdbf1 100644
--- a/fs/tar/tar.mk
+++ b/fs/tar/tar.mk
@@ -11,4 +11,4 @@ define ROOTFS_TAR_CMD
tar $(TAR_OPTS) -cf $@ --null --no-recursion -T - --numeric-owner)
endef
-$(eval $(call ROOTFS_TARGET,tar))
+$(eval $(rootfs))
diff --git a/fs/ubi/ubi.mk b/fs/ubi/ubi.mk
index b71a555efb..c78feda5a3 100644
--- a/fs/ubi/ubi.mk
+++ b/fs/ubi/ubi.mk
@@ -29,4 +29,4 @@ define ROOTFS_UBI_CMD
rm $(BUILD_DIR)/ubinize.cfg
endef
-$(eval $(call ROOTFS_TARGET,ubi))
+$(eval $(rootfs))
diff --git a/fs/ubifs/ubifs.mk b/fs/ubifs/ubifs.mk
index 4f45acdc4a..2cfc397aca 100644
--- a/fs/ubifs/ubifs.mk
+++ b/fs/ubifs/ubifs.mk
@@ -27,4 +27,4 @@ define ROOTFS_UBIFS_CMD
$(HOST_DIR)/sbin/mkfs.ubifs -d $(TARGET_DIR) $(UBIFS_OPTS) -o $@
endef
-$(eval $(call ROOTFS_TARGET,ubifs))
+$(eval $(rootfs))
diff --git a/fs/yaffs2/yaffs.mk b/fs/yaffs2/yaffs.mk
index 30570735fa..9cba27af70 100644
--- a/fs/yaffs2/yaffs.mk
+++ b/fs/yaffs2/yaffs.mk
@@ -10,4 +10,4 @@ define ROOTFS_YAFFS2_CMD
$(HOST_DIR)/bin/mkyaffs2 --all-root $(TARGET_DIR) $@
endef
-$(eval $(call ROOTFS_TARGET,yaffs2))
+$(eval $(rootfs))
OpenPOWER on IntegriCloud