Software /
code /
prosody
Changeset
6883:954a8a8c46d6
Makefile: Simplify generation of prosody.version using magic Make magic
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 27 Sep 2015 00:14:18 +0200 |
parents | 6882:e8d887ae659a |
children | 6884:e32275ed5632 |
files | Makefile |
diffstat | 1 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Sun Sep 27 00:12:07 2015 +0200 +++ b/Makefile Sun Sep 27 00:14:18 2015 +0200 @@ -65,8 +65,13 @@ 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 > $@ + +