aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2011-10-18 01:22:44 +0200
committerKim Alvefur <zash@zash.se>2011-10-18 01:22:44 +0200
commit769db1e4e8ea5313aabcdef244a0a5bd7795ec98 (patch)
tree687b33e5ede79f03d6d724d307f995181660c3b3 /Makefile
parenta8fc120451d3bc0cef65e8576a2fa2ea8c5d5427 (diff)
downloadprosody-769db1e4e8ea5313aabcdef244a0a5bd7795ec98.tar.gz
prosody-769db1e4e8ea5313aabcdef244a0a5bd7795ec98.zip
Makefile: Merge identical rules and some other improvements.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 8 insertions, 25 deletions
diff --git a/Makefile b/Makefile
index 1af6da63..9d0c3d23 100644
--- a/Makefile
+++ b/Makefile
@@ -50,36 +50,19 @@ clean:
rm -f prosody.version
$(MAKE) clean -C util-src
-util/encodings.so:
+util/%.so:
$(MAKE) install -C util-src
-util/hashes.so:
- $(MAKE) install -C util-src
-
-util/pposix.so:
- $(MAKE) install -C util-src
-
-util/signal.so:
- $(MAKE) install -C util-src
-
-prosody.install: prosody
+%.install: %
sed "s|^CFG_SOURCEDIR=.*;$$|CFG_SOURCEDIR='$(INSTALLEDSOURCE)';|; \
s|^CFG_CONFIGDIR=.*;$$|CFG_CONFIGDIR='$(INSTALLEDCONFIG)';|; \
s|^CFG_DATADIR=.*;$$|CFG_DATADIR='$(INSTALLEDDATA)';|; \
- s|^CFG_PLUGINDIR=.*;$$|CFG_PLUGINDIR='$(INSTALLEDMODULES)/';|;" < prosody > prosody.install
+ s|^CFG_PLUGINDIR=.*;$$|CFG_PLUGINDIR='$(INSTALLEDMODULES)/';|;" < $^ > $@
-prosodyctl.install: prosodyctl
- sed "s|^CFG_SOURCEDIR=.*;$$|CFG_SOURCEDIR='$(INSTALLEDSOURCE)';|; \
- s|^CFG_CONFIGDIR=.*;$$|CFG_CONFIGDIR='$(INSTALLEDCONFIG)';|; \
- s|^CFG_DATADIR=.*;$$|CFG_DATADIR='$(INSTALLEDDATA)';|; \
- s|^CFG_PLUGINDIR=.*;$$|CFG_PLUGINDIR='$(INSTALLEDMODULES)/';|;" < prosodyctl > prosodyctl.install
+prosody.cfg.lua.install: prosody.cfg.lua.dist
+ sed 's|certs/|$(INSTALLEDCONFIG)/certs/|' $^ > $@
-prosody.cfg.lua.install:
- sed 's|certs/|$(INSTALLEDCONFIG)/certs/|' prosody.cfg.lua.dist > prosody.cfg.lua.install
-
-prosody.release:
+prosody.version: $(wildcard prosody.release .hg/dirstate)
test -e .hg/dirstate && hexdump -n6 -e'6/1 "%02x"' .hg/dirstate \
- > prosody.version || true
-
-prosody.version: prosody.release
- cp prosody.release prosody.version || true
+ > $@
+ test -f prosody.release && cp prosody.release $@ || true