2013-05-01 13:02:29 +02:00
|
|
|
REBAR = rebar
|
2013-04-08 11:12:54 +02:00
|
|
|
INSTALL = @INSTALL@
|
|
|
|
SED = @SED@
|
|
|
|
ERL = @ERL@
|
|
|
|
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
|
|
|
|
DESTDIR =
|
|
|
|
|
|
|
|
# /etc/ejabberd/
|
|
|
|
ETCDIR = $(DESTDIR)@sysconfdir@/ejabberd
|
|
|
|
|
|
|
|
# /sbin/
|
|
|
|
SBINDIR = $(DESTDIR)@sbindir@
|
|
|
|
|
|
|
|
# /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
|
|
|
|
|
|
|
|
# /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/%:
|
|
|
|
$(REBAR) get-deps
|
|
|
|
|
|
|
|
src:
|
|
|
|
$(REBAR) compile
|
|
|
|
|
|
|
|
translations:
|
|
|
|
contrib/extract_translations/prepare-translation.sh -updateall
|
|
|
|
|
|
|
|
doc:
|
|
|
|
@subdirs="$(SUBDIRS)"; for subdir in $$subdirs; do \
|
|
|
|
echo making $$target in $$subdir; \
|
|
|
|
(cd $$subdir && $(MAKE) $$target) || exit 1; \
|
|
|
|
done
|
|
|
|
|
|
|
|
doc:
|
|
|
|
echo making $$target in doc; \
|
|
|
|
(cd doc && $(MAKE) $$target) || exit 1
|
|
|
|
|
|
|
|
edoc:
|
|
|
|
$(ERL) -noinput +B -eval \
|
|
|
|
'case edoc:application(ejabberd, ".", []) of ok -> halt(0); error -> halt(1) end.'
|
|
|
|
|
|
|
|
clean:
|
2013-05-01 13:02:29 +02:00
|
|
|
$(REBAR) clean
|
2013-04-08 11:12:54 +02:00
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
rm -f config.status
|
|
|
|
rm -f config.log
|
2013-05-01 15:22:26 +02:00
|
|
|
rm -f config.rebar
|
2013-05-01 13:02:29 +02:00
|
|
|
rm -rf deps
|
2013-04-08 11:12:54 +02:00
|
|
|
rm -f Makefile
|
2013-05-01 13:02:29 +02:00
|
|
|
rm -rf rel/files
|
|
|
|
rm -rf rel/ejabberd
|
|
|
|
rm -f rel/reltool.config
|
|
|
|
rm -f src/ejabberd.app.src
|
2013-04-08 11:12:54 +02:00
|
|
|
[ ! -f ../ChangeLog ] || rm -f ../ChangeLog
|
|
|
|
|
2013-05-01 13:02:29 +02:00
|
|
|
rel:
|
|
|
|
mkdir -p rel ; cd rel ; rm -rf files ejabberd ; \
|
|
|
|
$(REBAR) create-node nodeid=ejabberd || exit 1; \
|
|
|
|
$(REBAR) generate
|
|
|
|
|
2013-04-08 11:12:54 +02:00
|
|
|
TAGS:
|
|
|
|
etags *.erl
|
|
|
|
|
|
|
|
Makefile: Makefile.in
|
|
|
|
|
|
|
|
dialyzer: $(BEAMS)
|
|
|
|
@dialyzer -c .
|
|
|
|
|
2013-05-01 13:02:29 +02:00
|
|
|
.PHONY: src doc edoc dialyzer Makefile TAGS clean distclean rel
|