2013-04-08 11:12:54 +02:00
|
|
|
REBAR = @ESCRIPT@ rebar
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
SED = @SED@
|
|
|
|
ERL = @ERL@
|
|
|
|
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
|
|
|
|
DESTDIR =
|
|
|
|
|
|
|
|
# /etc/ejabberd/
|
|
|
|
ETCDIR = $(DESTDIR)@sysconfdir@/ejabberd
|
|
|
|
|
2015-01-29 18:43:47 +01:00
|
|
|
# /bin/
|
|
|
|
BINDIR = $(DESTDIR)@bindir@
|
|
|
|
|
2013-04-08 11:12:54 +02:00
|
|
|
# /sbin/
|
|
|
|
SBINDIR = $(DESTDIR)@sbindir@
|
|
|
|
|
2015-10-19 13:46:51 +02:00
|
|
|
# /lib/
|
|
|
|
LIBDIR = $(DESTDIR)@libdir@
|
|
|
|
|
2013-04-08 11:12:54 +02:00
|
|
|
# /lib/ejabberd/
|
|
|
|
EJABBERDDIR = $(DESTDIR)@libdir@/ejabberd
|
|
|
|
|
|
|
|
# /share/doc/ejabberd
|
|
|
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
|
|
|
datarootdir = @datarootdir@
|
|
|
|
DOCDIR = $(DESTDIR)@docdir@
|
|
|
|
|
|
|
|
# /usr/lib/ejabberd/ebin/
|
|
|
|
BEAMDIR = $(EJABBERDDIR)/ebin
|
|
|
|
|
|
|
|
# /usr/lib/ejabberd/include/
|
|
|
|
INCLUDEDIR = $(EJABBERDDIR)/include
|
|
|
|
|
|
|
|
# /usr/lib/ejabberd/priv/
|
|
|
|
PRIVDIR = $(EJABBERDDIR)/priv
|
|
|
|
|
|
|
|
# /usr/lib/ejabberd/priv/bin
|
|
|
|
PBINDIR = $(PRIVDIR)/bin
|
|
|
|
|
|
|
|
# /usr/lib/ejabberd/priv/lib
|
|
|
|
SODIR = $(PRIVDIR)/lib
|
|
|
|
|
|
|
|
# /usr/lib/ejabberd/priv/msgs
|
|
|
|
MSGSDIR = $(PRIVDIR)/msgs
|
|
|
|
|
2017-10-09 20:46:38 +02:00
|
|
|
# /usr/lib/ejabberd/priv/css
|
|
|
|
CSSDIR = $(PRIVDIR)/css
|
|
|
|
|
2017-10-09 22:35:42 +02:00
|
|
|
# /usr/lib/ejabberd/priv/img
|
|
|
|
IMGDIR = $(PRIVDIR)/img
|
|
|
|
|
|
|
|
# /usr/lib/ejabberd/priv/js
|
|
|
|
JSDIR = $(PRIVDIR)/js
|
|
|
|
|
2015-03-16 19:53:19 +01:00
|
|
|
# /usr/lib/ejabberd/priv/sql
|
|
|
|
SQLDIR = $(PRIVDIR)/sql
|
|
|
|
|
2013-04-08 11:12:54 +02:00
|
|
|
# /var/lib/ejabberd/
|
|
|
|
SPOOLDIR = $(DESTDIR)@localstatedir@/lib/ejabberd
|
|
|
|
|
|
|
|
# /var/lock/ejabberdctl
|
|
|
|
CTLLOCKDIR = $(DESTDIR)@localstatedir@/lock/ejabberdctl
|
|
|
|
|
|
|
|
# /var/lib/ejabberd/.erlang.cookie
|
|
|
|
COOKIEFILE = $(SPOOLDIR)/.erlang.cookie
|
|
|
|
|
|
|
|
# /var/log/ejabberd/
|
|
|
|
LOGDIR = $(DESTDIR)@localstatedir@/log/ejabberd
|
|
|
|
|
|
|
|
INSTALLUSER=@INSTALLUSER@
|
|
|
|
# if no user was enabled, don't set privileges or ownership
|
|
|
|
ifeq ($(INSTALLUSER),)
|
|
|
|
O_USER=
|
|
|
|
G_USER=
|
|
|
|
CHOWN_COMMAND=echo
|
|
|
|
CHOWN_OUTPUT=/dev/null
|
|
|
|
INIT_USER=root
|
|
|
|
else
|
|
|
|
O_USER=-o $(INSTALLUSER)
|
|
|
|
G_USER=-g $(INSTALLUSER)
|
|
|
|
CHOWN_COMMAND=chown
|
|
|
|
CHOWN_OUTPUT=&1
|
|
|
|
INIT_USER=$(INSTALLUSER)
|
|
|
|
endif
|
|
|
|
|
|
|
|
all: deps src
|
|
|
|
|
|
|
|
deps: deps/.got
|
|
|
|
|
|
|
|
deps/.got:
|
|
|
|
rm -rf deps/.got
|
|
|
|
rm -rf deps/.built
|
2017-11-15 08:50:40 +01:00
|
|
|
mkdir -p deps
|
2013-04-08 11:12:54 +02:00
|
|
|
$(REBAR) get-deps && :> deps/.got
|
|
|
|
|
2013-07-15 19:46:41 +02:00
|
|
|
deps/.built: deps/.got
|
2013-04-08 11:12:54 +02:00
|
|
|
$(REBAR) compile && :> deps/.built
|
|
|
|
|
|
|
|
src: deps/.built
|
|
|
|
$(REBAR) skip_deps=true compile
|
|
|
|
|
|
|
|
update:
|
|
|
|
rm -rf deps/.got
|
|
|
|
rm -rf deps/.built
|
|
|
|
$(REBAR) update-deps && :> deps/.got
|
|
|
|
|
2014-08-26 16:12:57 +02:00
|
|
|
xref: all
|
|
|
|
$(REBAR) skip_deps=true xref
|
|
|
|
|
|
|
|
|
2013-04-08 11:12:54 +02:00
|
|
|
translations:
|
2017-09-27 10:30:17 +02:00
|
|
|
tools/prepare-tr.sh
|
2013-04-08 11:12:54 +02:00
|
|
|
|
|
|
|
edoc:
|
|
|
|
$(ERL) -noinput +B -eval \
|
|
|
|
'case edoc:application(ejabberd, ".", []) of ok -> halt(0); error -> halt(1) end.'
|
|
|
|
|
2015-10-28 18:12:39 +01:00
|
|
|
JOIN_PATHS=$(if $(wordlist 2,1000,$(1)),$(firstword $(1))/$(call JOIN_PATHS,$(wordlist 2,1000,$(1))),$(1))
|
|
|
|
|
2016-01-07 18:49:55 +01:00
|
|
|
VERSIONED_DEP=$(if $(DEP_$(1)_VERSION),$(DEP_$(1)_VERSION),$(1))
|
|
|
|
|
2016-01-08 11:22:59 +01:00
|
|
|
ELIXIR_TO_DEST=$(LIBDIR) $(call VERSIONED_DEP,$(word 2,$(1))) $(wordlist 5,1000,$(1))
|
2016-01-07 18:49:55 +01:00
|
|
|
DEPS_TO_DEST=$(LIBDIR) $(call VERSIONED_DEP,$(word 2,$(1))) $(wordlist 3,1000,$(1))
|
|
|
|
MAIN_TO_DEST=$(LIBDIR) $(call VERSIONED_DEP,ejabberd) $(1)
|
2015-10-28 18:12:39 +01:00
|
|
|
TO_DEST_SINGLE=$(if $(subst XdepsX,,X$(word 1,$(1))X),$(call MAIN_TO_DEST,$(1)),$(if $(subst XlibX,,X$(word 3,$(1))X),$(call DEPS_TO_DEST,$(1)),$(call ELIXIR_TO_DEST,$(1))))
|
|
|
|
TO_DEST=$(foreach path,$(1),$(call JOIN_PATHS,$(call TO_DEST_SINGLE,$(subst /, ,$(path)))))
|
|
|
|
|
2015-10-15 15:08:45 +02:00
|
|
|
FILTER_DIRS=$(foreach path,$(1),$(if $(wildcard $(path)/*),,$(path)))
|
|
|
|
FILES_WILDCARD=$(call FILTER_DIRS,$(foreach w,$(1),$(wildcard $(w))))
|
2013-06-19 02:40:33 +02:00
|
|
|
|
2016-01-07 18:49:55 +01:00
|
|
|
ifeq ($(MAKECMDGOALS),copy-files-sub)
|
|
|
|
|
2017-11-20 12:51:19 +01:00
|
|
|
DEPS:=$(sort $(shell $(REBAR) -q list-deps|$(SED) -ne '/ TAG / s/ .*// p; / REV / s/ .*// p; / BRANCH / s/ .*// p'))
|
2016-01-07 18:49:55 +01:00
|
|
|
|
2017-05-30 15:02:53 +02:00
|
|
|
DEPS_FILES=$(call FILES_WILDCARD,$(foreach DEP,$(DEPS),deps/$(DEP)/ebin/*.beam deps/$(DEP)/ebin/*.app deps/$(DEP)/priv/* deps/$(DEP)/priv/lib/* deps/$(DEP)/priv/bin/* deps/$(DEP)/include/*.hrl deps/$(DEP)/COPY* deps/$(DEP)/LICENSE* deps/$(DEP)/lib/*/ebin/*.beam deps/$(DEP)/lib/*/ebin/*.app))
|
2018-01-08 10:56:32 +01:00
|
|
|
|
|
|
|
BINARIES=deps/epam/priv/bin/epam deps/eimp/priv/bin/eimp deps/fs/priv/mac_listener
|
|
|
|
|
|
|
|
DEPS_FILES_FILTERED=$(filter-out $(BINARIES) deps/elixir/ebin/elixir.app,$(DEPS_FILES))
|
2016-01-07 18:49:55 +01:00
|
|
|
DEPS_DIRS=$(sort deps/ $(foreach DEP,$(DEPS),deps/$(DEP)/) $(dir $(DEPS_FILES)))
|
2015-10-15 15:08:45 +02:00
|
|
|
|
2017-10-09 22:35:42 +02:00
|
|
|
MAIN_FILES=$(filter-out %/configure.beam,$(call FILES_WILDCARD,ebin/*.beam ebin/*.app priv/msgs/*.msg priv/css/*.css priv/img/*.png priv/js/*.js priv/lib/* include/*.hrl COPYING))
|
2016-01-07 18:49:55 +01:00
|
|
|
MAIN_DIRS=$(sort $(dir $(MAIN_FILES)) priv/bin priv/sql)
|
|
|
|
|
|
|
|
define DEP_VERSION_template
|
2016-02-03 17:45:27 +01:00
|
|
|
DEP_$(1)_VERSION:=$(shell $(SED) -e '/vsn/!d;s/.*, *"/$(1)-/;s/".*//' $(2) 2>/dev/null)
|
2016-01-07 18:49:55 +01:00
|
|
|
endef
|
|
|
|
|
2018-01-08 11:11:42 +01:00
|
|
|
DELETE_TARGET_SO=$(if $(subst X.soX,,X$(suffix $(1))X),,rm $(call TO_DEST,$(1));)
|
|
|
|
|
2016-01-07 18:49:55 +01:00
|
|
|
$(foreach DEP,$(DEPS),$(eval $(call DEP_VERSION_template,$(DEP),deps/$(DEP)/ebin/$(DEP).app)))
|
|
|
|
$(eval $(call DEP_VERSION_template,ejabberd,ebin/ejabberd.app))
|
2015-10-15 15:08:45 +02:00
|
|
|
|
2015-10-19 16:38:31 +02:00
|
|
|
define COPY_template
|
2018-01-08 11:11:42 +01:00
|
|
|
$(call TO_DEST,$(1)): $(1) $(call TO_DEST,$(dir $(1))) ; $(call DELETE_TARGET_SO, $(1)) $$(INSTALL) -m 644 $(1) $(call TO_DEST,$(1))
|
2015-10-15 15:08:45 +02:00
|
|
|
endef
|
|
|
|
|
2018-01-08 10:56:32 +01:00
|
|
|
define COPY_BINARY_template
|
2018-01-08 11:11:42 +01:00
|
|
|
$(call TO_DEST,$(1)): $(1) $(call TO_DEST,$(dir $(1))) ; rm $(call TO_DEST,$(1)); $$(INSTALL) -m 755 $$(O_USER) $(1) $(call TO_DEST,$(1))
|
2018-01-08 10:56:32 +01:00
|
|
|
endef
|
|
|
|
|
2015-10-15 15:08:45 +02:00
|
|
|
$(foreach file,$(DEPS_FILES_FILTERED) $(MAIN_FILES),$(eval $(call COPY_template,$(file))))
|
|
|
|
|
2018-01-08 10:56:32 +01:00
|
|
|
$(foreach file,$(BINARIES),$(eval $(call COPY_BINARY_template,$(file))))
|
|
|
|
|
2015-10-28 18:12:39 +01:00
|
|
|
$(sort $(call TO_DEST,$(MAIN_DIRS) $(DEPS_DIRS))):
|
2015-10-15 15:08:45 +02:00
|
|
|
$(INSTALL) -d $@
|
|
|
|
|
2016-01-07 18:49:55 +01:00
|
|
|
$(call TO_DEST,priv/sql/lite.sql): sql/lite.sql $(call TO_DEST,priv/sql)
|
|
|
|
$(INSTALL) -m 644 $< $@
|
|
|
|
|
|
|
|
$(call TO_DEST,priv/bin/captcha.sh): tools/captcha.sh $(call TO_DEST,priv/bin)
|
2017-10-02 11:51:15 +02:00
|
|
|
$(INSTALL) -m 755 $(O_USER) $< $@
|
2015-10-15 15:08:45 +02:00
|
|
|
|
2016-01-07 18:49:55 +01:00
|
|
|
copy-files-sub2: $(call TO_DEST,$(DEPS_FILES) $(MAIN_FILES) priv/bin/captcha.sh priv/sql/lite.sql)
|
|
|
|
|
2018-01-08 10:56:53 +01:00
|
|
|
.PHONY: $(call TO_DEST,$(DEPS_FILES) $(MAIN_DIRS) $(DEPS_DIRS))
|
|
|
|
|
2016-01-07 18:49:55 +01:00
|
|
|
endif
|
|
|
|
|
2015-12-02 12:39:34 +01:00
|
|
|
copy-files:
|
|
|
|
$(MAKE) copy-files-sub
|
|
|
|
|
2016-01-07 18:49:55 +01:00
|
|
|
copy-files-sub: copy-files-sub2
|
2015-10-15 15:08:45 +02:00
|
|
|
|
|
|
|
install: all copy-files
|
2013-04-08 11:12:54 +02:00
|
|
|
#
|
|
|
|
# Configuration files
|
|
|
|
$(INSTALL) -d -m 750 $(G_USER) $(ETCDIR)
|
2013-08-12 14:25:05 +02:00
|
|
|
[ -f $(ETCDIR)/ejabberd.yml ] \
|
|
|
|
&& $(INSTALL) -b -m 640 $(G_USER) ejabberd.yml.example $(ETCDIR)/ejabberd.yml-new \
|
|
|
|
|| $(INSTALL) -b -m 640 $(G_USER) ejabberd.yml.example $(ETCDIR)/ejabberd.yml
|
2016-11-24 07:55:06 +01:00
|
|
|
$(SED) -e "s*{{rootdir}}*@prefix@*g" \
|
|
|
|
-e "s*{{installuser}}*@INSTALLUSER@*g" \
|
|
|
|
-e "s*{{bindir}}*@bindir@*g" \
|
|
|
|
-e "s*{{libdir}}*@libdir@*g" \
|
|
|
|
-e "s*{{sysconfdir}}*@sysconfdir@*g" \
|
|
|
|
-e "s*{{localstatedir}}*@localstatedir@*g" \
|
|
|
|
-e "s*{{docdir}}*@docdir@*g" \
|
|
|
|
-e "s*{{erl}}*@ERL@*g" \
|
|
|
|
-e "s*{{epmd}}*@EPMD@*g" ejabberdctl.template \
|
2013-04-08 11:12:54 +02:00
|
|
|
> ejabberdctl.example
|
2013-08-24 14:09:46 +02:00
|
|
|
[ -f $(ETCDIR)/ejabberdctl.cfg ] \
|
|
|
|
&& $(INSTALL) -b -m 640 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg-new \
|
|
|
|
|| $(INSTALL) -b -m 640 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg
|
2013-04-08 11:12:54 +02:00
|
|
|
$(INSTALL) -b -m 644 $(G_USER) inetrc $(ETCDIR)/inetrc
|
|
|
|
#
|
|
|
|
# Administration script
|
|
|
|
[ -d $(SBINDIR) ] || $(INSTALL) -d -m 755 $(SBINDIR)
|
|
|
|
$(INSTALL) -m 550 $(G_USER) ejabberdctl.example $(SBINDIR)/ejabberdctl
|
2015-01-29 18:43:47 +01:00
|
|
|
# Elixir binaries
|
|
|
|
[ -d $(BINDIR) ] || $(INSTALL) -d -m 755 $(BINDIR)
|
2015-09-21 17:51:13 +02:00
|
|
|
[ -f deps/elixir/bin/iex ] && $(INSTALL) -m 550 $(G_USER) deps/elixir/bin/iex $(BINDIR)/iex || true
|
|
|
|
[ -f deps/elixir/bin/elixir ] && $(INSTALL) -m 550 $(G_USER) deps/elixir/bin/elixir $(BINDIR)/elixir || true
|
|
|
|
[ -f deps/elixir/bin/mix ] && $(INSTALL) -m 550 $(G_USER) deps/elixir/bin/mix $(BINDIR)/mix || true
|
2013-04-08 11:12:54 +02:00
|
|
|
#
|
|
|
|
# Init script
|
2016-11-24 07:55:06 +01:00
|
|
|
$(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" \
|
|
|
|
-e "s*@installuser@*$(INIT_USER)*g" ejabberd.init.template \
|
2013-04-08 11:12:54 +02:00
|
|
|
> ejabberd.init
|
|
|
|
chmod 755 ejabberd.init
|
|
|
|
#
|
2016-11-04 16:35:59 +01:00
|
|
|
# Service script
|
2016-11-24 07:55:06 +01:00
|
|
|
$(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" ejabberd.service.template \
|
2016-11-04 16:35:59 +01:00
|
|
|
> ejabberd.service
|
2016-11-24 07:59:27 +01:00
|
|
|
chmod 644 ejabberd.service
|
2016-11-04 16:35:59 +01:00
|
|
|
#
|
2013-04-08 11:12:54 +02:00
|
|
|
# Spool directory
|
|
|
|
$(INSTALL) -d -m 750 $(O_USER) $(SPOOLDIR)
|
|
|
|
$(CHOWN_COMMAND) -R @INSTALLUSER@ $(SPOOLDIR) >$(CHOWN_OUTPUT)
|
|
|
|
chmod -R 750 $(SPOOLDIR)
|
|
|
|
[ ! -f $(COOKIEFILE) ] || { $(CHOWN_COMMAND) @INSTALLUSER@ $(COOKIEFILE) >$(CHOWN_OUTPUT) ; chmod 400 $(COOKIEFILE) ; }
|
|
|
|
#
|
|
|
|
# ejabberdctl lock directory
|
|
|
|
$(INSTALL) -d -m 750 $(O_USER) $(CTLLOCKDIR)
|
|
|
|
$(CHOWN_COMMAND) -R @INSTALLUSER@ $(CTLLOCKDIR) >$(CHOWN_OUTPUT)
|
|
|
|
chmod -R 750 $(CTLLOCKDIR)
|
|
|
|
#
|
|
|
|
# Log directory
|
|
|
|
$(INSTALL) -d -m 750 $(O_USER) $(LOGDIR)
|
|
|
|
$(CHOWN_COMMAND) -R @INSTALLUSER@ $(LOGDIR) >$(CHOWN_OUTPUT)
|
|
|
|
chmod -R 750 $(LOGDIR)
|
|
|
|
#
|
|
|
|
# Documentation
|
|
|
|
$(INSTALL) -d $(DOCDIR)
|
2014-09-05 17:10:58 +02:00
|
|
|
[ -f doc/guide.html ] \
|
|
|
|
&& $(INSTALL) -m 644 doc/guide.html $(DOCDIR) \
|
2015-05-20 11:43:29 +02:00
|
|
|
|| echo "Documentation not included in sources"
|
2013-04-08 11:12:54 +02:00
|
|
|
$(INSTALL) -m 644 COPYING $(DOCDIR)
|
|
|
|
|
|
|
|
uninstall: uninstall-binary
|
|
|
|
|
|
|
|
uninstall-binary:
|
|
|
|
rm -f $(SBINDIR)/ejabberdctl
|
2015-01-29 18:43:47 +01:00
|
|
|
rm -f $(BINDIR)/iex
|
|
|
|
rm -f $(BINDIR)/elixir
|
|
|
|
rm -f $(BINDIR)/mix
|
2013-04-08 11:12:54 +02:00
|
|
|
rm -fr $(DOCDIR)
|
|
|
|
rm -f $(BEAMDIR)/*.beam
|
|
|
|
rm -f $(BEAMDIR)/*.app
|
|
|
|
rm -fr $(BEAMDIR)
|
|
|
|
rm -f $(INCLUDEDIR)/*.hrl
|
|
|
|
rm -fr $(INCLUDEDIR)
|
|
|
|
rm -fr $(PBINDIR)
|
|
|
|
rm -f $(SODIR)/*.so
|
|
|
|
rm -fr $(SODIR)
|
2017-10-09 22:35:42 +02:00
|
|
|
rm -f $(MSGSDIR)/*.msg
|
2013-04-08 11:12:54 +02:00
|
|
|
rm -fr $(MSGSDIR)
|
2017-10-09 20:46:38 +02:00
|
|
|
rm -f $(CSSDIR)/*.css
|
|
|
|
rm -fr $(CSSDIR)
|
2017-10-09 22:35:42 +02:00
|
|
|
rm -f $(IMGDIR)/*.png
|
|
|
|
rm -fr $(IMGDIR)
|
|
|
|
rm -f $(JSDIR)/*.js
|
|
|
|
rm -fr $(JSDIR)
|
2015-03-16 19:53:19 +01:00
|
|
|
rm -f $(SQLDIR)/*.sql
|
|
|
|
rm -fr $(SQLDIR)
|
2013-04-08 11:12:54 +02:00
|
|
|
rm -fr $(PRIVDIR)
|
|
|
|
rm -fr $(EJABBERDDIR)
|
|
|
|
|
|
|
|
uninstall-all: uninstall-binary
|
|
|
|
rm -rf $(ETCDIR)
|
|
|
|
rm -rf $(EJABBERDDIR)
|
|
|
|
rm -rf $(SPOOLDIR)
|
|
|
|
rm -rf $(CTLLOCKDIR)
|
|
|
|
rm -rf $(LOGDIR)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf deps/.got
|
|
|
|
rm -rf deps/.built
|
2013-06-27 07:35:10 +02:00
|
|
|
rm -rf test/*.beam
|
2013-04-08 11:12:54 +02:00
|
|
|
$(REBAR) clean
|
|
|
|
|
|
|
|
clean-rel:
|
|
|
|
rm -rf rel/ejabberd
|
|
|
|
|
|
|
|
distclean: clean clean-rel
|
|
|
|
rm -f config.status
|
|
|
|
rm -f config.log
|
|
|
|
rm -rf autom4te.cache
|
|
|
|
rm -rf deps
|
|
|
|
rm -rf ebin
|
|
|
|
rm -f Makefile
|
|
|
|
rm -f vars.config
|
|
|
|
rm -f src/ejabberd.app.src
|
|
|
|
[ ! -f ../ChangeLog ] || rm -f ../ChangeLog
|
|
|
|
|
|
|
|
rel: all
|
|
|
|
$(REBAR) generate
|
|
|
|
|
|
|
|
TAGS:
|
|
|
|
etags *.erl
|
|
|
|
|
|
|
|
Makefile: Makefile.in
|
|
|
|
|
2013-06-23 19:37:18 +02:00
|
|
|
deps := $(wildcard deps/*/ebin)
|
|
|
|
|
|
|
|
dialyzer/erlang.plt:
|
|
|
|
@mkdir -p dialyzer
|
|
|
|
@dialyzer --build_plt --output_plt dialyzer/erlang.plt \
|
|
|
|
-o dialyzer/erlang.log --apps kernel stdlib sasl crypto \
|
2017-03-20 11:48:17 +01:00
|
|
|
public_key ssl mnesia inets odbc tools compiler erts \
|
2013-06-23 19:37:18 +02:00
|
|
|
runtime_tools asn1 observer xmerl et gs wx syntax_tools; \
|
|
|
|
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
|
|
|
|
|
|
|
|
dialyzer/deps.plt:
|
|
|
|
@mkdir -p dialyzer
|
|
|
|
@dialyzer --build_plt --output_plt dialyzer/deps.plt \
|
|
|
|
-o dialyzer/deps.log $(deps); \
|
|
|
|
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
|
|
|
|
|
|
|
|
dialyzer/ejabberd.plt:
|
|
|
|
@mkdir -p dialyzer
|
|
|
|
@dialyzer --build_plt --output_plt dialyzer/ejabberd.plt \
|
|
|
|
-o dialyzer/ejabberd.log ebin; \
|
|
|
|
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
|
|
|
|
|
2013-06-24 05:11:45 +02:00
|
|
|
erlang_plt: dialyzer/erlang.plt
|
2013-06-24 12:58:52 +02:00
|
|
|
@dialyzer --plt dialyzer/erlang.plt --check_plt -o dialyzer/erlang.log; \
|
|
|
|
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
|
2013-06-24 05:11:45 +02:00
|
|
|
|
|
|
|
deps_plt: dialyzer/deps.plt
|
2013-06-24 12:58:52 +02:00
|
|
|
@dialyzer --plt dialyzer/deps.plt --check_plt -o dialyzer/deps.log; \
|
|
|
|
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
|
2013-06-24 05:11:45 +02:00
|
|
|
|
|
|
|
ejabberd_plt: dialyzer/ejabberd.plt
|
2013-06-24 12:58:52 +02:00
|
|
|
@dialyzer --plt dialyzer/ejabberd.plt --check_plt -o dialyzer/ejabberd.log; \
|
|
|
|
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
|
2013-06-24 05:11:45 +02:00
|
|
|
|
|
|
|
dialyzer: erlang_plt deps_plt ejabberd_plt
|
|
|
|
@dialyzer --plts dialyzer/*.plt --no_check_plt \
|
2013-06-23 19:37:18 +02:00
|
|
|
--get_warnings -o dialyzer/error.log ebin; \
|
|
|
|
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
|
2013-04-08 11:12:54 +02:00
|
|
|
|
|
|
|
test:
|
2013-06-19 12:11:20 +02:00
|
|
|
@echo "************************** NOTICE ***************************************"
|
|
|
|
@cat test/README
|
|
|
|
@echo "*************************************************************************"
|
2015-03-16 19:53:19 +01:00
|
|
|
@cd priv && ln -sf ../sql
|
2013-06-17 20:04:32 +02:00
|
|
|
$(REBAR) skip_deps=true ct
|
2013-04-08 11:12:54 +02:00
|
|
|
|
2015-03-08 17:06:43 +01:00
|
|
|
quicktest:
|
|
|
|
$(REBAR) skip_deps=true ct suites=elixir
|
|
|
|
|
2015-05-20 11:43:29 +02:00
|
|
|
.PHONY: src edoc dialyzer Makefile TAGS clean clean-rel distclean rel \
|
2016-11-19 11:03:33 +01:00
|
|
|
install uninstall uninstall-binary uninstall-all translations deps test \
|
2015-03-08 17:06:43 +01:00
|
|
|
quicktest erlang_plt deps_plt ejabberd_plt
|