mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-30 16:13:58 +00:00
port GNUmakefile to Windows, cygwin, Linux, MacOSX/PPC, MacOSX/Intel
And of course it may well work on lots of other modern unixes, too, especially the more GNUish ones.
This commit is contained in:
parent
c8ac7a1a11
commit
08bdde9e4a
53
GNUmakefile
53
GNUmakefile
@ -3,31 +3,45 @@ default: build
|
|||||||
BASE=$(shell pwd)
|
BASE=$(shell pwd)
|
||||||
PYTHON=python
|
PYTHON=python
|
||||||
INSTDIR=$(BASE)/instdir
|
INSTDIR=$(BASE)/instdir
|
||||||
|
PATHSEP=$(shell python -c 'import os ; print os.pathsep')
|
||||||
|
TRIALPATH=$(shell which trial.py)
|
||||||
|
ifeq ($(TRIALPATH),)
|
||||||
|
TRIALPATH=$(shell which trial)
|
||||||
|
endif
|
||||||
|
|
||||||
UNAME=$(shell uname)
|
|
||||||
ifeq ($(findstring CYGWIN,$(UNAME)),CYGWIN)
|
|
||||||
EXTRA_SETUP_ARGS=build -c mingw32
|
|
||||||
PATHDIR := $(shell cygpath -m $(INSTDIR))
|
|
||||||
INSTDIR := $(shell cygpath -w $(INSTDIR))
|
|
||||||
TRIAL=$(PYTHON) `cygpath -m \`type -p trial\` `
|
|
||||||
ifneq ($(PYTHONPATH),)
|
|
||||||
PYTHONPATH := $(shell cygpath -m $(PYTHONPATH))
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
EXTRA_SETUP_ARGS=
|
EXTRA_SETUP_ARGS=
|
||||||
PATHDIR := $(INSTDIR)
|
REACTOR=poll
|
||||||
TRIAL=trial
|
|
||||||
|
PLAT = $(strip $(shell python -c "import sys ; print sys.platform"))
|
||||||
|
ifeq ($(PLAT),cygwin)
|
||||||
|
# The platform is Windows with cygwin build tools and the cygwin Python interpreter.
|
||||||
|
INSTDIR := $(shell cygpath -u $(INSTDIR))
|
||||||
|
else
|
||||||
|
ifeq ($(PLAT),win32)
|
||||||
|
# The platform is Windows with cygwin build tools and the native Python interpreter.
|
||||||
|
EXTRA_SETUP_ARGS=build -c mingw32
|
||||||
|
REACTOR=iocp
|
||||||
|
INSTDIR := $(shell cygpath -w $(INSTDIR))
|
||||||
|
TRIALPATH := $(shell cygpath -w $(TRIALPATH))
|
||||||
|
ifneq ($(PYTHONPATH),)
|
||||||
|
PYTHONPATH := $(shell cygpath -w $(PYTHONPATH))
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(PYTHONPATH),)
|
||||||
|
PYTHONPATH := "$(PYTHONPATH)$(PATHSEP)$(INSTDIR)"
|
||||||
|
else
|
||||||
|
PYTHONPATH := "$(INSTDIR)"
|
||||||
|
endif
|
||||||
|
|
||||||
|
TRIAL=$(PYTHON) -u "$(TRIALPATH)" --reactor=$(REACTOR)
|
||||||
|
# $(error $(TRIAL))
|
||||||
|
|
||||||
show-instdir:
|
show-instdir:
|
||||||
@echo $(INSTDIR)
|
@echo $(INSTDIR)
|
||||||
|
|
||||||
PATHSEP=$(shell python -c 'import os; print os.pathsep')
|
PP=PYTHONPATH=$(PYTHONPATH)
|
||||||
ifneq ($(PYTHONPATH),)
|
|
||||||
PP=PYTHONPATH=$(PYTHONPATH)$(PATHSEP)$(PATHDIR)
|
|
||||||
else
|
|
||||||
PP=PYTHONPATH=$(PATHDIR)
|
|
||||||
endif
|
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: build-pyfec build-Crypto
|
build: build-pyfec build-Crypto
|
||||||
@ -63,8 +77,9 @@ run-client2:
|
|||||||
run-client3:
|
run-client3:
|
||||||
cd client-basedir3 && PYTHONPATH=.. twistd -noy ../client.tac
|
cd client-basedir3 && PYTHONPATH=.. twistd -noy ../client.tac
|
||||||
|
|
||||||
|
ifeq ($(TEST),)
|
||||||
TEST=allmydata fec
|
TEST=allmydata fec
|
||||||
|
endif
|
||||||
REPORTER=
|
REPORTER=
|
||||||
|
|
||||||
# use 'make test REPORTER=--reporter=bwverbose' from buildbot, to supress the
|
# use 'make test REPORTER=--reporter=bwverbose' from buildbot, to supress the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user