-CFLAGS=-Wall -g -O2 -Werror -I/usr/include/python2.5 -g -fwrapv -fPIC
+CFLAGS=-Wall -g -O2 -Werror -I/usr/include/python2.5 -g -fPIC
default: all
-all: hashsplit hashjoin datagen hashsplit.so
+all: bup-split bup-join bup-save bup-init bup-server bup randomgen chashsplit.so
-hashsplit: hashsplit.o
+randomgen: randomgen.o
-datagen: datagen.o
-
-hashjoin: hashjoin.sh
-
-hashsplit.so: hashsplitmodule.o
- $(CC) -shared -Wl,-Bsymbolic-functions -o $@ $<
-
-test: all
- ./hashsplit.py <testfile1 >tags1
- ./hashsplit.py <testfile2 >tags2
- diff -u tags1 tags2 || true
- wc -c testfile1 testfile2
- wc -l tags1 tags2
- ./hashjoin <tags1 >out1
- ./hashjoin <tags2 >out2
- diff -u testfile1 out1
- diff -u testfile2 out2
+chashsplit.so: chashsplitmodule.o
+ $(CC) -shared -o $@ $<
+
+runtests: all
+ ./wvtest.py $(wildcard t/t*.py)
+
+runtests-cmdline: all
+ ./test-sh
+
+test: all runtests-cmdline
+ ./wvtestrun $(MAKE) runtests
%: %.o
gcc -o $@ $< $(LDFLAGS) $(LIBS)
-%: %.sh
+bup: bup.py
+ rm -f $@
+ ln -s $^ $@
+
+bup-%: cmd-%.py
+ rm -f $@
+ ln -s $^ $@
+
+bup-%: cmd-%.sh
rm -f $@
ln -s $^ $@
gcc -c -o $@ $^ $(CPPFLAGS) $(CFLAGS)
clean:
- rm -f *.o *.so *~ hashsplit hashjoin hsplit hjoin datagen *.pyc \
- out[12] tags[12] .*~
+ rm -f *.o *.so *~ .*~ *.pyc */*.pyc */*~ \
+ bup bup-* randomgen \
+ out[12] out2[tc] tags[12] tags2[tc]
+ rm -rf *.tmp