Просмотр исходного кода

Download erlang.mk and use git tag in appfile vsn

spring2maz 7 лет назад
Родитель
Сommit
520a5e0225
3 измененных файлов с 2 добавлено и 2764 удалено
  1. 1 0
      .gitignore
  2. 1 23
      Makefile
  3. 0 2741
      erlang.mk

+ 1 - 0
.gitignore

@@ -37,3 +37,4 @@ compile_commands.json
 cuttlefish
 rebar.lock
 xrefr
+erlang.mk

+ 1 - 23
Makefile

@@ -47,29 +47,7 @@ PLT_APPS = sasl asn1 ssl syntax_tools runtime_tools crypto xmerl os_mon inets pu
 DIALYZER_DIRS := ebin/
 DIALYZER_OPTS := --verbose --statistics -Werror_handling -Wrace_conditions #-Wunmatched_returns
 
-GIT_VSN := $(shell git --version | grep -oE "[0-9]{1,2}\.[0-9]{1,2}")
-GIT_VSN_17_COMP := $(shell echo -e "$(GIT_VSN)\n1.7" | sort -V | tail -1)
-
-ifeq ($(GIT_VSN_17_COMP),1.7)
-define dep_fetch_git-emqx
-	git clone -q -n -- $(call dep_repo,$(1)) $(DEPS_DIR)/$(call dep_name,$(1)); \
-		cd $(DEPS_DIR)/$(call dep_name,$(1)) && git checkout -q $(call dep_commit,$(1))
-endef
-else
-define dep_fetch_git-emqx
-	git clone -q -c advice.detachedHead=false --depth 1 -b $(call dep_commit,$(1)) -- $(call dep_repo,$(1)) $(DEPS_DIR)/$(call dep_name,$(1))
-endef
-endif
-
-core_http_get-emqx = curl -Lf$(if $(filter-out 0,$(V)),,s)o $(call core_native_path,$1) $2
-
-define dep_fetch_hex-emqx
-	mkdir -p $(ERLANG_MK_TMP)/hex $(DEPS_DIR)/$1; \
-	$(call core_http_get-emqx,$(ERLANG_MK_TMP)/hex/$1.tar,\
-		https://repo.hex.pm/tarballs/$1-$(strip $(word 2,$(dep_$1))).tar); \
-	tar -xOf $(ERLANG_MK_TMP)/hex/$1.tar contents.tar.gz | tar -C $(DEPS_DIR)/$1 -xzf -;
-endef
-
+$(shell [ -f erlang.mk ] || curl -s -o erlang.mk https://raw.githubusercontent.com/emqx/erlmk/master/erlang.mk)
 include erlang.mk
 
 clean:: gen-clean

Разница между файлами не показана из-за своего большого размера
+ 0 - 2741
erlang.mk