--exclude="proc/*" \
--exclude="tmp/*" \
--exclude="__pycache__" \
+ $(if $(1),--exclude-from=$(1)) \
--files-from=-
# Takes a tarball and extracts it in the target directory
# Copies all files on a rootfile into the given directory
define COPY_FILES
# Copy all files from $(1) to $(2) ($(3))
+ # $4 = rootfile to write out
+ # $5 = exclude
$(call COLLECT_FILES,$(1),$(3),$(4)) | \
- $(call __FILES_IN) | \
+ $(call __FILES_IN,$(5)) | \
$(call __FILES_OUT,$(2))
# Strip everything, except a few things
rm -rf $(DIR_TMP)/root && mkdir -p $(DIR_TMP)/root
# Copy all files that we want
- $(call COPY_FILES,$(DIR_SRC)/config/rootfiles/common,$(DIR_TMP)/root,)
+ $(call COPY_FILES,$(DIR_SRC)/config/rootfiles/common,$(DIR_TMP)/root,,,)
# Create mount points
$(call CREATE_MOUNTPOINTS,$(DIR_TMP)/root)
@rm -rf $(ARCHIVE_DIR) && mkdir -pv $(ARCHIVE_DIR) $(ARCHIVE_TMP)
# Generate the archive and write out the rootfile
- $(call COPY_FILES,$(DIR_SRC)/config/rootfiles/core/$(CORE)/filelists,$(ARCHIVE_TMP),,$(ARCHIVE_DIR)/ROOTFILES)
+ $(call COPY_FILES,$(DIR_SRC)/config/rootfiles/core/$(CORE)/filelists,$(ARCHIVE_TMP),,$(ARCHIVE_DIR)/ROOTFILES,$(DIR_SRC)/config/rootfiles/core/$(CORE)/exclude)
# Create the archive
$(call COMPRESS_XZ,$(ARCHIVE_TMP),$(ARCHIVE_DIR)/files.tar.xz)