Skip to content

Commit 8d815eb

Browse files
committed
refreshing
1 parent bc44611 commit 8d815eb

File tree

20 files changed

+1651
-2273
lines changed

20 files changed

+1651
-2273
lines changed

Cargo.lock

Lines changed: 0 additions & 198 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
name = "eyelite"
33
version = "0.1.0"
44
edition = "2021"
5+
license = "MIT"
56

67
[dependencies]
7-
pest = "2.7"
8-
pest_derive = "2.7"
9-
thiserror = "1.0"
108

Makefile

Lines changed: 43 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,50 @@
1-
.PHONY: build socrates backward all clean
1+
# Makefile for eyelite
22

3-
build:
4-
cargo build --release
5-
6-
backward: build
7-
target/release/eyelite examples/backward_demo.n3 > examples/output/backward_demo.n3
8-
9-
french: build
10-
target/release/eyelite examples/french_cities.n3 > examples/output/french_cities.n3
11-
12-
lldm: build
13-
target/release/eyelite examples/lldm.n3 > examples/output/lldm.n3
3+
SHELL := /bin/bash
4+
BIN := target/release/eyelite
5+
EXAMPLE_DIR := examples
6+
EXAMPLES := $(wildcard $(EXAMPLE_DIR)/*.n3)
147

15-
peano: build
16-
target/release/eyelite examples/peano.n3 > examples/output/peano.n3
8+
.PHONY: all release clean fmt clippy run-examples run-one list-examples
179

18-
socrates: build
19-
target/release/eyelite examples/socrates.n3 > examples/output/socrates.n3
10+
all: release run-examples
2011

21-
all: backward french lldm peano socrates
12+
release:
13+
cargo build --release
2214

2315
clean:
2416
cargo clean
17+
18+
fmt:
19+
cargo fmt
20+
21+
clippy:
22+
cargo clippy -- -D warnings
23+
24+
list-examples:
25+
@echo "Examples:"
26+
@for f in $(EXAMPLES); do echo " $$f"; done
27+
28+
# Run all examples, show output and save to examples-output.n3
29+
run-examples: release
30+
@{ \
31+
set -euo pipefail; \
32+
for f in $(EXAMPLES); do \
33+
echo "# =================================================="; \
34+
echo "# Running $$f"; \
35+
echo "# --------------------------------------------------"; \
36+
$(BIN) "$$f"; \
37+
echo; \
38+
done; \
39+
echo "# All examples finished OK."; \
40+
} 2>&1 | tee examples-output.n3
41+
42+
# Run one example: make run-one FILE=examples/foo.n3
43+
run-one: release
44+
@if [ -z "$(FILE)" ]; then \
45+
echo "Usage: make run-one FILE=examples/foo.n3"; \
46+
exit 1; \
47+
fi
48+
@echo "Running $(FILE)"
49+
@$(BIN) "$(FILE)"
50+

0 commit comments

Comments
 (0)