]> arthur.barton.de Git - bup.git/blob - Makefile
Add 'bup init' command.
[bup.git] / Makefile
1 CFLAGS=-Wall -g -O2 -Werror -I/usr/include/python2.5 -g -fPIC
2
3 default: all
4
5 all: bup-split bup-join bup-save bup-init bup randomgen chashsplit.so
6
7 randomgen: randomgen.o
8
9 chashsplit.so: chashsplitmodule.o
10         $(CC) -shared -o $@ $<
11         
12 runtests: all
13         ./wvtest.py $(wildcard t/t*.py)
14         
15 runtests-cmdline: all
16         @echo "Testing \"$@\" in Makefile:"
17         ./bup split --bench -b <testfile1 >tags1.tmp
18         ./bup split -vvvv -b testfile2 >tags2.tmp
19         ./bup split -t testfile2 >tags2t.tmp
20         ./bup split -c testfile2 >tags2c.tmp
21         diff -u tags1.tmp tags2.tmp || true
22         wc -c testfile1 testfile2
23         wc -l tags1.tmp tags2.tmp
24         ./bup join $$(cat tags1.tmp) >out1.tmp
25         ./bup join <tags2.tmp >out2.tmp
26         ./bup join <tags2t.tmp >out2t.tmp
27         ./bup join <tags2c.tmp >out2c.tmp
28         diff -u testfile1 out1.tmp
29         diff -u testfile2 out2.tmp
30         diff -u testfile2 out2t.tmp
31         diff -u testfile2 out2c.tmp
32         
33 test: all runtests-cmdline
34         ./wvtestrun $(MAKE) runtests
35
36 %: %.o
37         gcc -o $@ $< $(LDFLAGS) $(LIBS)
38         
39 bup: bup.py
40         rm -f $@
41         ln -s $^ $@
42         
43 bup-%: cmd-%.py
44         rm -f $@
45         ln -s $^ $@
46         
47 bup-%: cmd-%.sh
48         rm -f $@
49         ln -s $^ $@
50         
51 %.o: %.c
52         gcc -c -o $@ $^ $(CPPFLAGS) $(CFLAGS)
53
54 clean:
55         rm -f *.o *.so *~ .*~ *.pyc */*.pyc */*~ \
56                 bup bup-split bup-join bup-save bup-init randomgen \
57                 out[12] out2[tc] tags[12] tags2[tc] *.tmp