5 INSTDIR=$(BASE)/instdir
8 ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
9 EXTRA_SETUP_ARGS=build -c mingw32
10 PATHDIR := $(shell cygpath -m $(INSTDIR))
11 INSTDIR := $(shell cygpath -w $(INSTDIR))
12 TRIAL=$(PYTHON) `cygpath -m \`type -p trial\` `
13 ifneq ($(PYTHONPATH),)
14 PYTHONPATH := $(shell cygpath -m $(PYTHONPATH))
25 PATHSEP=$(shell python -c 'import os; print os.pathsep')
26 ifneq ($(PYTHONPATH),)
27 PP=PYTHONPATH=$(PYTHONPATH)$(PATHSEP)$(PATHDIR)
29 PP=PYTHONPATH=$(PATHDIR)
33 build: build-pyfec build-Crypto
34 $(PYTHON) setup.py $(EXTRA_SETUP_ARGS) install --install-lib="$(INSTDIR)" --install-scripts="$(INSTDIR)/scripts"
37 cd src/pyfec && $(PYTHON) ./setup.py $(EXTRA_SETUP_ARGS) install --install-lib="$(INSTDIR)" --install-scripts="$(INSTDIR)/scripts"
40 $(PP) $(PYTHON) src/pyfec/fec/test/test_pyfec.py
43 cd src/pyfec && python ./setup.py clean
47 cd src/Crypto && $(PYTHON) ./setup.py $(EXTRA_SETUP_ARGS) install --install-lib="$(INSTDIR)" --install-scripts="$(INSTDIR)/scripts"
50 cd src/Crypto && python ./setup.py clean
53 .PHONY: run-queen run-client test
56 cd queen-basedir && PYTHONPATH=.. twistd -noy ../queen.tac
59 cd client-basedir && $(PP) twistd -noy ../client.tac
62 cd client-basedir2 && PYTHONPATH=.. twistd -noy ../client.tac
64 cd client-basedir3 && PYTHONPATH=.. twistd -noy ../client.tac
70 # use 'make test REPORTER=--reporter=bwverbose' from buildbot, to supress the
71 # ansi color sequences
73 $(PP) $(TRIAL) $(REPORTER) $(TEST)
77 $(PP) $(TRIAL) --reporter=bwverbose-figleaf $(TEST)
80 $(PP) $(PYTHON) misc/figleaf2html -d coverage-html -r $(INSTDIR)
81 @echo "now point your browser at coverage-html/index.html"
82 # after doing test-figleaf and figleaf-output, point your browser at
83 # coverage-html/index.html
85 # this command is meant to be run with an
88 rsync -a coverage-html/ $(UPLOAD_TARGET)
91 echo "this target is meant to be run with UPLOAD_TARGET=host:/path/"
96 $(PP) $(PYTHON) misc/figleaf2el.py .figleaf $(INSTDIR)
99 pyflakes src/allmydata
103 @find src -name '*.py' |grep -v /build/ |wc --lines
105 @cat `find src -name '*.py' |grep -v /build/` |wc --lines
107 @grep TODO `find src -name '*.py' |grep -v /build/` | wc --lines
110 $(PP) $(PYTHON) src/allmydata/test/check_memory.py
112 clean: clean-pyfec clean-Crypto
118 mkdir -p queen-basedir
119 mkdir -p client-basedir
120 mkdir -p client-basedir2
121 mkdir -p client-basedir/storage
122 mkdir -p client-basedir2/storage
124 DEBVER=`head -1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*$$/\1/' | sed -e 's/^\([0-9]\+\.[0-9]\+\.[0-9]\+\).*$$/\1/'`
125 DEBSTRING=$(DEBVER)-T`date +%s`
126 DEBCOMMENTS="'make deb' build"
132 .PHONY: setup-dapper setup-sid setup-feisty
133 .PHONY: deb-dapper deb-sid deb-feisty
134 .PHONY: increment-deb-version
135 .PHONY: deb-dapper-head deb-sid-head deb-feisty-head
139 ln -s dapper/debian debian
140 chmod a+x debian/rules
144 ln -s sid/debian debian
145 chmod a+x debian/rules
149 ln -s feisty/debian debian
150 chmod a+x debian/rules
153 deb-dapper: setup-dapper
154 fakeroot debian/rules binary
156 fakeroot debian/rules binary
157 deb-feisty: setup-feisty
158 fakeroot debian/rules binary
160 increment-deb-version:
161 debchange --newversion $(DEBSTRING) $(DEBCOMMENTS)
162 deb-dapper-head: setup-dapper increment-deb-version
163 fakeroot debian/rules binary
164 deb-sid-head: setup-sid increment-deb-version
165 fakeroot debian/rules binary
166 deb-feisty-head: setup-feisty increment-deb-version
167 fakeroot debian/rules binary