snapraid/Makefile.am

145 lines
2.8 KiB
Text
Raw Permalink Normal View History

2011-03-01 22:21:30 +01:00
bin_PROGRAMS = snapraid
check_PROGRAMS = testgen
snapraid_SOURCES = \
snapraid.c \
md5.c \
2011-03-06 22:52:50 +01:00
tommy.c \
util.c \
elem.c \
state.c \
scan.c \
sync.c \
check.c \
parity.c \
handle.c
2011-03-01 22:21:30 +01:00
noinst_HEADERS = \
portable.h \
2011-03-06 22:52:50 +01:00
util.h \
elem.h \
state.h \
parity.h \
handle.h \
2011-03-01 22:21:30 +01:00
md5.h \
tommyarray.h \
tommychain.h \
tommyhash.h \
tommyhashdyn.h \
tommylist.h \
tommytypes.h \
tommyarray.c \
tommyhash.c \
tommyhashdyn.c \
tommylist.c
testgen_SOURCES = \
testgen.c
EXTRA_DIST = \
autogen.sh \
noautomake.sh \
README AUTHORS HISTORY INSTALL COPYING \
2011-03-06 22:52:50 +01:00
snapraid.d snapraid.1 snapraid.txt snapraid.html \
2011-03-01 22:21:30 +01:00
test.conf \
snapraid.conf.example \
2011-03-01 22:21:30 +01:00
acinclude.m4
man_MANS = snapraid.1
2011-03-01 22:21:30 +01:00
clean-local:
rm -f valgrind.log callgrind.log
rm -rf test
2011-03-06 22:52:50 +01:00
maintainer-clean-local:
rm -f README AUTHORS HISTORY INSTALL
rm -f snapraid.1 snapraid.txt snapraid.html
CHECK = ./snapraid -v -c test.conf fix
2011-03-01 22:21:30 +01:00
check-local:
rm -rf test
mkdir test
mkdir test/disk1
mkdir test/disk2
mkdir test/disk3
2011-03-06 22:52:50 +01:00
echo Create some files, sync and check
2011-03-01 22:21:30 +01:00
./testgen 1 3 2000
2011-03-06 22:52:50 +01:00
./snapraid -c $(srcdir)/test.conf sync
./snapraid -c $(srcdir)/test.conf check
echo Create some more files, sync and check
2011-03-01 22:21:30 +01:00
./testgen 2 3 2000
2011-03-06 22:52:50 +01:00
./snapraid -c $(srcdir)/test.conf sync
./snapraid -c $(srcdir)/test.conf check
echo Delete some files, fix and check
2011-03-01 22:21:30 +01:00
rm test/disk1/a*
2011-03-06 22:52:50 +01:00
./snapraid -c $(srcdir)/test.conf check 2>/dev/null
./snapraid -c $(srcdir)/test.conf fix 2>/dev/null
./snapraid -c $(srcdir)/test.conf check
echo Delete the parity, fix and check
rm test/parity
./snapraid -c $(srcdir)/test.conf check 2>/dev/null
./snapraid -c $(srcdir)/test.conf fix 2>/dev/null
./snapraid -c $(srcdir)/test.conf check
echo Corrupt the parity, fix and check
dd if=/dev/zero of=test/parity bs=1024 count=1000 seek=1000 conv=notrunc
./snapraid -c $(srcdir)/test.conf check 2>/dev/null
./snapraid -c $(srcdir)/test.conf fix 2>/dev/null
./snapraid -c $(srcdir)/test.conf check
2011-03-01 22:21:30 +01:00
echo Success!
valgrind:
valgrind \
--tool=memcheck \
--track-origins=yes \
--read-var-info=yes \
--leak-check=full \
-v $(CHECK) \
2> valgrind.log
tail valgrind.log
callgrind:
valgrind \
--tool=callgrind \
--dump-instr=yes \
--trace-jump=yes \
-v $(CHECK) \
2> callgrind.log
tail callgrind.log
cachegrind:
valgrind \
--tool=cachegrind \
-v $(CHECK) \
2> cachegrind.log
tail cachegrind.log
2011-03-06 22:52:50 +01:00
# Rules for documentation
%.1 : %.d
advd2 man < $(srcdir)/$< > $@
%.txt : %.d
advd2 txt < $(srcdir)/$< | todos > $@
%.html : %.d
advd2 html < $(srcdir)/$< > $@
%.hh : %.d
advd2 frame < $(srcdir)/$< > $@
# Windows distribution
DISTWIN = \
snapraid.txt \
snapraid.html \
2011-03-12 10:09:59 +01:00
snapraid.exe
2011-03-06 22:52:50 +01:00
distwindows: $(DISTWIN)
rm -f $(PACKAGE)-$(VERSION)-windows-x86.zip
mkdir tmp
cp $(DISTWIN) tmp
cd tmp && zip -r ../$(PACKAGE)-$(VERSION)-windows-x86.zip *
rm -r tmp