Makefile: don't run darcsver if we already have _version.py. Ought to fix building on non-darcs checkouts, and close #257

This commit is contained in:
Brian Warner 2008-01-04 17:25:46 -07:00
parent 1dd655c59e
commit d32f210917

View File

@ -81,8 +81,6 @@ make-version:
# #
#src/allmydata/_version.py: _darcs/patches #src/allmydata/_version.py: _darcs/patches
# $(MAKE) make-version # $(MAKE) make-version
#build: src/allmydata/_version.py
# ...
# #
# since that would update the embedded version string each time new darcs # since that would update the embedded version string each time new darcs
# patches were pulled, but 1) this would break non-darcs trees (i.e. building # patches were pulled, but 1) this would break non-darcs trees (i.e. building
@ -90,10 +88,13 @@ make-version:
# rule wouldn't be run frequently enought anyways. # rule wouldn't be run frequently enought anyways.
# #
# So instead, I'll just make sure that we update the version at least once # So instead, I'll just make sure that we update the version at least once
# when we first start using the tree, and again whenever an explicit 'make' # when we first start using the tree, and again whenever an explicit
# is run, since when things are confused, the first thing a developer does is # 'make-version' is run, since then at least the developer has some means to
# a 'make clean; make all'. We do this by putting an explicit call to # update things. It would be nice if 'make clean' deleted any
# make-version in the 'build' target. # automatically-generated _version.py too, so that 'make clean; make all'
# could be useable as a "what the heck is going on, get me back to a clean
# state', but we need 'make clean' to work on non-darcs trees without
# destroying useful information.
.built: .built:
$(MAKE) build $(MAKE) build
@ -101,8 +102,10 @@ make-version:
simple-build: build-auto-deps build simple-build: build-auto-deps build
build: src/allmydata/_version.py:
$(MAKE) make-version $(MAKE) make-version
build: src/allmydata/_version.py
$(PYTHON) ./setup.py build_ext -i $(INCLUDE_DIRS_ARG) $(LIBRARY_DIRS_ARG) $(PYTHON) ./setup.py build_ext -i $(INCLUDE_DIRS_ARG) $(LIBRARY_DIRS_ARG)
chmod +x bin/tahoe chmod +x bin/tahoe
@ -111,7 +114,7 @@ build:
# 'make install PREFIX=/usr/local/stow/tahoe-N.N' will do the same, but to # 'make install PREFIX=/usr/local/stow/tahoe-N.N' will do the same, but to
# a different location # a different location
install: install: src/allmydata/_version.py
ifdef PREFIX ifdef PREFIX
mkdir -p $(PREFIX) mkdir -p $(PREFIX)
$(PP) $(PYTHON) ./setup.py install \ $(PP) $(PYTHON) ./setup.py install \