Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,16 @@ i: install ## Shortcut for install

# Native binary via Spinel (optional)
SPINEL ?= spinel
NATIVE = dist/try
SPINEL_FLAGS ?= -O s
NATIVE = dist/try

.PHONY: native native-test
native: $(NATIVE)

$(NATIVE): try.rb lib/tui.rb lib/fuzzy.rb
mkdir -p dist
$(SPINEL) try.rb -o $(NATIVE)
$(SPINEL) $(SPINEL_FLAGS) try.rb -o $(NATIVE)
strip $(NATIVE)

native-test: $(NATIVE)
bash spec/tests/runner.sh $(NATIVE)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ echo '~/.local/try.rb init ~/src/tries | source' >> ~/.config/fish/config.fish
Compile a native `try` with [Spinel](https://github.com/matz/spinel). Build Spinel from source; [PR 3906](https://github.com/matz/spinel/pull/3906) is required so `IO#tty?` / `#winsize` work on handles that are not statically typed IO.

```bash
make native SPINEL=/path/to/spinel
make native SPINEL=/path/to/spinel # -O s, then strip
./dist/try --help
eval "$(./dist/try init)" # wires the shell function to the binary, not MRI
make native-test SPINEL=/path/to/spinel
Expand Down