Files
Ciro Santilli 57dbe81f33 lkmc_many_files: create package to test a rootfs with many files
Automatically pick up packages from under packages/ into BR2_EXTERNAL.

Move many subdirectory READMEs into the toplevel and link to toplevel from those subreadmes instead.
2018-06-17 11:36:56 +01:00

31 lines
947 B
Makefile

################################################################################
#
# lkmc_many_files
#
################################################################################
LKMC_MANY_FILES_VERSION = 1.0
LKMC_MANY_FILES_SITE = $(BR2_EXTERNAL_LKMC_MANY_FILES_PATH)
LKMC_MANY_FILES_SITE_METHOD = local
define LKMC_MANY_FILES_BUILD_CMDS
# D contains the source code of this package.
# TARGET_CONFIGURE_OPTS contains several common options such as CFLAGS and LDFLAGS.
$(MAKE) -C '$(@D)' $(TARGET_CONFIGURE_OPTS)
endef
define LKMC_MANY_FILES_INSTALL_TARGET_CMDS
# Anything put inside TARGET_DIR will end up on the guest relative to the root directory.
i=0; \
while [ $$i -le 128 ]; do \
j=0; \
while [ $$j -le 128 ]; do \
$(INSTALL) -D -m 0755 $(@D)/lkmc_many_files.out $(TARGET_DIR)/lkmc_many_files/$${i}_$${j}.out; \
j=$$(($$j+1)); \
done; \
i=$$(($$i+1)); \
done
endef
$(eval $(generic-package))