Merge pull request #6214 from zmstone/build-delete-potentially-broken-symlinks
build: ensure symlinks in _build dir are deleted after fetching deps
This commit is contained in:
commit
747c609ec8
4
Makefile
4
Makefile
|
@ -85,8 +85,10 @@ $(REL_PROFILES:%=%): $(REBAR) get-dashboard
|
||||||
clean: $(PROFILES:%=clean-%)
|
clean: $(PROFILES:%=clean-%)
|
||||||
$(PROFILES:%=clean-%):
|
$(PROFILES:%=clean-%):
|
||||||
@if [ -d _build/$(@:clean-%=%) ]; then \
|
@if [ -d _build/$(@:clean-%=%) ]; then \
|
||||||
|
rm rebar.lock \
|
||||||
rm -rf _build/$(@:clean-%=%)/rel; \
|
rm -rf _build/$(@:clean-%=%)/rel; \
|
||||||
find _build/$(@:clean-%=%) -name '*.beam' -o -name '*.so' -o -name '*.app' -o -name '*.appup' -o -name '*.o' -o -name '*.d' -type f | xargs rm -f; \
|
find _build/$(@:clean-%=%) -name '*.beam' -o -name '*.so' -o -name '*.app' -o -name '*.appup' -o -name '*.o' -o -name '*.d' -type f | xargs rm -f; \
|
||||||
|
find _build/$(@:clean-%=%) -type l -delete; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
.PHONY: clean-all
|
.PHONY: clean-all
|
||||||
|
@ -95,6 +97,7 @@ clean-all:
|
||||||
|
|
||||||
.PHONY: deps-all
|
.PHONY: deps-all
|
||||||
deps-all: $(REBAR) $(PROFILES:%=deps-%)
|
deps-all: $(REBAR) $(PROFILES:%=deps-%)
|
||||||
|
@make clean # ensure clean at the end
|
||||||
|
|
||||||
## deps-<profile> is used in CI scripts to download deps and the
|
## deps-<profile> is used in CI scripts to download deps and the
|
||||||
## share downloads between CI steps and/or copied into containers
|
## share downloads between CI steps and/or copied into containers
|
||||||
|
@ -102,6 +105,7 @@ deps-all: $(REBAR) $(PROFILES:%=deps-%)
|
||||||
.PHONY: $(PROFILES:%=deps-%)
|
.PHONY: $(PROFILES:%=deps-%)
|
||||||
$(PROFILES:%=deps-%): $(REBAR) get-dashboard
|
$(PROFILES:%=deps-%): $(REBAR) get-dashboard
|
||||||
@$(REBAR) as $(@:deps-%=%) get-deps
|
@$(REBAR) as $(@:deps-%=%) get-deps
|
||||||
|
@rm -f rebar.lock
|
||||||
|
|
||||||
.PHONY: xref
|
.PHONY: xref
|
||||||
xref: $(REBAR)
|
xref: $(REBAR)
|
||||||
|
|
Loading…
Reference in New Issue