Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 20 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,32 @@ else
stack install --pedantic --test --bench --no-run-benchmarks --local-bin-path=dist
endif

.PHONY: delete-cache-on-linker-errors
delete-cache-on-linker-errors:
# Clean
.PHONY: clean
clean: delete-cache-on-linker-errors
Comment thread
supersven marked this conversation as resolved.
Outdated
rm -rf ~/.cache/hie-bios
ifdef CABAL_DIR
rm -rf $(CABAL_DIR)/store
else
rm -rf ~/.cabal/store
endif
ifeq ($(WIRE_BUILD_WITH_CABAL), 1)
cabal clean
else
stack clean
endif
$(MAKE) -C services/nginz clean
-rm -rf dist
-rm -f .metadata

.PHONY: clean-hint
clean-hint:
@echo -e "\n\n\n>>> PSA: if you get errors that are hard to explain,"
@echo -e ">>> try 'make clean' and run your command again."
@echo -e ">>> see https://github.com/wireapp/wire-server/blob/develop/docs/developer/building.md#linker-errors-while-compiling\n\n\n"

.PHONY: delete-cache-on-linker-errors
delete-cache-on-linker-errors: clean
Comment thread
supersven marked this conversation as resolved.
Outdated

.PHONY: cabal.project.local
cabal.project.local:
Expand All @@ -77,7 +94,7 @@ endif
# Usage: make c package=brig test=1
.PHONY: c
c: cabal-fmt
cabal build $(WIRE_CABAL_BUILD_OPTIONS) $(package)
cabal build $(WIRE_CABAL_BUILD_OPTIONS) $(package) || ( make clean-hint; false )
Comment thread
supersven marked this conversation as resolved.
ifeq ($(test), 1)
./hack/bin/cabal-run-tests.sh $(package) $(testargs)
endif
Expand Down Expand Up @@ -156,18 +173,6 @@ add-license:
shellcheck:
./hack/bin/shellcheck.sh

# Clean
.PHONY: clean
clean:
ifeq ($(WIRE_BUILD_WITH_CABAL), 1)
cabal clean
else
stack clean
endif
$(MAKE) -C services/nginz clean
-rm -rf dist
-rm -f .metadata

#################################
## running integration tests

Expand Down