25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-10-31 15:21:38 +01:00
Commit Graph

134 Commits

Author SHA1 Message Date
Badlop
b0afe4946d Add Sync tool to "make relive" with Rebar3
How to use:
- Compile ejabberd with Rebar3
- Start ejabberd with "make relive"
- Edit some ejabberd source code file
- Save the file, and Sync will compile and reload it automatically

I've added src_dirs option so Sync doesn't act on dependencies,
which would produce many garbage log lines.
However, now it only works if the parent directory is named "ejabberd"

Sync requires at least Erlang/OTP 21, which introduced the
new try-catch syntax to retrieve the stacktrace
https://www.erlang.org/patches/otp-21.0

References:
https://hex.pm/packages/sync
https://github.com/rustyio/sync
2024-04-30 17:59:59 +02:00
Badlop
5c6a399f5b Update links to some moved content in docs.ejabberd.im 2024-04-25 02:55:02 +02:00
Badlop
a29d54c497 Comment ERTS_VSN variable in ejabberdctl when not used (#4194)
That variable is not used in "make relive" and "make install",
so let's comment the variable in ejabberdctl when preparing
that file for those targets.
2024-04-12 16:41:21 +02:00
Badlop
f5c8406353 Dialyzer: Add support to run Dialyzer with Mix 2024-03-06 15:25:38 +01:00
Badlop
2378ea9c07 Dialyzer: Replace re:mp dirty workaround from 0bbc255 with other less dirty 2024-03-06 15:25:38 +01:00
Badlop
bb349d6085 Update "make edoc" to use ExDoc 2024-02-26 16:16:14 +01:00
Badlop
cb9053cd79 Makefile.in: Inform what build tools support some tasks 2024-02-26 16:16:13 +01:00
Badlop
73f20a8f1e Makefile: Now --with-rebar detects if it's system-installed, otherwise use local one 2024-02-19 15:33:09 +01:00
Badlop
70e430cff1 Makefile: No need to use escript to run rebar|rebar3|mix
Usage of escript to run rebar was added to Makefile.in
when support for rebar2 was added in 4d8f770 for ejabberd 13.10.
Nowadays this seems unnecessary, and configure.ac right now can
determine what binary to use: the sysmte installed or local one.
2024-02-19 15:33:09 +01:00
Badlop
3c98ec5b48 Update "make translations" to reduce build requirements
Previously, preparing translations required rebar3 and:
  ./configure --enable-tools
  make
  make translations

With this change it works with rebar3 and mix, just running:
  ./configure
  make translations
2024-02-15 01:57:34 +01:00
Badlop
e1f863afa4 Makefile: Group all variable definitions, and later just use them 2024-02-15 01:57:32 +01:00
Badlop
f40a036d97 Makefile: Express rebar3 profile using "as profile"
This allows to use REBAR_PROFILE to add another profile.
Right now it doesn't seem specially useful, but it's possible:
  REBAR_PROFILE=dev make prod
  REBAR_PROFILE=translations make dev

https://rebar3.org/docs/configuration/profiles/
2024-02-15 01:57:30 +01:00
Badlop
daabfeb0e2 Makefile: Add install-rel and uninstall-rel 2024-01-17 14:44:09 +01:00
Badlop
c61b57f7ab Makefile: Uninstall also the man file 2024-01-17 14:44:09 +01:00
Badlop
7cae0920b8 Makefile: Use AWK and MKDIR_P 2024-01-17 14:44:09 +01:00
Badlop
920e4ba6b1 Makefile: Fix TAGS target 2024-01-17 14:44:09 +01:00
Badlop
16e58a1911 Makefile: Update PHONY targets 2024-01-17 14:44:09 +01:00
Badlop
ec7570f93e Makefile: Add sections, headers and Vim folding 2024-01-17 14:44:09 +01:00
Badlop
eeb4be6e4b Makefile: Rename "make rel" to "make prod"
Rebar2 could create a release, so it made sense to call it "make rel".

Nowadays, Rebar3 and Mix support creating different types of releases:
production, development, ...
In this sense, our "make rel" target is more properly named "make prod"

For backwards compatibility, "make rel" redirects to "make prod"
2024-01-17 10:24:34 +01:00
Badlop
aad3306bdf Makefile: Support using --with-rebar=/path/to/mix 2024-01-17 10:24:34 +01:00
Badlop
dd5a198222 Rebar3: Include Elixir files when making a release 2024-01-17 10:24:34 +01:00
Badlop
ff783d15e8 Rebar3: Compile explicitly our Elixir files when --enable-elixir 2024-01-17 10:24:34 +01:00
Badlop
e1f14aca9b Rebar3: Provide proper path to iex
We can't use iex variable, because rebar3/relx_overlay.erl already uses
all existing app names as variables.
2024-01-17 10:24:34 +01:00
Badlop
b2df22469b Elixir: Fix ejabberdctl start/live when installed
The problem appeared when:
  ./configure --with-rebar=mix
  make install
  ejabberdctl live

=INFO REPORT==== 19-Dec-2023::21:28:36.006306 ===
    application: ssl
    exited: stopped
    type: temporary
...
2024-01-17 10:24:34 +01:00
Badlop
0bbc255814 Dialyzer dirty workarounds because re:mp() is not an exported type
Since Erlang/OTP 26, Dialyzer by default reports unknown types.
ejabberd's type specs refer to the re:mp() type,
but that isn't exported in the OTP source code,
and cannot be used in any other modules.
This commit provides very dirty workarounds, and any cleaner
alternative is very welcomed.
2023-06-09 00:02:15 +02:00
Badlop
c9b3d32031 Add DOAP script to Makefile 2022-11-04 16:17:37 +01:00
Badlop
75ffce0417 configure also when running "make update", which is similar to "make deps" 2022-05-23 16:49:19 +02:00
Badlop
34e1ddb66f Update "make help" with recent changes 2022-05-23 13:58:50 +02:00
Badlop
7850ce0ec8 Ensure deps configuration is ran when getting deps (#3823) 2022-05-23 13:58:33 +02:00
Badlop
7d16907296 Configure eimp with mix to detect image convert properly (#3823) 2022-05-23 13:58:08 +02:00
Badlop
ddc457060b Improve "make clean" and "distclean" 2022-05-23 13:57:17 +02:00
Badlop
93f994d50a Generate start scripts in "make all", not in "make install" (#3821) 2022-05-23 13:57:06 +02:00
Paweł Chmielowski
75a771bfec Don't leak DESTDIR in files copied by 'make install'
This fixes issue #3819
2022-05-19 12:20:58 +02:00
Badlop
7a1e0d4720 Fix 'make xref' when using Mix; notice it only checks Elixir files 2022-05-02 13:20:52 +02:00
Badlop
45c7fbb5ae Switch "make rel" and "make dev" to paths: conf, database, logs 2022-05-02 13:17:53 +02:00
Badlop
0ef2624b57 Provide proper path to the compiled libraries in relive's ejabberdctl 2022-02-11 09:39:28 +01:00
Badlop
adbccbe852 New "make relive" similar to "ejabberdctl live" without installing
Prepare with:
  ./autogen.sh && ./configure --with-rebar=./rebar3 && make
Or use this if you installed Elixir:
  ./autogen.sh && ./configure --with-rebar=mix && make
Start without installing (it recompiles when necessary):
  make relive
It stores config, database and logs in _build/relive/
There's available the well-known script:
  _build/relive/ejabberdctl

Please note this fails immediately:
  r3:do(compile).
This crashes a few seconds later:
  rebar3:run(["compile"]).
Workaround that works correctly:
  ejabberd_admin:update().
2022-02-03 18:21:47 +01:00
Paweł Chmielowski
dc81966938 Fix 'make update' when used with rebar 3.18 2022-01-03 13:51:58 +01:00
Florian Schmaus
6b1f78e87a Remove CTLLOCKDIR (/var/lock/ejabberdctl) from Makefile.in
Flock'ing /var/lock/ejabberdctl by ejabberdctl was removed with
f7d4aae64d ("Use UUID for ctl node name (#1021)"), however the
according recipies in the Makefile where never removed. This commit
does that.
2021-12-07 10:15:47 +01:00
Badlop
5462a26a0a Remove obsolete cookie preparation in spool dir, it's now stored in HOME 2021-10-21 16:12:41 +02:00
Badlop
5f3c8dcca4 Use the configured user in systemd's ejabberd.service 2021-10-21 16:12:38 +02:00
Badlop
db920b7d7b Only install some files when option enabled in configure (#3633) 2021-10-14 15:26:41 +02:00
loong0
9643e18be7 minor fix 2021-08-26 20:33:37 +08:00
Paweł Chmielowski
c96de092fe Revert "Add workaround so rebar2 can use Elixir 1.12.0"
This reverts commit 937e1c2e37.
2021-07-22 15:51:43 +02:00
Badlop
937e1c2e37 Add workaround so rebar2 can use Elixir 1.12.0
Notice that Elixir 1.12.0 requires Erlang/OTP 21 or higher
BTW, this workaround works only with rebar2... unfortunately
rebar3 doesn't compile the elixir files from lib/
2021-07-16 16:43:08 +02:00
Badlop
4c5641a648 Add support for mix to: ./configure --enable-rebar=mix 2021-07-16 13:36:23 +02:00
Badlop
ac06161f30 There are so many targets... add "make help" 2021-06-25 12:53:47 +02:00
Badlop
0fe2aea709 New "make dev" and "./ejabberdctl" (requires using rebar3) 2021-06-25 12:53:43 +02:00
Badlop
d5adcaea61 Add support for rebar3 to "make rel" 2021-06-25 12:53:22 +02:00
Badlop
160cd11c83 Minor fixes for new_sql_schema support in SQLite (#3303) 2021-05-11 18:36:16 +02:00