From 4b2678b530ccf98061f3372d76e472af2e9359b3 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 5 Mar 2016 22:14:33 +0100 Subject: Makefile: bump --- Makefile | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f939081..dbd3b4a 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,25 @@ -.PHONY: ghci -ghci: shell.nix - nix-shell --arg nixpkgs 'import ' --command 'exec ghci -Wall' - -shell.nix: $(wildcard *.cabal) - cabal2nix --shell . > $@ +.PHONY: _default +_default: ghci .PHONY: clean clean: @find * -type f \( -name \*.o -o -name \*.hi \) -exec rm -v \{\} \; +.PHONY: ghci +ghci: shell.nix + nix-shell --arg nixpkgs 'import ' --command 'exec ghci -Wall -fobject-code' + .PHONY: install install: - nix-env --arg target "$$(cabal2nix .)" -f install.nix -i + $(error to install run "make result && nix-env -i ./result") .PHONY: install-env install-env: nix-env -f env.nix -i + +.PHONY: result +result: shell.nix + nix-build --arg nixpkgs 'import ' ./shell.nix + +shell.nix: $(wildcard *.cabal) + cabal2nix --shell . > $@ -- cgit v1.2.3