25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-30 16:36:29 +01:00

Makefile with optional ejabberd_debug.erl compilation (EJAB-1242)

Only compile and install ejabberd_debug.erl when running:
 make ejabberd_debug=true
This commit is contained in:
Badlop 2010-05-28 00:48:04 +02:00
parent d4d45f3a50
commit 1777ecd15a
2 changed files with 5 additions and 2 deletions

View File

@ -37,8 +37,10 @@ ifdef debug
EFLAGS+=+debug_info +export_all EFLAGS+=+debug_info +export_all
endif endif
DEBUGTOOLS = ejabberd_debug.erl
ifdef ejabberd_debug ifdef ejabberd_debug
EFLAGS+=-Dejabberd_debug EFLAGS+=-Dejabberd_debug
SOURCES+=$(DEBUGTOOLS)
endif endif
ifeq (@hipe@, true) ifeq (@hipe@, true)
@ -69,7 +71,8 @@ SUBDIRS = @mod_irc@ @mod_pubsub@ @mod_muc@ @mod_proxy65@ @eldap@ @pam@ @web@ str
ERLSHLIBS = expat_erl.so ERLSHLIBS = expat_erl.so
ERLBEHAVS = cyrsasl.erl gen_mod.erl p1_fsm.erl ERLBEHAVS = cyrsasl.erl gen_mod.erl p1_fsm.erl
SOURCES_ALL = $(wildcard *.erl) SOURCES_ALL = $(wildcard *.erl)
SOURCES = $(filter-out $(ERLBEHAVS),$(SOURCES_ALL)) SOURCES_MISC = $(ERLBEHAVS) $(DEBUGTOOLS)
SOURCES += $(filter-out $(SOURCES_MISC),$(SOURCES_ALL))
ERLBEHAVBEAMS = $(ERLBEHAVS:.erl=.beam) ERLBEHAVBEAMS = $(ERLBEHAVS:.erl=.beam)
BEAMS = $(SOURCES:.erl=.beam) BEAMS = $(SOURCES:.erl=.beam)

View File

@ -85,7 +85,7 @@ prep_stop(State) ->
stop(_State) -> stop(_State) ->
?INFO_MSG("ejabberd ~s is stopped in the node ~p", [?VERSION, node()]), ?INFO_MSG("ejabberd ~s is stopped in the node ~p", [?VERSION, node()]),
delete_pid_file(), delete_pid_file(),
ejabberd_debug:stop(), %%ejabberd_debug:stop(),
ok. ok.