-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathMakefile
More file actions
69 lines (59 loc) · 3.3 KB
/
Makefile
File metadata and controls
69 lines (59 loc) · 3.3 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
.PHONY: docs clean docs-setup preview examples
# Default target
all: examples docs
# Build examples (optionally with a filter)
examples: examples-setup
julia --project=examples examples/make.jl $(if $(FILTER),$(FILTER),) $(if $(USE_CACHE),--use-cache,) $(if $(STRICT_ENV),--strict-env,)
# Build examples with local development version of RxInfer
examples-dev: examples-setup
julia --project=examples examples/make.jl --use-dev $(if $(RXINFER),--rxinfer-path=$(RXINFER),) $(if $(FILTER),$(FILTER),) $(if $(USE_CACHE),--use-cache,) $(if $(STRICT_ENV),--strict-env,)
# Clean build artifacts
clean:
rm -rf docs/build
rm -rf docs/src/autogenerated
rm -rf docs/src/categories
# Install documentation dependencies
docs-setup:
julia --project=docs -e 'using Pkg; Pkg.instantiate()'
examples-setup:
@echo "Note: If you experience persistent errors, try 'make clean' before rebuilding the examples."
julia --project=examples -e 'using Pkg; Pkg.instantiate()'
# Build documentation
docs: docs-setup
julia --project=docs docs/make.jl
## Serve documentation locally for preview in browser
docs-serve: docs-setup
julia --project=docs/ -e 'ENV["DOCS_DRAFT"]="true"; using LiveServer; LiveServer.servedocs(launch_browser=true, port=5678)'
# Preview documentation in browser
preview:
open docs/build/index.html
# Help command
help:
@echo "Available targets:"
@echo " all - Build all examples and documentation (default)"
@echo " examples - Build all examples or a specific example (usage: make examples [FILTER=pattern] [USE_CACHE=true/false] [STRICT_ENV=true/false])"
@echo " examples-dev - Build examples with local RxInfer development version (usage: make examples-dev [FILTER=pattern] [USE_CACHE=true/false] [STRICT_ENV=true/false])"
@echo " docs - Build the documentation website"
@echo " preview - Open documentation in browser"
@echo " clean - Remove all build artifacts and caches"
@echo ""
@echo "Setup targets:"
@echo " examples-setup - Install examples dependencies"
@echo " docs-setup - Install documentation dependencies"
@echo ""
@echo " If you fix an example but still see errors,"
@echo " try running 'make clean' to clear the cache before rebuilding."
@echo " otherwise open an issue in the repository"
@echo ""
@echo "Examples:"
@echo " make examples # Build all examples"
@echo " make examples FILTER=Coin # Build specific example"
@echo " make examples USE_CACHE=true # Build all examples with caching (!actual value of USE_CACHE is ignored!)"
@echo " make examples STRICT_ENV=true # Fail if env vars missing (for CI)"
@echo " make examples-dev # Build all examples with local RxInfer"
@echo " make examples-dev FILTER=Coin # Build specific example with local RxInfer"
@echo " make examples-dev RXINFER=/path/to/RxInfer.jl # Build with specific RxInfer at path"
@echo " make examples-dev USE_CACHE=true # Build all examples with local RxInfer with caching"
@echo " make examples-dev STRICT_ENV=true # Build with local RxInfer, fail if env vars missing"
@echo " make clean && make all # Clean build everything"
@echo " make all && make preview # Build and view docs"