diff --git a/Makefile b/Makefile index 864ce9f..72da122 100644 --- a/Makefile +++ b/Makefile @@ -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) diff --git a/README.md b/README.md index aa06a44..4eb0e66 100644 --- a/README.md +++ b/README.md @@ -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