mirror of
https://github.com/processone/ejabberd.git
synced 2024-09-27 14:30:55 +02:00
Makefile: Add sections, headers and Vim folding
This commit is contained in:
parent
ae2993ecae
commit
ec7570f93e
72
Makefile.in
72
Makefile.in
@ -1,3 +1,7 @@
|
|||||||
|
#.
|
||||||
|
#' definitions
|
||||||
|
#
|
||||||
|
|
||||||
REBAR = @ESCRIPT@ @rebar@
|
REBAR = @ESCRIPT@ @rebar@
|
||||||
MIX = @rebar@
|
MIX = @rebar@
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
@ -71,6 +75,10 @@ SPOOLDIR = @localstatedir@/lib/ejabberd
|
|||||||
# /var/log/ejabberd/
|
# /var/log/ejabberd/
|
||||||
LOGDIR = @localstatedir@/log/ejabberd
|
LOGDIR = @localstatedir@/log/ejabberd
|
||||||
|
|
||||||
|
#.
|
||||||
|
#' install user
|
||||||
|
#
|
||||||
|
|
||||||
INSTALLUSER=@INSTALLUSER@
|
INSTALLUSER=@INSTALLUSER@
|
||||||
# if no user was enabled, don't set privileges or ownership
|
# if no user was enabled, don't set privileges or ownership
|
||||||
ifeq ($(INSTALLUSER),)
|
ifeq ($(INSTALLUSER),)
|
||||||
@ -92,6 +100,10 @@ ifneq ($(INSTALLGROUP),)
|
|||||||
G_USER=-g $(INSTALLGROUP)
|
G_USER=-g $(INSTALLGROUP)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
#.
|
||||||
|
#' rebar / rebar3 / mix
|
||||||
|
#
|
||||||
|
|
||||||
ifeq "$(notdir $(MIX))" "mix"
|
ifeq "$(notdir $(MIX))" "mix"
|
||||||
REBAR_VER:=6
|
REBAR_VER:=6
|
||||||
REBAR_VER_318:=0
|
REBAR_VER_318:=0
|
||||||
@ -165,6 +177,10 @@ else
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
#.
|
||||||
|
#' main targets
|
||||||
|
#
|
||||||
|
|
||||||
all: scripts deps src
|
all: scripts deps src
|
||||||
|
|
||||||
deps: $(DEPSDIR)/.got
|
deps: $(DEPSDIR)/.got
|
||||||
@ -208,6 +224,10 @@ edoc:
|
|||||||
$(ERL) -noinput +B -eval \
|
$(ERL) -noinput +B -eval \
|
||||||
'case edoc:application(ejabberd, ".", []) of ok -> halt(0); error -> halt(1) end.'
|
'case edoc:application(ejabberd, ".", []) of ok -> halt(0); error -> halt(1) end.'
|
||||||
|
|
||||||
|
#.
|
||||||
|
#' copy-files
|
||||||
|
#
|
||||||
|
|
||||||
JOIN_PATHS=$(if $(wordlist 2,1000,$(1)),$(firstword $(1))/$(call JOIN_PATHS,$(wordlist 2,1000,$(1))),$(1))
|
JOIN_PATHS=$(if $(wordlist 2,1000,$(1)),$(firstword $(1))/$(call JOIN_PATHS,$(wordlist 2,1000,$(1))),$(1))
|
||||||
|
|
||||||
VERSIONED_DEP=$(if $(DEP_$(1)_VERSION),$(DEP_$(1)_VERSION),$(1))
|
VERSIONED_DEP=$(if $(DEP_$(1)_VERSION),$(DEP_$(1)_VERSION),$(1))
|
||||||
@ -293,6 +313,10 @@ copy-files:
|
|||||||
|
|
||||||
copy-files-sub: copy-files-sub2
|
copy-files-sub: copy-files-sub2
|
||||||
|
|
||||||
|
#.
|
||||||
|
#' relive
|
||||||
|
#
|
||||||
|
|
||||||
relive:
|
relive:
|
||||||
$(RELIVECMD)
|
$(RELIVECMD)
|
||||||
|
|
||||||
@ -302,6 +326,10 @@ CONFIG_DIR = ${relivedir}/conf
|
|||||||
SPOOL_DIR = ${relivedir}/database
|
SPOOL_DIR = ${relivedir}/database
|
||||||
LOGS_DIR = ${relivedir}/logs
|
LOGS_DIR = ${relivedir}/logs
|
||||||
|
|
||||||
|
#.
|
||||||
|
#' scripts
|
||||||
|
#
|
||||||
|
|
||||||
ejabberdctl.relive:
|
ejabberdctl.relive:
|
||||||
$(SED) -e "s*{{installuser}}*@INSTALLUSER@*g" \
|
$(SED) -e "s*{{installuser}}*@INSTALLUSER@*g" \
|
||||||
-e "s*{{config_dir}}*${CONFIG_DIR}*g" \
|
-e "s*{{config_dir}}*${CONFIG_DIR}*g" \
|
||||||
@ -340,6 +368,10 @@ ejabberdctl.example: vars.config
|
|||||||
|
|
||||||
scripts: ejabberd.init ejabberd.service ejabberdctl.example
|
scripts: ejabberd.init ejabberd.service ejabberdctl.example
|
||||||
|
|
||||||
|
#.
|
||||||
|
#' install
|
||||||
|
#
|
||||||
|
|
||||||
install: copy-files
|
install: copy-files
|
||||||
#
|
#
|
||||||
# Configuration files
|
# Configuration files
|
||||||
@ -379,6 +411,10 @@ install: copy-files
|
|||||||
|| echo "Man page not included in sources"
|
|| echo "Man page not included in sources"
|
||||||
$(INSTALL) -m 644 COPYING $(DESTDIR)$(DOCDIR)
|
$(INSTALL) -m 644 COPYING $(DESTDIR)$(DOCDIR)
|
||||||
|
|
||||||
|
#.
|
||||||
|
#' uninstall
|
||||||
|
#
|
||||||
|
|
||||||
uninstall: uninstall-binary
|
uninstall: uninstall-binary
|
||||||
|
|
||||||
uninstall-binary:
|
uninstall-binary:
|
||||||
@ -416,6 +452,10 @@ uninstall-all: uninstall-binary
|
|||||||
rm -rf $(DESTDIR)$(SPOOLDIR)
|
rm -rf $(DESTDIR)$(SPOOLDIR)
|
||||||
rm -rf $(DESTDIR)$(LOGDIR)
|
rm -rf $(DESTDIR)$(LOGDIR)
|
||||||
|
|
||||||
|
#.
|
||||||
|
#' clean
|
||||||
|
#
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(DEPSDIR)/.got
|
rm -rf $(DEPSDIR)/.got
|
||||||
rm -rf $(DEPSDIR)/.built
|
rm -rf $(DEPSDIR)/.built
|
||||||
@ -438,6 +478,10 @@ distclean: clean clean-rel
|
|||||||
rm -f Makefile
|
rm -f Makefile
|
||||||
rm -f vars.config
|
rm -f vars.config
|
||||||
|
|
||||||
|
#.
|
||||||
|
#' releases
|
||||||
|
#
|
||||||
|
|
||||||
rel: prod
|
rel: prod
|
||||||
|
|
||||||
prod:
|
prod:
|
||||||
@ -450,11 +494,23 @@ dev $(DEV_CONFIG):
|
|||||||
$(PREPARE_ELIXIR_SCRIPTS)
|
$(PREPARE_ELIXIR_SCRIPTS)
|
||||||
$(REBARDEV)
|
$(REBARDEV)
|
||||||
|
|
||||||
|
#.
|
||||||
|
#' tags
|
||||||
|
#
|
||||||
|
|
||||||
TAGS:
|
TAGS:
|
||||||
etags *.erl
|
etags *.erl
|
||||||
|
|
||||||
|
#.
|
||||||
|
#' makefile
|
||||||
|
#
|
||||||
|
|
||||||
Makefile: Makefile.in
|
Makefile: Makefile.in
|
||||||
|
|
||||||
|
#.
|
||||||
|
#' dialyzer
|
||||||
|
#
|
||||||
|
|
||||||
ifeq "$(REBAR_VER)" "3"
|
ifeq "$(REBAR_VER)" "3"
|
||||||
dialyzer:
|
dialyzer:
|
||||||
find src/*_opt.erl -type f \! -regex ".*git.*" -exec sed -i 's/re:mp/ tuple/g' {} \;
|
find src/*_opt.erl -type f \! -regex ".*git.*" -exec sed -i 's/re:mp/ tuple/g' {} \;
|
||||||
@ -501,6 +557,10 @@ dialyzer: erlang_plt deps_plt ejabberd_plt
|
|||||||
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
|
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
#.
|
||||||
|
#' test
|
||||||
|
#
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@echo "************************** NOTICE ***************************************"
|
@echo "************************** NOTICE ***************************************"
|
||||||
@cat test/README
|
@cat test/README
|
||||||
@ -508,10 +568,18 @@ test:
|
|||||||
@cd priv && ln -sf ../sql
|
@cd priv && ln -sf ../sql
|
||||||
$(REBAR) $(SKIPDEPS) ct
|
$(REBAR) $(SKIPDEPS) ct
|
||||||
|
|
||||||
|
#.
|
||||||
|
#' phony
|
||||||
|
#
|
||||||
|
|
||||||
.PHONY: src edoc dialyzer Makefile TAGS clean clean-rel distclean prod rel \
|
.PHONY: src edoc dialyzer Makefile TAGS clean clean-rel distclean prod rel \
|
||||||
install uninstall uninstall-binary uninstall-all translations deps test \
|
install uninstall uninstall-binary uninstall-all translations deps test \
|
||||||
quicktest erlang_plt deps_plt ejabberd_plt xref hooks options
|
quicktest erlang_plt deps_plt ejabberd_plt xref hooks options
|
||||||
|
|
||||||
|
#.
|
||||||
|
#' help
|
||||||
|
#
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " [all] "
|
@echo " [all] "
|
||||||
@ -540,3 +608,7 @@ help:
|
|||||||
@echo " hooks Run hooks validator"
|
@echo " hooks Run hooks validator"
|
||||||
@echo " test Run Common Tests suite"
|
@echo " test Run Common Tests suite"
|
||||||
@echo " xref Run cross reference analysis"
|
@echo " xref Run cross reference analysis"
|
||||||
|
|
||||||
|
#.
|
||||||
|
#'
|
||||||
|
# vim: foldmarker=#',#. foldmethod=marker:
|
||||||
|
Loading…
Reference in New Issue
Block a user