Explorar o código

Merge pull request #9251 from id/build-stop-running-prepare-on-each-build

build: stop running prepare on each build
Ivan Dyachkov %!s(int64=3) %!d(string=hai) anos
pai
achega
7c88b965b8
Modificáronse 2 ficheiros con 5 adicións e 6 borrados
  1. 1 0
      .gitignore
  2. 4 6
      Makefile

+ 1 - 0
.gitignore

@@ -68,3 +68,4 @@ apps/emqx/test/emqx_static_checks_data/master.bpapi
 # rendered configurations
 # rendered configurations
 *.conf.rendered
 *.conf.rendered
 lux_logs/
 lux_logs/
+/.prepare

+ 4 - 6
Makefile

@@ -30,12 +30,10 @@ export REBAR_GIT_CLONE_OPTIONS += --depth=1
 .PHONY: default
 .PHONY: default
 default: $(REBAR) $(PROFILE)
 default: $(REBAR) $(PROFILE)
 
 
-.PHONY: prepare
-prepare: FORCE
+.prepare:
 	@$(SCRIPTS)/git-hooks-init.sh # this is no longer needed since 5.0 but we keep it anyway
 	@$(SCRIPTS)/git-hooks-init.sh # this is no longer needed since 5.0 but we keep it anyway
 	@$(SCRIPTS)/prepare-build-deps.sh
 	@$(SCRIPTS)/prepare-build-deps.sh
-
-FORCE:
+	@touch .prepare
 
 
 .PHONY: all
 .PHONY: all
 all: $(REBAR) $(PROFILES)
 all: $(REBAR) $(PROFILES)
@@ -44,6 +42,8 @@ all: $(REBAR) $(PROFILES)
 ensure-rebar3:
 ensure-rebar3:
 	@$(SCRIPTS)/ensure-rebar3.sh
 	@$(SCRIPTS)/ensure-rebar3.sh
 
 
+$(REBAR): .prepare ensure-rebar3
+
 .PHONY: ensure-hex
 .PHONY: ensure-hex
 ensure-hex:
 ensure-hex:
 	@mix local.hex --if-missing --force
 	@mix local.hex --if-missing --force
@@ -60,8 +60,6 @@ ensure-mix-rebar: $(REBAR)
 mix-deps-get: $(ELIXIR_COMMON_DEPS)
 mix-deps-get: $(ELIXIR_COMMON_DEPS)
 	@mix deps.get
 	@mix deps.get
 
 
-$(REBAR): prepare ensure-rebar3
-
 .PHONY: eunit
 .PHONY: eunit
 eunit: $(REBAR) conf-segs
 eunit: $(REBAR) conf-segs
 	@ENABLE_COVER_COMPILE=1 $(REBAR) eunit -v -c --cover_export_name $(PROFILE)-eunit
 	@ENABLE_COVER_COMPILE=1 $(REBAR) eunit -v -c --cover_export_name $(PROFILE)-eunit