25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Improve "make clean" and "distclean"

This commit is contained in:
Badlop 2022-05-20 11:49:07 +02:00
parent 93f994d50a
commit ddc457060b

View File

@ -112,6 +112,7 @@ ifeq "$(REBAR_VER)" "6"
CONFIGURE_DEPS= CONFIGURE_DEPS=
EBINDIR=$(DEPSDIR)/ejabberd/ebin EBINDIR=$(DEPSDIR)/ejabberd/ebin
XREFOPTIONS=graph XREFOPTIONS=graph
CLEANARG=--deps
REBARREL=MIX_ENV=prod $(REBAR) release --overwrite REBARREL=MIX_ENV=prod $(REBAR) release --overwrite
REBARDEV=MIX_ENV=dev $(REBAR) release --overwrite REBARDEV=MIX_ENV=dev $(REBAR) release --overwrite
RELIVECMD=escript rel/relive.escript && MIX_ENV=dev RELIVE=true iex --name ejabberd@localhost -S mix run RELIVECMD=escript rel/relive.escript && MIX_ENV=dev RELIVE=true iex --name ejabberd@localhost -S mix run
@ -131,6 +132,7 @@ endif
CONFIGURE_DEPS=$(REBAR) configure-deps CONFIGURE_DEPS=$(REBAR) configure-deps
EBINDIR=$(DEPSDIR)/ejabberd/ebin EBINDIR=$(DEPSDIR)/ejabberd/ebin
XREFOPTIONS= XREFOPTIONS=
CLEANARG=--all
REBARREL=$(REBAR) as prod tar REBARREL=$(REBAR) as prod tar
REBARDEV=REBAR_PROFILE=dev $(REBAR) release REBARDEV=REBAR_PROFILE=dev $(REBAR) release
RELIVECMD=$(REBAR) relive RELIVECMD=$(REBAR) relive
@ -145,6 +147,7 @@ else
CONFIGURE_DEPS=$(REBAR) configure-deps CONFIGURE_DEPS=$(REBAR) configure-deps
EBINDIR=ebin EBINDIR=ebin
XREFOPTIONS= XREFOPTIONS=
CLEANARG=
REBARREL=$(REBAR) generate REBARREL=$(REBAR) generate
REBARDEV= REBARDEV=
RELIVECMD=@echo "Rebar2 detected... relive not supported.\ RELIVECMD=@echo "Rebar2 detected... relive not supported.\
@ -402,22 +405,23 @@ clean:
rm -rf $(DEPSDIR)/.got rm -rf $(DEPSDIR)/.got
rm -rf $(DEPSDIR)/.built rm -rf $(DEPSDIR)/.built
rm -rf test/*.beam rm -rf test/*.beam
$(REBAR) clean rm -f rebar.lock
rm -f ejabberdctl.example ejabberd.init ejabberd.service
$(REBAR) clean $(CLEANARG)
clean-rel: clean-rel:
rm -rf rel/ejabberd rm -rf rel/ejabberd
distclean: clean clean-rel distclean: clean clean-rel
rm -f aclocal.m4
rm -f config.status rm -f config.status
rm -f config.log rm -f config.log
rm -rf autom4te.cache rm -rf autom4te.cache
rm -rf $(EBINDIR) rm -rf $(EBINDIR)
rm -rf $(DEPSBASE) rm -rf $(DEPSBASE)
rm -rf deps
rm -f Makefile rm -f Makefile
rm -f vars.config rm -f vars.config
rm -f src/ejabberd.app.src
rm -f ejabberdctl.example ejabberd.init ejabberd.service
[ ! -f ../ChangeLog ] || rm -f ../ChangeLog
rel: rel:
$(REBARREL) $(REBARREL)