mirror of
https://github.com/anoma/juvix.git
synced 2024-11-23 08:18:43 +03:00
[ Makefile ] add targets with --watch option (stack cmds) and remove unused things
This commit is contained in:
parent
cd2e19e265
commit
02474c837f
75
Makefile
75
Makefile
@ -2,9 +2,6 @@ PWD=$(CURDIR)
|
||||
PREFIX="$(PWD)/.stack-work/prefix"
|
||||
UNAME := $(shell uname)
|
||||
|
||||
AGDA_FILES := $(wildcard ./src/MiniJuvix/Syntax/*.agda)
|
||||
GEN_HS := $(patsubst %.agda, %.hs, $(AGDA_FILES))
|
||||
|
||||
ifeq ($(UNAME), Darwin)
|
||||
THREADS := $(shell sysctl -n hw.logicalcpu)
|
||||
else ifeq ($(UNAME), Linux)
|
||||
@ -40,34 +37,17 @@ docs :
|
||||
cd docs ; \
|
||||
sh conv.sh
|
||||
|
||||
.PHONY : cabal
|
||||
cabal :
|
||||
cabal build all
|
||||
|
||||
.PHONY : stan
|
||||
stan :
|
||||
stan check --include --filter-all --directory=src
|
||||
|
||||
setup:
|
||||
stack build --only-dependencies --jobs $(THREADS)
|
||||
|
||||
.PHONY : test
|
||||
test:
|
||||
stack test --fast --jobs $(THREADS)
|
||||
|
||||
.PHONY : install
|
||||
install:
|
||||
stack install --fast --jobs $(THREADS)
|
||||
|
||||
.PHONY : build
|
||||
build:
|
||||
stack build --fast --jobs $(THREADS)
|
||||
|
||||
stack-build-watch:
|
||||
build-watch:
|
||||
stack build --fast --file-watch
|
||||
|
||||
repl:
|
||||
stack ghci MiniJuvix:lib
|
||||
|
||||
.PHONY : cabal
|
||||
cabal :
|
||||
cabal build all
|
||||
|
||||
clean:
|
||||
cabal clean
|
||||
@ -76,31 +56,28 @@ clean:
|
||||
clean-full:
|
||||
stack clean --full
|
||||
|
||||
.PHONY : test
|
||||
test:
|
||||
stack test --fast --jobs $(THREADS)
|
||||
|
||||
.PHONY : test-watch
|
||||
test-watch:
|
||||
stack test --fast --jobs $(THREADS) --file-watch
|
||||
|
||||
format:
|
||||
find ./src/ -name "*.hs" -exec ormolu --mode inplace {} --ghc-opt -XStandaloneDeriving --ghc-opt -XUnicodeSyntax --ghc-opt -XDerivingStrategies --ghc-opt -XMultiParamTypeClasses --ghc-opt -XTemplateHaskell \;
|
||||
find . -path './src/**/*.hs' -or -path './app/**/*.hs' -exec ormolu --mode inplace {} --ghc-opt -XStandaloneDeriving --ghc-opt -XUnicodeSyntax --ghc-opt -XDerivingStrategies --ghc-opt -XMultiParamTypeClasses --ghc-opt -XTemplateHaskell \;
|
||||
|
||||
.PHONY : install
|
||||
install:
|
||||
stack install --fast --jobs $(THREADS)
|
||||
|
||||
.PHONY : install-watch
|
||||
install-watch:
|
||||
stack install --fast --jobs $(THREADS) --file-watch
|
||||
|
||||
repl:
|
||||
stack ghci MiniJuvix:lib
|
||||
|
||||
|
||||
prepare-push:
|
||||
make checklines && make hlint && make format
|
||||
|
||||
.PHONY: install-agda
|
||||
install-agda:
|
||||
git clone https://github.com/agda/agda.git
|
||||
cd agda
|
||||
cabal update
|
||||
cabal install --overwrite-policy=always --ghc-options='-O2 +RTS -M6G -RTS' alex-3.2.6
|
||||
cabal install --overwrite-policy=always --ghc-options='-O2 +RTS -M6G -RTS' happy-1.19.12
|
||||
pwd
|
||||
cabal install --overwrite-policy=always --ghc-options='-O2 +RTS -M6G -RTS' -foptimise-heavily
|
||||
|
||||
.PHONY : install-agda2hs
|
||||
install-agda2hs:
|
||||
git clone https://github.com/agda/agda2hs.git
|
||||
cd agda2hs && cabal new-install --overwrite-policy=always
|
||||
mkdir -p .agda/
|
||||
touch .agda/libraries
|
||||
echo "agda2hs/agda2hs.agda-lib" > ~/.agda/libraries
|
||||
|
||||
.PHONY : agda
|
||||
agda :
|
||||
agda2hs ./src/MiniJuvix/Syntax/Core.agda -o src -XUnicodeSyntax -XStandaloneDeriving -XDerivingStrategies -XMultiParamTypeClasses
|
||||
agda2hs ./src/MiniJuvix/Syntax/Eval.agda -o src -XUnicodeSyntax -XStandaloneDeriving -XDerivingStrategies -XMultiParamTypeClasses
|
||||
|
Loading…
Reference in New Issue
Block a user