-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
81 lines (58 loc) · 2.2 KB
/
Copy pathMakefile
File metadata and controls
81 lines (58 loc) · 2.2 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
NATIVE_RUN_TARGET := run-macos
else ifeq ($(UNAME_S),Linux)
NATIVE_RUN_TARGET := run-linux
else
NATIVE_RUN_TARGET := unsupported-native-platform
endif
.PHONY: help run run-native run-macos run-linux install-linux unsupported-native-platform dev dev-native build-web build-website website run-web web serve-web sandbox-fetch sandbox-check sandbox-build sandbox-test sandbox-app sandbox-web
help:
@echo "Development:"
@echo " make run Run the native app once (alias: run-native)"
@echo " make dev Rebuild after app exit or Ctrl+C (alias: dev-native)"
@echo " make build-web Build the browser app"
@echo " make build-website Build the publishable website into target/website"
@echo " make website Serve the local website and show its link (ARGS=--rebuild to rebuild)"
@echo " make run-web Build and serve the browser app on port 8080"
@echo " make install-linux Install the app for the current user (Linux)"
@echo
@echo "Native dev controls: Ctrl+C restarts; Ctrl+\\ quits"
run: run-native
run-native: $(NATIVE_RUN_TARGET)
run-macos: sandbox-app
@/usr/bin/open -W -n target/sandbox/app/Progred.app
run-linux:
@./tools/run-linux $(ARGS)
install-linux:
@./tools/install-linux-app
unsupported-native-platform:
@echo "native Progred is not supported on $(UNAME_S)" >&2
@exit 1
dev: dev-native
dev-native:
@./tools/dev-native $(ARGS)
build-web: sandbox-web
build-website: build-web
python3 -B website/package.py
website:
@./website/Preview.command $(ARGS)
run-web: build-web
@echo "Open Progred: http://127.0.0.1:8080/editor/"
@python3 website/preview.py --no-open --port 8080
# Compatibility aliases.
web: build-web
serve-web: run-web
sandbox-fetch:
./tools/sandbox-cargo fetch
sandbox-check:
./tools/sandbox-cargo check --workspace
sandbox-build:
./tools/sandbox-cargo build --workspace
sandbox-test:
./tools/sandbox-cargo test --workspace
sandbox-app:
@./tools/build-macos-app
sandbox-web:
./tools/sandbox-cargo web-threaded build --release --bin progred -p progred
wasm-bindgen --target web --no-typescript --out-dir web/pkg --out-name progred target/sandbox/build-web/wasm32-unknown-unknown/release/progred.wasm