mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Makefile: Use AWK and MKDIR_P
This commit is contained in:
parent
920e4ba6b1
commit
7cae0920b8
16
Makefile.in
16
Makefile.in
@ -4,7 +4,9 @@
|
|||||||
|
|
||||||
REBAR = @ESCRIPT@ @rebar@
|
REBAR = @ESCRIPT@ @rebar@
|
||||||
MIX = @rebar@
|
MIX = @rebar@
|
||||||
|
AWK = @AWK@
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
SED = @SED@
|
SED = @SED@
|
||||||
ERL = @ERL@
|
ERL = @ERL@
|
||||||
|
|
||||||
@ -108,8 +110,8 @@ ifeq "$(notdir $(MIX))" "mix"
|
|||||||
REBAR_VER:=6
|
REBAR_VER:=6
|
||||||
REBAR_VER_318:=0
|
REBAR_VER_318:=0
|
||||||
else
|
else
|
||||||
REBAR_VER:=$(shell $(REBAR) --version | awk -F '[ .]' '/rebar / {print $$2}')
|
REBAR_VER:=$(shell $(REBAR) --version | $(AWK) -F '[ .]' '/rebar / {print $$2}')
|
||||||
REBAR_VER_318:=$(shell $(REBAR) --version | awk -F '[ .]' '/rebar / {print ($$2 == 3 && $$3 >= 18 ? 1 : 0)}')
|
REBAR_VER_318:=$(shell $(REBAR) --version | $(AWK) -F '[ .]' '/rebar / {print ($$2 == 3 && $$3 >= 18 ? 1 : 0)}')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
REBAR_ENABLE_ELIXIR = @elixir@
|
REBAR_ENABLE_ELIXIR = @elixir@
|
||||||
@ -137,7 +139,7 @@ ifeq ($(REBAR_ENABLE_ELIXIR),true)
|
|||||||
ELIXIR_LIBDIR_RAW=$(shell elixir -e "IO.puts(:filename.dirname(:code.lib_dir(:elixir)))" -e ":erlang.halt")
|
ELIXIR_LIBDIR_RAW=$(shell elixir -e "IO.puts(:filename.dirname(:code.lib_dir(:elixir)))" -e ":erlang.halt")
|
||||||
ELIXIR_LIBDIR=":$(ELIXIR_LIBDIR_RAW)"
|
ELIXIR_LIBDIR=":$(ELIXIR_LIBDIR_RAW)"
|
||||||
EXPLICIT_ELIXIR_COMPILE=MIX_ENV=default mix compile.elixir
|
EXPLICIT_ELIXIR_COMPILE=MIX_ENV=default mix compile.elixir
|
||||||
PREPARE_ELIXIR_SCRIPTS=mkdir rel/overlays; cp $(ELIXIR_LIBDIR_RAW)/../bin/iex rel/overlays/; cp $(ELIXIR_LIBDIR_RAW)/../bin/elixir rel/overlays/; sed -i 's|ERTS_BIN=$$|ERTS_BIN=$$SCRIPT_PATH/../../erts-{{erts_vsn}}/bin/|' rel/overlays/elixir
|
PREPARE_ELIXIR_SCRIPTS=$(MKDIR_P) rel/overlays; cp $(ELIXIR_LIBDIR_RAW)/../bin/iex rel/overlays/; cp $(ELIXIR_LIBDIR_RAW)/../bin/elixir rel/overlays/; sed -i 's|ERTS_BIN=$$|ERTS_BIN=$$SCRIPT_PATH/../../erts-{{erts_vsn}}/bin/|' rel/overlays/elixir
|
||||||
endif
|
endif
|
||||||
ifeq "$(REBAR_VER)" "3"
|
ifeq "$(REBAR_VER)" "3"
|
||||||
SKIPDEPS=
|
SKIPDEPS=
|
||||||
@ -188,7 +190,7 @@ deps: $(DEPSDIR)/.got
|
|||||||
$(DEPSDIR)/.got:
|
$(DEPSDIR)/.got:
|
||||||
rm -rf $(DEPSDIR)/.got
|
rm -rf $(DEPSDIR)/.got
|
||||||
rm -rf $(DEPSDIR)/.built
|
rm -rf $(DEPSDIR)/.built
|
||||||
mkdir -p $(DEPSDIR)
|
$(MKDIR_P) $(DEPSDIR)
|
||||||
$(REBAR) $(GET_DEPS) && :> $(DEPSDIR)/.got
|
$(REBAR) $(GET_DEPS) && :> $(DEPSDIR)/.got
|
||||||
$(CONFIGURE_DEPS)
|
$(CONFIGURE_DEPS)
|
||||||
|
|
||||||
@ -520,7 +522,7 @@ else
|
|||||||
deps := $(wildcard $(DEPSDIR)/*/ebin)
|
deps := $(wildcard $(DEPSDIR)/*/ebin)
|
||||||
|
|
||||||
dialyzer/erlang.plt:
|
dialyzer/erlang.plt:
|
||||||
@mkdir -p dialyzer
|
@$(MKDIR_P) dialyzer
|
||||||
@dialyzer --build_plt --output_plt dialyzer/erlang.plt \
|
@dialyzer --build_plt --output_plt dialyzer/erlang.plt \
|
||||||
-o dialyzer/erlang.log --apps kernel stdlib sasl crypto \
|
-o dialyzer/erlang.log --apps kernel stdlib sasl crypto \
|
||||||
public_key ssl mnesia inets odbc compiler erts \
|
public_key ssl mnesia inets odbc compiler erts \
|
||||||
@ -528,13 +530,13 @@ dialyzer/erlang.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
|
||||||
|
|
||||||
dialyzer/deps.plt:
|
dialyzer/deps.plt:
|
||||||
@mkdir -p dialyzer
|
@$(MKDIR_P) dialyzer
|
||||||
@dialyzer --build_plt --output_plt dialyzer/deps.plt \
|
@dialyzer --build_plt --output_plt dialyzer/deps.plt \
|
||||||
-o dialyzer/deps.log $(deps); \
|
-o dialyzer/deps.log $(deps); \
|
||||||
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
|
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
|
||||||
|
|
||||||
dialyzer/ejabberd.plt:
|
dialyzer/ejabberd.plt:
|
||||||
@mkdir -p dialyzer
|
@$(MKDIR_P) dialyzer
|
||||||
@dialyzer --build_plt --output_plt dialyzer/ejabberd.plt \
|
@dialyzer --build_plt --output_plt dialyzer/ejabberd.plt \
|
||||||
-o dialyzer/ejabberd.log ebin; \
|
-o dialyzer/ejabberd.log ebin; \
|
||||||
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
|
status=$$? ; if [ $$status -ne 2 ]; then exit $$status; else exit 0; fi
|
||||||
|
@ -10,7 +10,9 @@ AC_CONFIG_MACRO_DIR([m4])
|
|||||||
|
|
||||||
# Checks for programs.
|
# Checks for programs.
|
||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
|
AC_PROG_AWK
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
|
AC_PROG_MKDIR_P
|
||||||
AC_PROG_SED
|
AC_PROG_SED
|
||||||
|
|
||||||
if test "x$GCC" = "xyes"; then
|
if test "x$GCC" = "xyes"; then
|
||||||
|
Loading…
Reference in New Issue
Block a user