mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 06:06:32 +00:00
fs: don't pollute $(BUILD_DIR) with temp files
Currently, we create a bunch of temporary files in $(BUILD_DIR), while assembling the filesystem images. Move those files to their own sub-directory. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
b282f33cf8
commit
917508e6bc
11
fs/common.mk
11
fs/common.mk
@ -27,11 +27,12 @@
|
|||||||
# BR2_TARGET_ROOTFS_$(FSTYPE)_LZMA exist and are enabled, then the
|
# BR2_TARGET_ROOTFS_$(FSTYPE)_LZMA exist and are enabled, then the
|
||||||
# macro will automatically generate a compressed filesystem image.
|
# macro will automatically generate a compressed filesystem image.
|
||||||
|
|
||||||
FAKEROOT_SCRIPT = $(BUILD_DIR)/_fakeroot.fs
|
FS_DIR = $(BUILD_DIR)/buildroot-fs
|
||||||
FULL_DEVICE_TABLE = $(BUILD_DIR)/_device_table.txt
|
FAKEROOT_SCRIPT = $(FS_DIR)/fakeroot.fs
|
||||||
|
FULL_DEVICE_TABLE = $(FS_DIR)/device_table.txt
|
||||||
ROOTFS_DEVICE_TABLES = $(call qstrip,$(BR2_ROOTFS_DEVICE_TABLE) \
|
ROOTFS_DEVICE_TABLES = $(call qstrip,$(BR2_ROOTFS_DEVICE_TABLE) \
|
||||||
$(BR2_ROOTFS_STATIC_DEVICE_TABLE))
|
$(BR2_ROOTFS_STATIC_DEVICE_TABLE))
|
||||||
USERS_TABLE = $(BUILD_DIR)/_users_table.txt
|
USERS_TABLE = $(FS_DIR)/users_table.txt
|
||||||
ROOTFS_USERS_TABLES = $(call qstrip,$(BR2_ROOTFS_USERS_TABLES))
|
ROOTFS_USERS_TABLES = $(call qstrip,$(BR2_ROOTFS_USERS_TABLES))
|
||||||
|
|
||||||
# Since this function will be called from within an $(eval ...)
|
# Since this function will be called from within an $(eval ...)
|
||||||
@ -69,8 +70,8 @@ endif
|
|||||||
$$(BINARIES_DIR)/rootfs.$(1): target-finalize $$(ROOTFS_$(2)_DEPENDENCIES)
|
$$(BINARIES_DIR)/rootfs.$(1): target-finalize $$(ROOTFS_$(2)_DEPENDENCIES)
|
||||||
@$$(call MESSAGE,"Generating root filesystem image rootfs.$(1)")
|
@$$(call MESSAGE,"Generating root filesystem image rootfs.$(1)")
|
||||||
$$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),$$(call $$(hook))$$(sep))
|
$$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),$$(call $$(hook))$$(sep))
|
||||||
rm -f $$(FAKEROOT_SCRIPT)
|
rm -rf $(FS_DIR)
|
||||||
rm -f $$(USERS_TABLE)
|
mkdir -p $(FS_DIR)
|
||||||
echo '#!/bin/sh' > $$(FAKEROOT_SCRIPT)
|
echo '#!/bin/sh' > $$(FAKEROOT_SCRIPT)
|
||||||
echo "set -e" >> $$(FAKEROOT_SCRIPT)
|
echo "set -e" >> $$(FAKEROOT_SCRIPT)
|
||||||
echo "chown -h -R 0:0 $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
|
echo "chown -h -R 0:0 $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user