-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
50 lines (39 loc) · 918 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# This Makefile is expected to be run inside a nix-shell.
PROJ_ROOT := $(shell git rev-parse --show-toplevel)
BLOG_ADDR?=localhost
BLOG_PORT?=8020
all: sync
.PHONY: all
# Check for broken links.
check:
cabal run -- blog check
.PHONY: check
gen-css:
cabal build -- base >/dev/null
cabal exec -- base
.PHONY: gen-css
# JavaScript generated from Rust.
gen-js:
rustup default stable
make -C rust-js build
.PHONY: gen-js
sync: build-site
./sync.sh
.PHONY: sync
cabal-update:
cabal update
.PHONY: cabal-update
build-binaries:
cabal build
.PHONY: build-binaries
build-site: build-binaries
cabal run -- blog rebuild
.PHONY: build-site
watch: build-binaries
cabal run -- blog watch --host $(BLOG_ADDR) --port $(BLOG_PORT)
.PHONY: watch
nixpkgs_stable_channel := nixos-24.05
update-deps: nix/sources.json nix/sources.nix
niv update nixpkgs --branch $(nixpkgs_stable_channel)
niv update
touch update-deps