Software /
code /
prosody
Annotate
GNUmakefile @ 13196:eca44e058eed
util.human.io: Use tail call in test to get correct line numbers
This is probably not guaranteed to work and might vary with Lua version,
but it's good enough for me to get accurate line numbers out of Busted
that don't all point to the test() function.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 16 Jul 2023 18:42:58 +0200 |
parent | 12979:fbbf4f0db8f0 |
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 |
7683
7356bf4425f4
Makefile: Preserve timestamps of installed files (fixes #547)
Kim Alvefur <zash@zash.se>
parents:
7682
diff
changeset
|
16 INSTALL=install -p |
7682
e07116c0df77
Makefile: Refactor all uses of the install command with variables, allowing them to be overridden
Kim Alvefur <zash@zash.se>
parents:
7681
diff
changeset
|
17 INSTALL_DATA=$(INSTALL) -m644 |
e07116c0df77
Makefile: Refactor all uses of the install command with variables, allowing them to be overridden
Kim Alvefur <zash@zash.se>
parents:
7681
diff
changeset
|
18 INSTALL_EXEC=$(INSTALL) -m755 |
e07116c0df77
Makefile: Refactor all uses of the install command with variables, allowing them to be overridden
Kim Alvefur <zash@zash.se>
parents:
7681
diff
changeset
|
19 MKDIR=install -d |
e07116c0df77
Makefile: Refactor all uses of the install command with variables, allowing them to be overridden
Kim Alvefur <zash@zash.se>
parents:
7681
diff
changeset
|
20 MKDIR_PRIVATE=$(MKDIR) -m750 |
e07116c0df77
Makefile: Refactor all uses of the install command with variables, allowing them to be overridden
Kim Alvefur <zash@zash.se>
parents:
7681
diff
changeset
|
21 |
9287
420e0bf55bf5
GNUmakefile: Allow overriding path to luacheck
Kim Alvefur <zash@zash.se>
parents:
8823
diff
changeset
|
22 LUACHECK=luacheck |
9288
1330b5290a10
GNUmakefile: Allow overriding path to busted
Kim Alvefur <zash@zash.se>
parents:
9287
diff
changeset
|
23 BUSTED=busted |
9779
0b04099b49de
GNUmakefile: Add target for running scansion
Kim Alvefur <zash@zash.se>
parents:
9429
diff
changeset
|
24 SCANSION=scansion |
9287
420e0bf55bf5
GNUmakefile: Allow overriding path to luacheck
Kim Alvefur <zash@zash.se>
parents:
8823
diff
changeset
|
25 |
8612
1f2fb8070c7c
GNUMakefile: Add 'coverage' target (requires luacov and luacov-console)
Matthew Wild <mwild1@gmail.com>
parents:
8592
diff
changeset
|
26 .PHONY: all test coverage clean install |
4396
03b59a511671
Makefile, util-src/Makefile: Add .PHONY, reorganise util-src/Makefile
Matthew Wild <mwild1@gmail.com>
parents:
3266
diff
changeset
|
27 |
1310
b5a7a9fc9161
Makefile: Experimental support for recording the version of an installed Prosody
Matthew Wild <mwild1@gmail.com>
parents:
1300
diff
changeset
|
28 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
|
29 $(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
|
30 ifeq ($(EXCERTS),yes) |
6885
07078f762061
Makefile: Use hypen to tell Make when to ignore errors
Kim Alvefur <zash@zash.se>
parents:
6884
diff
changeset
|
31 -$(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
|
32 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
|
33 |
12313
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
34 install-etc: prosody.cfg.lua.install |
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
35 $(MKDIR) $(CONFIG) |
7682
e07116c0df77
Makefile: Refactor all uses of the install command with variables, allowing them to be overridden
Kim Alvefur <zash@zash.se>
parents:
7681
diff
changeset
|
36 $(MKDIR) $(CONFIG)/certs |
12313
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
37 $(INSTALL_DATA) certs/* $(CONFIG)/certs |
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
38 test -f $(CONFIG)/prosody.cfg.lua || $(INSTALL_DATA) prosody.cfg.lua.install $(CONFIG)/prosody.cfg.lua |
12354
3ce3633527af
util.struct: Import Roberto 'struct' library v0.3
Matthew Wild <mwild1@gmail.com>
parents:
12131
diff
changeset
|
39 |
12313
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
40 install-bin: prosody.install prosodyctl.install |
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
41 $(MKDIR) $(BIN) |
7682
e07116c0df77
Makefile: Refactor all uses of the install command with variables, allowing them to be overridden
Kim Alvefur <zash@zash.se>
parents:
7681
diff
changeset
|
42 $(INSTALL_EXEC) ./prosody.install $(BIN)/prosody |
e07116c0df77
Makefile: Refactor all uses of the install command with variables, allowing them to be overridden
Kim Alvefur <zash@zash.se>
parents:
7681
diff
changeset
|
43 $(INSTALL_EXEC) ./prosodyctl.install $(BIN)/prosodyctl |
12313
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
44 |
12947
14a44b1a51d0
prosody.loader: Allow loading modules under 'prosody' namespace (#1223)
Kim Alvefur <zash@zash.se>
parents:
12465
diff
changeset
|
45 install-loader: |
14a44b1a51d0
prosody.loader: Allow loading modules under 'prosody' namespace (#1223)
Kim Alvefur <zash@zash.se>
parents:
12465
diff
changeset
|
46 $(MKDIR) $(SOURCE) |
14a44b1a51d0
prosody.loader: Allow loading modules under 'prosody' namespace (#1223)
Kim Alvefur <zash@zash.se>
parents:
12465
diff
changeset
|
47 $(INSTALL_DATA) loader.lua $(SOURCE) |
14a44b1a51d0
prosody.loader: Allow loading modules under 'prosody' namespace (#1223)
Kim Alvefur <zash@zash.se>
parents:
12465
diff
changeset
|
48 |
12313
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
49 install-core: |
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
50 $(MKDIR) $(SOURCE) |
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
51 $(MKDIR) $(SOURCE)/core |
7682
e07116c0df77
Makefile: Refactor all uses of the install command with variables, allowing them to be overridden
Kim Alvefur <zash@zash.se>
parents:
7681
diff
changeset
|
52 $(INSTALL_DATA) core/*.lua $(SOURCE)/core |
12313
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
53 |
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
54 install-net: |
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
55 $(MKDIR) $(SOURCE) |
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
56 $(MKDIR) $(SOURCE)/net |
7682
e07116c0df77
Makefile: Refactor all uses of the install command with variables, allowing them to be overridden
Kim Alvefur <zash@zash.se>
parents:
7681
diff
changeset
|
57 $(INSTALL_DATA) net/*.lua $(SOURCE)/net |
8554
12a68e0d0ecf
Makefile: Also package /net/resolvers
Michel Le Bihan <michel@lebihan.pl>
parents:
8346
diff
changeset
|
58 $(MKDIR) $(SOURCE)/net/http $(SOURCE)/net/resolvers $(SOURCE)/net/websocket |
7682
e07116c0df77
Makefile: Refactor all uses of the install command with variables, allowing them to be overridden
Kim Alvefur <zash@zash.se>
parents:
7681
diff
changeset
|
59 $(INSTALL_DATA) net/http/*.lua $(SOURCE)/net/http |
8554
12a68e0d0ecf
Makefile: Also package /net/resolvers
Michel Le Bihan <michel@lebihan.pl>
parents:
8346
diff
changeset
|
60 $(INSTALL_DATA) net/resolvers/*.lua $(SOURCE)/net/resolvers |
7682
e07116c0df77
Makefile: Refactor all uses of the install command with variables, allowing them to be overridden
Kim Alvefur <zash@zash.se>
parents:
7681
diff
changeset
|
61 $(INSTALL_DATA) net/websocket/*.lua $(SOURCE)/net/websocket |
12313
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
62 |
12362
0fd58f54d653
Merge config-updates+check-turn from timber
Matthew Wild <mwild1@gmail.com>
diff
changeset
|
63 install-util: util/encodings.so util/encodings.so util/pposix.so util/signal.so util/struct.so |
12313
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
64 $(MKDIR) $(SOURCE) |
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
65 $(MKDIR) $(SOURCE)/util |
7682
e07116c0df77
Makefile: Refactor all uses of the install command with variables, allowing them to be overridden
Kim Alvefur <zash@zash.se>
parents:
7681
diff
changeset
|
66 $(INSTALL_DATA) util/*.lua $(SOURCE)/util |
12313
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
67 $(MAKE) install -C util-src |
7682
e07116c0df77
Makefile: Refactor all uses of the install command with variables, allowing them to be overridden
Kim Alvefur <zash@zash.se>
parents:
7681
diff
changeset
|
68 $(INSTALL_DATA) util/*.so $(SOURCE)/util |
e07116c0df77
Makefile: Refactor all uses of the install command with variables, allowing them to be overridden
Kim Alvefur <zash@zash.se>
parents:
7681
diff
changeset
|
69 $(MKDIR) $(SOURCE)/util/sasl |
e07116c0df77
Makefile: Refactor all uses of the install command with variables, allowing them to be overridden
Kim Alvefur <zash@zash.se>
parents:
7681
diff
changeset
|
70 $(INSTALL_DATA) util/sasl/*.lua $(SOURCE)/util/sasl |
10881
0abd38e4ff3c
GNUmakefile: Install util.human.*
Kim Alvefur <zash@zash.se>
parents:
10879
diff
changeset
|
71 $(MKDIR) $(SOURCE)/util/human |
0abd38e4ff3c
GNUmakefile: Install util.human.*
Kim Alvefur <zash@zash.se>
parents:
10879
diff
changeset
|
72 $(INSTALL_DATA) util/human/*.lua $(SOURCE)/util/human |
10882
1999bb052d49
GNUmakefile: Install the new util/prosodyctl/* too (thanks pascal.pascher)
Kim Alvefur <zash@zash.se>
parents:
10881
diff
changeset
|
73 $(MKDIR) $(SOURCE)/util/prosodyctl |
1999bb052d49
GNUmakefile: Install the new util/prosodyctl/* too (thanks pascal.pascher)
Kim Alvefur <zash@zash.se>
parents:
10881
diff
changeset
|
74 $(INSTALL_DATA) util/prosodyctl/*.lua $(SOURCE)/util/prosodyctl |
12313
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
75 |
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
76 install-plugins: |
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
77 $(MKDIR) $(MODULES) |
12465
4a087713cffe
make: Install stanza watcher library (thanks Menel)
Kim Alvefur <zash@zash.se>
parents:
12362
diff
changeset
|
78 $(MKDIR) $(MODULES)/mod_pubsub $(MODULES)/adhoc $(MODULES)/muc $(MODULES)/mod_mam $(MODULES)/mod_debug_stanzas |
7682
e07116c0df77
Makefile: Refactor all uses of the install command with variables, allowing them to be overridden
Kim Alvefur <zash@zash.se>
parents:
7681
diff
changeset
|
79 $(INSTALL_DATA) plugins/*.lua $(MODULES) |
7689
97c013e8f002
Makefile: Fix installing modules into their correct subdirectories (thanks mimi89999)
Kim Alvefur <zash@zash.se>
parents:
7683
diff
changeset
|
80 $(INSTALL_DATA) plugins/mod_pubsub/*.lua $(MODULES)/mod_pubsub |
97c013e8f002
Makefile: Fix installing modules into their correct subdirectories (thanks mimi89999)
Kim Alvefur <zash@zash.se>
parents:
7683
diff
changeset
|
81 $(INSTALL_DATA) plugins/adhoc/*.lua $(MODULES)/adhoc |
97c013e8f002
Makefile: Fix installing modules into their correct subdirectories (thanks mimi89999)
Kim Alvefur <zash@zash.se>
parents:
7683
diff
changeset
|
82 $(INSTALL_DATA) plugins/muc/*.lua $(MODULES)/muc |
7879
5d0175d3ecf4
Makefile: Install mod_mam (fixes #825)
Kim Alvefur <zash@zash.se>
parents:
7790
diff
changeset
|
83 $(INSTALL_DATA) plugins/mod_mam/*.lua $(MODULES)/mod_mam |
12465
4a087713cffe
make: Install stanza watcher library (thanks Menel)
Kim Alvefur <zash@zash.se>
parents:
12362
diff
changeset
|
84 $(INSTALL_DATA) plugins/mod_debug_stanzas/*.lua $(MODULES)/mod_debug_stanzas |
12313
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
85 |
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
86 install-man: |
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
87 $(MKDIR) $(MAN)/man1 |
7682
e07116c0df77
Makefile: Refactor all uses of the install command with variables, allowing them to be overridden
Kim Alvefur <zash@zash.se>
parents:
7681
diff
changeset
|
88 $(INSTALL_DATA) man/prosodyctl.man $(MAN)/man1/prosodyctl.1 |
12313
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
89 |
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
90 install-meta: |
7682
e07116c0df77
Makefile: Refactor all uses of the install command with variables, allowing them to be overridden
Kim Alvefur <zash@zash.se>
parents:
7681
diff
changeset
|
91 -test -f prosody.version && $(INSTALL_DATA) prosody.version $(SOURCE)/prosody.version |
12313
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
92 |
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
93 install-data: |
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
94 $(MKDIR_PRIVATE) $(DATA) |
469e4453ed01
make: Split up install targets to allow different subset
Kim Alvefur <zash@zash.se>
parents:
12131
diff
changeset
|
95 |
12947
14a44b1a51d0
prosody.loader: Allow loading modules under 'prosody' namespace (#1223)
Kim Alvefur <zash@zash.se>
parents:
12465
diff
changeset
|
96 install: install-util install-net install-core install-plugins install-bin install-etc install-man install-meta install-data install-loader |
463
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
97 |
a2452d3bd828
Add a top-level Makefile and ./configure script. Update util-src Makefile for this.
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
98 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
|
99 rm -f prosody.install |
1090
e47310ca513b
Makefile: Process and install prosodyctl
Matthew Wild <mwild1@gmail.com>
parents:
993
diff
changeset
|
100 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
|
101 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
|
102 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
|
103 $(MAKE) clean -C util-src |
464 | 104 |
7071
d9e620adfb64
Makefile: Add 'test' target that runs tests
Kim Alvefur <zash@zash.se>
parents:
6907
diff
changeset
|
105 test: |
12973
cc215923297f
tests: Make tests work with new namespace prefix
Kim Alvefur <zash@zash.se>
parents:
12947
diff
changeset
|
106 $(BUSTED) --helper loader --lua=$(RUNWITH) |
7071
d9e620adfb64
Makefile: Add 'test' target that runs tests
Kim Alvefur <zash@zash.se>
parents:
6907
diff
changeset
|
107 |
11121
2d38242a08dd
make: Add way to run individual tests
Kim Alvefur <zash@zash.se>
parents:
10882
diff
changeset
|
108 test-%: |
12973
cc215923297f
tests: Make tests work with new namespace prefix
Kim Alvefur <zash@zash.se>
parents:
12947
diff
changeset
|
109 $(BUSTED) --helper loader --lua=$(RUNWITH) -r $* |
11121
2d38242a08dd
make: Add way to run individual tests
Kim Alvefur <zash@zash.se>
parents:
10882
diff
changeset
|
110 |
9779
0b04099b49de
GNUmakefile: Add target for running scansion
Kim Alvefur <zash@zash.se>
parents:
9429
diff
changeset
|
111 integration-test: all |
10260
d6b9cacfef76
Prepare required data folder for integration tests
Maxime “pep” Buquet <pep@bouah.net>
parents:
9807
diff
changeset
|
112 $(MKDIR) data |
9779
0b04099b49de
GNUmakefile: Add target for running scansion
Kim Alvefur <zash@zash.se>
parents:
9429
diff
changeset
|
113 $(RUNWITH) prosodyctl --config ./spec/scansion/prosody.cfg.lua start |
9807
dcc85d72d5b3
GNUmakefile: Stop Prosody in case of failure in integration-test
Kim Alvefur <zash@zash.se>
parents:
9779
diff
changeset
|
114 $(SCANSION) -d ./spec/scansion; R=$$? \ |
dcc85d72d5b3
GNUmakefile: Stop Prosody in case of failure in integration-test
Kim Alvefur <zash@zash.se>
parents:
9779
diff
changeset
|
115 $(RUNWITH) prosodyctl --config ./spec/scansion/prosody.cfg.lua stop \ |
dcc85d72d5b3
GNUmakefile: Stop Prosody in case of failure in integration-test
Kim Alvefur <zash@zash.se>
parents:
9779
diff
changeset
|
116 exit $$R |
9779
0b04099b49de
GNUmakefile: Add target for running scansion
Kim Alvefur <zash@zash.se>
parents:
9429
diff
changeset
|
117 |
11121
2d38242a08dd
make: Add way to run individual tests
Kim Alvefur <zash@zash.se>
parents:
10882
diff
changeset
|
118 integration-test-%: all |
2d38242a08dd
make: Add way to run individual tests
Kim Alvefur <zash@zash.se>
parents:
10882
diff
changeset
|
119 $(MKDIR) data |
2d38242a08dd
make: Add way to run individual tests
Kim Alvefur <zash@zash.se>
parents:
10882
diff
changeset
|
120 $(RUNWITH) prosodyctl --config ./spec/scansion/prosody.cfg.lua start |
2d38242a08dd
make: Add way to run individual tests
Kim Alvefur <zash@zash.se>
parents:
10882
diff
changeset
|
121 $(SCANSION) ./spec/scansion/$*.scs; R=$$? \ |
2d38242a08dd
make: Add way to run individual tests
Kim Alvefur <zash@zash.se>
parents:
10882
diff
changeset
|
122 $(RUNWITH) prosodyctl --config ./spec/scansion/prosody.cfg.lua stop \ |
2d38242a08dd
make: Add way to run individual tests
Kim Alvefur <zash@zash.se>
parents:
10882
diff
changeset
|
123 exit $$R |
2d38242a08dd
make: Add way to run individual tests
Kim Alvefur <zash@zash.se>
parents:
10882
diff
changeset
|
124 |
8612
1f2fb8070c7c
GNUMakefile: Add 'coverage' target (requires luacov and luacov-console)
Matthew Wild <mwild1@gmail.com>
parents:
8592
diff
changeset
|
125 coverage: |
1f2fb8070c7c
GNUMakefile: Add 'coverage' target (requires luacov and luacov-console)
Matthew Wild <mwild1@gmail.com>
parents:
8592
diff
changeset
|
126 -rm -- luacov.* |
9429
5f51710d7c1e
make coverage: Allow overriding path to busted
Kim Alvefur <zash@zash.se>
parents:
9423
diff
changeset
|
127 $(BUSTED) --lua=$(RUNWITH) -c |
8612
1f2fb8070c7c
GNUMakefile: Add 'coverage' target (requires luacov and luacov-console)
Matthew Wild <mwild1@gmail.com>
parents:
8592
diff
changeset
|
128 luacov |
1f2fb8070c7c
GNUMakefile: Add 'coverage' target (requires luacov and luacov-console)
Matthew Wild <mwild1@gmail.com>
parents:
8592
diff
changeset
|
129 luacov-console |
1f2fb8070c7c
GNUMakefile: Add 'coverage' target (requires luacov and luacov-console)
Matthew Wild <mwild1@gmail.com>
parents:
8592
diff
changeset
|
130 luacov-console -s |
8782
daa518a22c34
GNUMakefile: Add note about how to list coverage of individual files
Matthew Wild <mwild1@gmail.com>
parents:
8612
diff
changeset
|
131 @echo "To inspect individual files run: luacov-console -l FILENAME" |
8612
1f2fb8070c7c
GNUMakefile: Add 'coverage' target (requires luacov and luacov-console)
Matthew Wild <mwild1@gmail.com>
parents:
8592
diff
changeset
|
132 |
8798
505722879b55
GNUmakefile: Add 'lint' target
Matthew Wild <mwild1@gmail.com>
parents:
8782
diff
changeset
|
133 lint: |
9289
b5fc11475b5d
GNUmakefile: Tell Mercurial to behave consistenly
Kim Alvefur <zash@zash.se>
parents:
9288
diff
changeset
|
134 $(LUACHECK) -q $$(HGPLAIN= hg files -I '**.lua') prosody prosodyctl |
9416
15cd0d9cde7c
make lint: Fix 'ignored files' count
Matthew Wild <mwild1@gmail.com>
parents:
9289
diff
changeset
|
135 @echo $$(sed -n '/^\tlocal exclude_files/,/^}/p;' .luacheckrc | sed '1d;$d' | wc -l) files ignored |
9423
d4e8aedc0f82
make lint: Add shellcheck of configure script
Matthew Wild <mwild1@gmail.com>
parents:
9416
diff
changeset
|
136 shellcheck configure |
8798
505722879b55
GNUmakefile: Add 'lint' target
Matthew Wild <mwild1@gmail.com>
parents:
8782
diff
changeset
|
137 |
12979
fbbf4f0db8f0
teal: Move into prosody namespace
Kim Alvefur <zash@zash.se>
parents:
12973
diff
changeset
|
138 vpath %.tl teal-src/prosody |
11463
21523e3d395e
make: Magic trick for teal-src/*.tl -> ./*.lua
Kim Alvefur <zash@zash.se>
parents:
11433
diff
changeset
|
139 %.lua: %.tl |
11433
bef67691a713
make: Add target for building Teal sources
Kim Alvefur <zash@zash.se>
parents:
11121
diff
changeset
|
140 tl -I teal-src/ --gen-compat off --gen-target 5.1 gen $^ -o $@ |
bef67691a713
make: Add target for building Teal sources
Kim Alvefur <zash@zash.se>
parents:
11121
diff
changeset
|
141 -lua-format -i $@ |
bef67691a713
make: Add target for building Teal sources
Kim Alvefur <zash@zash.se>
parents:
11121
diff
changeset
|
142 |
12131
b4c0efff8dd3
util.jsonpointer: Resolve JSON Pointers per RFC 6901
Kim Alvefur <zash@zash.se>
parents:
12130
diff
changeset
|
143 teal: util/jsonschema.lua util/datamapper.lua util/jsonpointer.lua |
12130
c4ca226ff386
make: Add target for rebuilding from Teal sources
Kim Alvefur <zash@zash.se>
parents:
11463
diff
changeset
|
144 |
4402
05f8826972ba
Makefile: Merge identical rules and some other improvements.
Kim Alvefur <zash@zash.se>
parents:
4396
diff
changeset
|
145 util/%.so: |
464 | 146 $(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
|
147 |
4402
05f8826972ba
Makefile: Merge identical rules and some other improvements.
Kim Alvefur <zash@zash.se>
parents:
4396
diff
changeset
|
148 %.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
|
149 sed "1s| lua$$| $(RUNWITH)|; \ |
5145
53f741a5a73a
configure, Makefile: Allow runtime to be overridden.
Kim Alvefur <zash@zash.se>
parents:
4686
diff
changeset
|
150 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
|
151 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
|
152 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
|
153 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
|
154 |
4402
05f8826972ba
Makefile: Merge identical rules and some other improvements.
Kim Alvefur <zash@zash.se>
parents:
4396
diff
changeset
|
155 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
|
156 sed 's|certs/|$(INSTALLEDCONFIG)/certs/|' $^ > $@ |
1090
e47310ca513b
Makefile: Process and install prosodyctl
Matthew Wild <mwild1@gmail.com>
parents:
993
diff
changeset
|
157 |
6883
954a8a8c46d6
Makefile: Simplify generation of prosody.version using magic Make magic
Kim Alvefur <zash@zash.se>
parents:
6840
diff
changeset
|
158 %.version: %.release |
954a8a8c46d6
Makefile: Simplify generation of prosody.version using magic Make magic
Kim Alvefur <zash@zash.se>
parents:
6840
diff
changeset
|
159 cp $^ $@ |
954a8a8c46d6
Makefile: Simplify generation of prosody.version using magic Make magic
Kim Alvefur <zash@zash.se>
parents:
6840
diff
changeset
|
160 |
6884
e32275ed5632
Makefile: Support generating prosody.version from hg archive metadata file
Kim Alvefur <zash@zash.se>
parents:
6883
diff
changeset
|
161 %.version: .hg_archival.txt |
e32275ed5632
Makefile: Support generating prosody.version from hg archive metadata file
Kim Alvefur <zash@zash.se>
parents:
6883
diff
changeset
|
162 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
|
163 |
6883
954a8a8c46d6
Makefile: Simplify generation of prosody.version using magic Make magic
Kim Alvefur <zash@zash.se>
parents:
6840
diff
changeset
|
164 %.version: .hg/dirstate |
954a8a8c46d6
Makefile: Simplify generation of prosody.version using magic Make magic
Kim Alvefur <zash@zash.se>
parents:
6840
diff
changeset
|
165 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
|
166 |
954a8a8c46d6
Makefile: Simplify generation of prosody.version using magic Make magic
Kim Alvefur <zash@zash.se>
parents:
6840
diff
changeset
|
167 %.version: |
954a8a8c46d6
Makefile: Simplify generation of prosody.version using magic Make magic
Kim Alvefur <zash@zash.se>
parents:
6840
diff
changeset
|
168 echo unknown > $@ |
954a8a8c46d6
Makefile: Simplify generation of prosody.version using magic Make magic
Kim Alvefur <zash@zash.se>
parents:
6840
diff
changeset
|
169 |
954a8a8c46d6
Makefile: Simplify generation of prosody.version using magic Make magic
Kim Alvefur <zash@zash.se>
parents:
6840
diff
changeset
|
170 |