From: Brian Warner Date: Thu, 3 Jan 2008 21:33:33 +0000 (-0700) Subject: Makefile: run 'make-version' at least once, in the 'build' target, to make sure we... X-Git-Tag: allmydata-tahoe-0.7.0~42 X-Git-Url: https://git.rkrishnan.org/%5B/%5D%20/uri/index.php?a=commitdiff_plain;h=65a8a8c405b97cbcb7a21d321fba39ae92a33b08;p=tahoe-lafs%2Ftahoe-lafs.git Makefile: run 'make-version' at least once, in the 'build' target, to make sure we populate src/allmydata/_version.py --- diff --git a/Makefile b/Makefile index f9239ed4..43b5b103 100644 --- a/Makefile +++ b/Makefile @@ -73,13 +73,36 @@ PP=PYTHONPATH="$(SRCPATH)$(PATHSEP)$(PYTHONPATH)$(PATHSEP)$(EGGSPATH)" make-version: $(PYTHON) ./setup.py darcsver +# We want src/allmydata/_version.py to be up-to-date, but it's a fairly +# expensive operation (about 6 seconds on a just-before-0.7.0 tree, probably +# because of the 332 patches since the last tag), and we've removed the need +# for an explicit 'build' step by removing the C code from src/allmydata and +# by running everything in place. It would be neat to do: +# +#src/allmydata/_version.py: _darcs/patches +# $(MAKE) make-version +#build: src/allmydata/_version.py +# ... +# +# 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 +# from an exported tarball), and 2) without an obligatory 'build' step this +# rule wouldn't be run frequently enought anyways. +# +# 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' +# is run, since when things are confused, the first thing a developer does is +# a 'make clean; make all'. We do this by putting an explicit call to +# make-version in the 'build' target. + .built: $(MAKE) build touch .built simple-build: build-auto-deps build -build: +build: + $(MAKE) make-version $(PYTHON) ./setup.py build_ext -i $(INCLUDE_DIRS_ARG) $(LIBRARY_DIRS_ARG) chmod +x bin/tahoe