mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-09 13:23:14 +00:00
This tool compies a source tree (whether it's scoutfs or not) into an offline scoutfs meta device. It has only those 2 parameters and does a single-process walk of the tree to restore all items while preservice as much of the metadata as possible. Signed-off-by: Hunter Shaffer <hunter.shaffer@versity.com> Signed-off-by: Auke Kok <auke.kok@versity.com>
68 lines
1.7 KiB
Makefile
68 lines
1.7 KiB
Makefile
CFLAGS := -Wall -O2 -Werror -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -I ../kmod/src
|
|
SHELL := /usr/bin/bash
|
|
|
|
# each binary command is built from a single .c file
|
|
BIN := src/createmany \
|
|
src/dumb_renameat2 \
|
|
src/dumb_setxattr \
|
|
src/handle_cat \
|
|
src/handle_fsetxattr \
|
|
src/bulk_create_paths \
|
|
src/stage_tmpfile \
|
|
src/find_xattrs \
|
|
src/create_xattr_loop \
|
|
src/fragmented_data_extents \
|
|
src/o_tmpfile_umask \
|
|
src/o_tmpfile_linkat \
|
|
src/mmap_stress \
|
|
src/mmap_validate \
|
|
src/parallel_restore \
|
|
src/restore_copy
|
|
|
|
DEPS := $(wildcard src/*.d)
|
|
|
|
all: $(BIN)
|
|
|
|
ifneq ($(DEPS),)
|
|
-include $(DEPS)
|
|
endif
|
|
|
|
src/mmap_stress: LIBS+=-lpthread
|
|
|
|
src/parallel_restore_cflags := ../utils/src/scoutfs_parallel_restore.a -lm
|
|
src/parallel_restore: ../utils/src/scoutfs_parallel_restore.a
|
|
src/restore_copy_cflags := ../utils/src/scoutfs_parallel_restore.a -lm
|
|
src/restore_copy : ../utils/src/scoutfs_parallel_restore.a
|
|
|
|
$(BIN): %: %.c Makefile
|
|
gcc $(CFLAGS) -MD -MP -MF $*.d $< -o $@ $(LIBS) $($(@)_cflags)
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
@rm -f $(BIN) $(DEPS)
|
|
|
|
#
|
|
# Make sure we only have all three items needed for each test: entry in
|
|
# sequence, test script in tests/, and output in golden/.
|
|
#
|
|
.PHONY: check-test-files
|
|
check-test-files:
|
|
@for t in $$(grep -v "^#" sequence); do \
|
|
test -e "tests/$$t" || \
|
|
echo "no test for list entry: $$t"; \
|
|
t=$${t%%.sh}; \
|
|
test -e "golden/$$t" || \
|
|
echo "no output for list entry: $$t"; \
|
|
done; \
|
|
for t in golden/*; do \
|
|
t=$$(basename "$$t"); \
|
|
grep -q "^$$t.sh$$" sequence || \
|
|
echo "output not in list: $$t"; \
|
|
done; \
|
|
for t in tests/*; do \
|
|
t=$$(basename "$$t"); \
|
|
test "$$t" == "list" && continue; \
|
|
grep -q "^$$t$$" sequence || \
|
|
echo "test not in list: $$t"; \
|
|
done
|