aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-06-05 01:13:39 +0100
committerMatthew Wild <mwild1@gmail.com>2009-06-05 01:13:39 +0100
commit198b2b72c806f0c93a964ff18e1cc1800a48760b (patch)
tree1954d5ae9e78daa0f052f33034e479df9ee0fedb
parent8805419906429201c604efca3f6a7e82c6bd5503 (diff)
downloadprosody-198b2b72c806f0c93a964ff18e1cc1800a48760b.tar.gz
prosody-198b2b72c806f0c93a964ff18e1cc1800a48760b.zip
Makefile: Experimental support for recording the version of an installed Prosody
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 3a3ea9ef..93549243 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ INSTALLEDCONFIG = $(SYSCONFDIR)
INSTALLEDMODULES = $(PREFIX)/lib/prosody/modules
INSTALLEDDATA = $(DATADIR)
-all: prosody.install prosodyctl.install prosody.cfg.lua.install
+all: prosody.install prosodyctl.install prosody.cfg.lua.install prosody.version
$(MAKE) -C util-src install
install: prosody.install prosodyctl.install prosody.cfg.lua.install util/encodings.so util/encodings.so util/pposix.so util/signal.so
@@ -29,12 +29,14 @@ install: prosody.install prosodyctl.install prosody.cfg.lua.install util/encodin
install -m644 certs/* $(CONFIG)/certs
install -m644 plugins/* $(MODULES)
test -e $(CONFIG)/prosody.cfg.lua || install -m644 prosody.cfg.lua.install $(CONFIG)/prosody.cfg.lua
+ test -e prosody.version && install prosody.version $(SOURCE)/prosody.version || true
$(MAKE) install -C util-src
clean:
rm -f prosody.install
rm -f prosodyctl.install
rm -f prosody.cfg.lua.install
+ rm -f prosody.version
$(MAKE) clean -C util-src
util/encodings.so:
@@ -64,3 +66,9 @@ prosodyctl.install: prosodyctl
prosody.cfg.lua.install:
sed 's|certs/|$(INSTALLEDCONFIG)/certs/|' prosody.cfg.lua.dist > prosody.cfg.lua.install
+prosody.release:
+ test -e .hg/dirstate && hexdump -n6 -e'6/1 "%01x"' .hg/dirstate \
+ > prosody.version || true
+
+prosody.version: prosody.release
+ cp prosody.release prosody.version || true