Software /
code /
prosody
Annotate
Makefile @ 7234:161f9f163e37
Makefile: Reduce verbosity of 'make test' so it only shows test failures
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 04 Mar 2016 22:17:38 +0000 |
parent | 7165:f0e6757261bc |
child | 7237:472736b583fb |
rev | line source |
---|---|
463
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
1 |
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
2 include config.unix |
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
3 |
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
4 BIN = $(DESTDIR)$(PREFIX)/bin |
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
5 CONFIG = $(DESTDIR)$(SYSCONFDIR) |
6574
cd0088c73daf
configure, Makefile: Add --libdir option to ./configure, allowing you to override the $PREFIX/lib/ default. Fixes #470.
Matthew Wild <mwild1@gmail.com>
parents:
6044
diff
changeset
|
6 MODULES = $(DESTDIR)$(LIBDIR)/prosody/modules |
cd0088c73daf
configure, Makefile: Add --libdir option to ./configure, allowing you to override the $PREFIX/lib/ default. Fixes #470.
Matthew Wild <mwild1@gmail.com>
parents:
6044
diff
changeset
|
7 SOURCE = $(DESTDIR)$(LIBDIR)/prosody |
503
00702b66beb1
Makefile fix for creating datadir in correct place on install
Matthew Wild <mwild1@gmail.com>
parents:
502
diff
changeset
|
8 DATA = $(DESTDIR)$(DATADIR) |
1464
047ed6e52a41
Added man page for prosodyctl
Dwayne Bent <dbb.0@liqd.org>
parents:
1454
diff
changeset
|
9 MAN = $(DESTDIR)$(PREFIX)/share/man |
502
21dc299387a6
Installation improvements (auto-creation of data directories)
Matthew Wild <mwild1@gmail.com>
parents:
501
diff
changeset
|
10 |
6574
cd0088c73daf
configure, Makefile: Add --libdir option to ./configure, allowing you to override the $PREFIX/lib/ default. Fixes #470.
Matthew Wild <mwild1@gmail.com>
parents:
6044
diff
changeset
|
11 INSTALLEDSOURCE = $(LIBDIR)/prosody |
480
5d00d623904e
Update Makefile to set correct paths on install with Debian package
Matthew Wild <mwild1@gmail.com>
parents:
467
diff
changeset
|
12 INSTALLEDCONFIG = $(SYSCONFDIR) |
6574
cd0088c73daf
configure, Makefile: Add --libdir option to ./configure, allowing you to override the $PREFIX/lib/ default. Fixes #470.
Matthew Wild <mwild1@gmail.com>
parents:
6044
diff
changeset
|
13 INSTALLEDMODULES = $(LIBDIR)/prosody/modules |
502
21dc299387a6
Installation improvements (auto-creation of data directories)
Matthew Wild <mwild1@gmail.com>
parents:
501
diff
changeset
|
14 INSTALLEDDATA = $(DATADIR) |
480
5d00d623904e
Update Makefile to set correct paths on install with Debian package
Matthew Wild <mwild1@gmail.com>
parents:
467
diff
changeset
|
15 |
4396
03b59a511671
Makefile, util-src/Makefile: Add .PHONY, reorganise util-src/Makefile
Matthew Wild <mwild1@gmail.com>
parents:
3266
diff
changeset
|
16 .PHONY: all clean install |
03b59a511671
Makefile, util-src/Makefile: Add .PHONY, reorganise util-src/Makefile
Matthew Wild <mwild1@gmail.com>
parents:
3266
diff
changeset
|
17 |
1310
b5a7a9fc9161
Makefile: Experimental support for recording the version of an installed Prosody
Matthew Wild <mwild1@gmail.com>
parents:
1300
diff
changeset
|
18 all: prosody.install prosodyctl.install prosody.cfg.lua.install prosody.version |
586
b828d7d47973
Add posix support library, and adjust makefiles for it
Matthew Wild <mwild1@gmail.com>
parents:
514
diff
changeset
|
19 $(MAKE) -C util-src install |
5933
56b1f151f4a3
Makefile, configure: Add option for disabling generation of example certificates
Kim Alvefur <zash@zash.se>
parents:
5924
diff
changeset
|
20 ifeq ($(EXCERTS),yes) |
6885
07078f762061
Makefile: Use hypen to tell Make when to ignore errors
Kim Alvefur <zash@zash.se>
parents:
6884
diff
changeset
|
21 -$(MAKE) -C certs localhost.crt example.com.crt |
5933
56b1f151f4a3
Makefile, configure: Add option for disabling generation of example certificates
Kim Alvefur <zash@zash.se>
parents:
5924
diff
changeset
|
22 endif |
463
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
23 |
1090
e47310ca513b
Makefile: Process and install prosodyctl
Matthew Wild <mwild1@gmail.com>
parents:
993
diff
changeset
|
24 install: prosody.install prosodyctl.install prosody.cfg.lua.install util/encodings.so util/encodings.so util/pposix.so util/signal.so |
1300
954973fd2939
Makefile: Set data directory permissions to 750 on install [thanks Dwayne Bent]
Matthew Wild <mwild1@gmail.com>
parents:
1299
diff
changeset
|
25 install -d $(BIN) $(CONFIG) $(MODULES) $(SOURCE) |
954973fd2939
Makefile: Set data directory permissions to 750 on install [thanks Dwayne Bent]
Matthew Wild <mwild1@gmail.com>
parents:
1299
diff
changeset
|
26 install -m750 -d $(DATA) |
1464
047ed6e52a41
Added man page for prosodyctl
Dwayne Bent <dbb.0@liqd.org>
parents:
1454
diff
changeset
|
27 install -d $(MAN)/man1 |
481
29f974ef00a7
More Makefile improvements (install the certificates, and update the config on install to find them)
Matthew Wild <mwild1@gmail.com>
parents:
480
diff
changeset
|
28 install -d $(CONFIG)/certs |
2650
23995c80286c
Makefile: Remove fallbacks/
Matthew Wild <mwild1@gmail.com>
parents:
2224
diff
changeset
|
29 install -d $(SOURCE)/core $(SOURCE)/net $(SOURCE)/util |
1299
997ac65a85f4
Makefile: Specify permissions on installed executables [thanks mhavela]
Matthew Wild <mwild1@gmail.com>
parents:
1090
diff
changeset
|
30 install -m755 ./prosody.install $(BIN)/prosody |
997ac65a85f4
Makefile: Specify permissions on installed executables [thanks mhavela]
Matthew Wild <mwild1@gmail.com>
parents:
1090
diff
changeset
|
31 install -m755 ./prosodyctl.install $(BIN)/prosodyctl |
6906
5a60b4705bc3
Makefile: Use more specific globbing for core directory in Makefile (Thanks Robert Scheck) (fixes #532)
Kim Alvefur <zash@zash.se>
parents:
6574
diff
changeset
|
32 install -m644 core/*.lua $(SOURCE)/core |
4686
5fd661424b9f
Makefile: Fix for net/http
Matthew Wild <mwild1@gmail.com>
parents:
4628
diff
changeset
|
33 install -m644 net/*.lua $(SOURCE)/net |
6406
f04a6c700b2f
Makefile: Add net/websocket to install target
Kim Alvefur <zash@zash.se>
parents:
6044
diff
changeset
|
34 install -d $(SOURCE)/net/http $(SOURCE)/net/websocket |
4686
5fd661424b9f
Makefile: Fix for net/http
Matthew Wild <mwild1@gmail.com>
parents:
4628
diff
changeset
|
35 install -m644 net/http/*.lua $(SOURCE)/net/http |
6406
f04a6c700b2f
Makefile: Add net/websocket to install target
Kim Alvefur <zash@zash.se>
parents:
6044
diff
changeset
|
36 install -m644 net/websocket/*.lua $(SOURCE)/net/websocket |
2224
f2f0f9103c26
Makefile: Fix to install new util/sasl directory
Matthew Wild <mwild1@gmail.com>
parents:
1762
diff
changeset
|
37 install -m644 util/*.lua $(SOURCE)/util |
f2f0f9103c26
Makefile: Fix to install new util/sasl directory
Matthew Wild <mwild1@gmail.com>
parents:
1762
diff
changeset
|
38 install -m644 util/*.so $(SOURCE)/util |
f2f0f9103c26
Makefile: Fix to install new util/sasl directory
Matthew Wild <mwild1@gmail.com>
parents:
1762
diff
changeset
|
39 install -d $(SOURCE)/util/sasl |
f2f0f9103c26
Makefile: Fix to install new util/sasl directory
Matthew Wild <mwild1@gmail.com>
parents:
1762
diff
changeset
|
40 install -m644 util/sasl/* $(SOURCE)/util/sasl |
4628
087f4b437bd2
Makefile: Use cp instead of install, and make sure the correct umask is set
Kim Alvefur <zash@zash.se>
parents:
4577
diff
changeset
|
41 umask 0022 && cp -r plugins/* $(MODULES) |
481
29f974ef00a7
More Makefile improvements (install the certificates, and update the config on install to find them)
Matthew Wild <mwild1@gmail.com>
parents:
480
diff
changeset
|
42 install -m644 certs/* $(CONFIG)/certs |
1464
047ed6e52a41
Added man page for prosodyctl
Dwayne Bent <dbb.0@liqd.org>
parents:
1454
diff
changeset
|
43 install -m644 man/prosodyctl.man $(MAN)/man1/prosodyctl.1 |
6810
533fd843d91f
configure, Makefile: Make compatible with plain Bourne shell as used on Solaris. Fixes #418 (thanks jcea)
Matthew Wild <mwild1@gmail.com>
parents:
6576
diff
changeset
|
44 test -f $(CONFIG)/prosody.cfg.lua || install -m644 prosody.cfg.lua.install $(CONFIG)/prosody.cfg.lua |
6885
07078f762061
Makefile: Use hypen to tell Make when to ignore errors
Kim Alvefur <zash@zash.se>
parents:
6884
diff
changeset
|
45 -test -f prosody.version && install -m644 prosody.version $(SOURCE)/prosody.version |
463
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
46 $(MAKE) install -C util-src |
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
47 |
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
48 clean: |
467
66f145f5c932
Update Makefile to now pass config paths to prosody. Update prosody, modulemanager and connectionlisteners to obey these paths.
Matthew Wild <mwild1@gmail.com>
parents:
465
diff
changeset
|
49 rm -f prosody.install |
1090
e47310ca513b
Makefile: Process and install prosodyctl
Matthew Wild <mwild1@gmail.com>
parents:
993
diff
changeset
|
50 rm -f prosodyctl.install |
492
279f64370885
Don't write to prosody.cfg.lua from Makefile. Much apologies to poor albert :(
Matthew Wild <mwild1@gmail.com>
parents:
481
diff
changeset
|
51 rm -f prosody.cfg.lua.install |
1310
b5a7a9fc9161
Makefile: Experimental support for recording the version of an installed Prosody
Matthew Wild <mwild1@gmail.com>
parents:
1300
diff
changeset
|
52 rm -f prosody.version |
463
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
53 $(MAKE) clean -C util-src |
464 | 54 |
7071
d9e620adfb64
Makefile: Add 'test' target that runs tests
Kim Alvefur <zash@zash.se>
parents:
6907
diff
changeset
|
55 test: |
7234
161f9f163e37
Makefile: Reduce verbosity of 'make test' so it only shows test failures
Matthew Wild <mwild1@gmail.com>
parents:
7165
diff
changeset
|
56 cd tests && $(RUNWITH) test.lua 0 |
7071
d9e620adfb64
Makefile: Add 'test' target that runs tests
Kim Alvefur <zash@zash.se>
parents:
6907
diff
changeset
|
57 |
4402
05f8826972ba
Makefile: Merge identical rules and some other improvements.
Kim Alvefur <zash@zash.se>
parents:
4396
diff
changeset
|
58 util/%.so: |
464 | 59 $(MAKE) install -C util-src |
467
66f145f5c932
Update Makefile to now pass config paths to prosody. Update prosody, modulemanager and connectionlisteners to obey these paths.
Matthew Wild <mwild1@gmail.com>
parents:
465
diff
changeset
|
60 |
4402
05f8826972ba
Makefile: Merge identical rules and some other improvements.
Kim Alvefur <zash@zash.se>
parents:
4396
diff
changeset
|
61 %.install: % |
6044
1ce05d38d1bb
Makefile: Change sed regex to be compatible with FreeBSD's odd sed, and change / to | to allow paths to be used in RUNWITH (thanks Ben)
Matthew Wild <mwild1@gmail.com>
parents:
5933
diff
changeset
|
62 sed "1s| lua$$| $(RUNWITH)|; \ |
5145
53f741a5a73a
configure, Makefile: Allow runtime to be overridden.
Kim Alvefur <zash@zash.se>
parents:
4686
diff
changeset
|
63 s|^CFG_SOURCEDIR=.*;$$|CFG_SOURCEDIR='$(INSTALLEDSOURCE)';|; \ |
514
03d7da01843e
Change sed usage back into one sed script for incompetent versions of sed
Matthew Wild <mwild1@gmail.com>
parents:
512
diff
changeset
|
64 s|^CFG_CONFIGDIR=.*;$$|CFG_CONFIGDIR='$(INSTALLEDCONFIG)';|; \ |
03d7da01843e
Change sed usage back into one sed script for incompetent versions of sed
Matthew Wild <mwild1@gmail.com>
parents:
512
diff
changeset
|
65 s|^CFG_DATADIR=.*;$$|CFG_DATADIR='$(INSTALLEDDATA)';|; \ |
4402
05f8826972ba
Makefile: Merge identical rules and some other improvements.
Kim Alvefur <zash@zash.se>
parents:
4396
diff
changeset
|
66 s|^CFG_PLUGINDIR=.*;$$|CFG_PLUGINDIR='$(INSTALLEDMODULES)/';|;" < $^ > $@ |
467
66f145f5c932
Update Makefile to now pass config paths to prosody. Update prosody, modulemanager and connectionlisteners to obey these paths.
Matthew Wild <mwild1@gmail.com>
parents:
465
diff
changeset
|
67 |
4402
05f8826972ba
Makefile: Merge identical rules and some other improvements.
Kim Alvefur <zash@zash.se>
parents:
4396
diff
changeset
|
68 prosody.cfg.lua.install: prosody.cfg.lua.dist |
05f8826972ba
Makefile: Merge identical rules and some other improvements.
Kim Alvefur <zash@zash.se>
parents:
4396
diff
changeset
|
69 sed 's|certs/|$(INSTALLEDCONFIG)/certs/|' $^ > $@ |
1090
e47310ca513b
Makefile: Process and install prosodyctl
Matthew Wild <mwild1@gmail.com>
parents:
993
diff
changeset
|
70 |
6883
954a8a8c46d6
Makefile: Simplify generation of prosody.version using magic Make magic
Kim Alvefur <zash@zash.se>
parents:
6840
diff
changeset
|
71 %.version: %.release |
954a8a8c46d6
Makefile: Simplify generation of prosody.version using magic Make magic
Kim Alvefur <zash@zash.se>
parents:
6840
diff
changeset
|
72 cp $^ $@ |
954a8a8c46d6
Makefile: Simplify generation of prosody.version using magic Make magic
Kim Alvefur <zash@zash.se>
parents:
6840
diff
changeset
|
73 |
6884
e32275ed5632
Makefile: Support generating prosody.version from hg archive metadata file
Kim Alvefur <zash@zash.se>
parents:
6883
diff
changeset
|
74 %.version: .hg_archival.txt |
e32275ed5632
Makefile: Support generating prosody.version from hg archive metadata file
Kim Alvefur <zash@zash.se>
parents:
6883
diff
changeset
|
75 sed -n 's/^node: \(............\).*/\1/p' $^ > $@ |
e32275ed5632
Makefile: Support generating prosody.version from hg archive metadata file
Kim Alvefur <zash@zash.se>
parents:
6883
diff
changeset
|
76 |
6883
954a8a8c46d6
Makefile: Simplify generation of prosody.version using magic Make magic
Kim Alvefur <zash@zash.se>
parents:
6840
diff
changeset
|
77 %.version: .hg/dirstate |
954a8a8c46d6
Makefile: Simplify generation of prosody.version using magic Make magic
Kim Alvefur <zash@zash.se>
parents:
6840
diff
changeset
|
78 hexdump -n6 -e'6/1 "%02x"' $^ > $@ |
954a8a8c46d6
Makefile: Simplify generation of prosody.version using magic Make magic
Kim Alvefur <zash@zash.se>
parents:
6840
diff
changeset
|
79 |
954a8a8c46d6
Makefile: Simplify generation of prosody.version using magic Make magic
Kim Alvefur <zash@zash.se>
parents:
6840
diff
changeset
|
80 %.version: |
954a8a8c46d6
Makefile: Simplify generation of prosody.version using magic Make magic
Kim Alvefur <zash@zash.se>
parents:
6840
diff
changeset
|
81 echo unknown > $@ |
954a8a8c46d6
Makefile: Simplify generation of prosody.version using magic Make magic
Kim Alvefur <zash@zash.se>
parents:
6840
diff
changeset
|
82 |
954a8a8c46d6
Makefile: Simplify generation of prosody.version using magic Make magic
Kim Alvefur <zash@zash.se>
parents:
6840
diff
changeset
|
83 |