diff options
author | Kim Alvefur <zash@zash.se> | 2015-09-27 00:14:18 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2015-09-27 00:14:18 +0200 |
commit | b4c0bd85179fb1229d2b2ad2b39db1330dd928c5 (patch) | |
tree | 783e3f2ba4f63ab10ecb009a27a469bda0da4478 /Makefile | |
parent | bc6588bd31b94d20a2e0781f1aaa1774c5aee75f (diff) | |
download | prosody-b4c0bd85179fb1229d2b2ad2b39db1330dd928c5.tar.gz prosody-b4c0bd85179fb1229d2b2ad2b39db1330dd928c5.zip |
Makefile: Simplify generation of prosody.version using magic Make magic
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -65,8 +65,13 @@ util/%.so: prosody.cfg.lua.install: prosody.cfg.lua.dist sed 's|certs/|$(INSTALLEDCONFIG)/certs/|' $^ > $@ -prosody.version: $(wildcard prosody.release .hg/dirstate) - test -f .hg/dirstate && \ - hexdump -n6 -e'6/1 "%02x"' .hg/dirstate > $@ || true - test -f prosody.release && \ - cp prosody.release $@ || true +%.version: %.release + cp $^ $@ + +%.version: .hg/dirstate + hexdump -n6 -e'6/1 "%02x"' $^ > $@ + +%.version: + echo unknown > $@ + + |