# HG changeset patch # User Matthew Wild # Date 1244160819 -3600 # Node ID b5a7a9fc91613d6f54e949cd312ed79c415ff835 # Parent a544e68a0989328c9846ee258dadb3fdb54bdd64 Makefile: Experimental support for recording the version of an installed Prosody diff -r a544e68a0989 -r b5a7a9fc9161 Makefile --- a/Makefile Thu Jun 04 21:25:05 2009 +0500 +++ b/Makefile Fri Jun 05 01:13:39 2009 +0100 @@ -12,7 +12,7 @@ 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 -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 @@ 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