mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 20:41:49 +03:00
1375a77fd7
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5097 GitOrigin-RevId: 2463c61afbffedaaf21bdd3a014f79f1cc4b930e
24 lines
722 B
Makefile
24 lines
722 B
Makefile
GHCID_FLAGS = --builddir ./dist-newstyle/repl --repl-option -O0 --repl-option -fobject-code
|
|
PANE_WIDTH = $(shell tmux display -p "\#{pane_width}" || echo 80)
|
|
PANE_HEIGHT = $(shell tmux display -p "\#{pane_height}" || echo 30 )
|
|
|
|
|
|
define run_ghcid
|
|
@if [[ $$(uname -p) == 'arm' ]]; then \
|
|
ghcid -c "cabal repl $(1) $(GHCID_FLAGS)" --width=$(PANE_WIDTH) --height=$(PANE_HEIGHT); \
|
|
else \
|
|
ghcid -c "cabal repl $(1) $(GHCID_FLAGS)"; \
|
|
fi
|
|
endef
|
|
|
|
.PHONY: ghcid-library
|
|
## ghcid-library: build and watch library in ghcid
|
|
ghcid-library:
|
|
$(call run_ghcid,graphql-engine:lib:graphql-engine)
|
|
|
|
.PHONY: ghcid-hspec
|
|
## ghcid-hspec: build and watch tests-hspec in ghcid
|
|
ghcid-hspec:
|
|
$(call run_ghcid,graphql-engine:tests-hspec)
|
|
|