From b6afefb5d12dbed4801272dae3048588dfc1cb9a Mon Sep 17 00:00:00 2001 From: fishsoupisgood Date: Sat, 12 May 2018 17:10:22 +0100 Subject: first working version --- src/Makefile.am | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 src/Makefile.am (limited to 'src/Makefile.am') diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..da2463f --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,66 @@ + +CPROTO=cproto +AM_CPPFLAGS = ${LIBE2P_INC} ${LIBEXT2FS_INC} ${LIBCOM_ERR_INC} ${LIBDB_INC} + +HSRCS=project.h prototypes.h + +noinst_HEADERS=${HSRCS} +bin_PROGRAMS = ext_clone + +CSRCS= clone_data.c clone_ea.c clone_extents.c clone_inode.c ea_map.c ext_clone.c stats.c clone_fs.c zap_fs.c zap_inode.c + +ext_clone_SOURCES = ${CSRCS} +ext_clone_LDADD = ${LIBE2P_LIB} ${LIBEXT2FS_LIB} ${LIBCOM_ERR_LIB} ${LIBDB_LIB} -lm + +AM_CFLAGS=-g -Wall + +ext_clone_LDFLAGS = --static + +BUILT_SOURCES = + +src.img: + umount src || true + mkdir -p src + rm -f src.img + truncate -s 128M src.img + mkfs.ext4 -b 4096 -O 64bit -E stride=16,stripe-width=112 src.img + mount src.img src + (cd src && git clone git://git.panaceas.org/tools/sympathy ) + (cd src && truncate -s 8g holey && dd if=/dev/zero of=holey conv=notrunc,nocreat bs=1024k seek=4000 count=1 ) + (cd src && ln holey linky) + (cd src && touch empty) + ls -lZR src + ls -lR src + umount src + rmdir src + + + +protos: + echo > prototypes.h + ${CPROTO} -v ${INCLUDES} ${CSRCS} > prototypes.tmp + mv -f prototypes.tmp prototypes.h + +test: ext_clone src.img + umount dst || true + umount src || true + truncate -s 256M dst.img + mkfs.ext4 -F dst.img -b 4096 -O 64bit -E stride=16,stripe-width=96 + ext_clone -s src.img -d dst.img + e2fsck -f -y dst.img || true + echo "stat <123>" > cmd + debugfs -f cmd src.img > src.txt + debugfs -f cmd dst.img > dst.txt + diff -uN src.txt dst.txt || true + mkdir -p src + mkdir -p dst + mount -o ro src.img src + mount -o ro dst.img dst + rsync -varX -n src/ dst/ + umount dst + umount src + rmdir src + rmdir dst + +tidy: + astyle -A3 -s2 --attach-extern-c -L -c -w -Y -m0 -f -p -H -U -k3 -xj -xd ${CSRCS} ${HSRCS} -- cgit v1.2.3