Przeglądaj źródła

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

build: stop running prepare on each build
Ivan Dyachkov 3 lat temu
rodzic
commit
7c88b965b8
2 zmienionych plików z 5 dodań i 6 usunięć
  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
 *.conf.rendered
 lux_logs/
+/.prepare

+ 4 - 6
Makefile

@@ -30,12 +30,10 @@ export REBAR_GIT_CLONE_OPTIONS += --depth=1
 .PHONY: default
 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)/prepare-build-deps.sh
-
-FORCE:
+	@touch .prepare
 
 .PHONY: all
 all: $(REBAR) $(PROFILES)
@@ -44,6 +42,8 @@ all: $(REBAR) $(PROFILES)
 ensure-rebar3:
 	@$(SCRIPTS)/ensure-rebar3.sh
 
+$(REBAR): .prepare ensure-rebar3
+
 .PHONY: ensure-hex
 ensure-hex:
 	@mix local.hex --if-missing --force
@@ -60,8 +60,6 @@ ensure-mix-rebar: $(REBAR)
 mix-deps-get: $(ELIXIR_COMMON_DEPS)
 	@mix deps.get
 
-$(REBAR): prepare ensure-rebar3
-
 .PHONY: eunit
 eunit: $(REBAR) conf-segs
 	@ENABLE_COVER_COMPILE=1 $(REBAR) eunit -v -c --cover_export_name $(PROFILE)-eunit