PREFIX and DESTDIR for make install

This commit is contained in:
dzaima 2022-09-14 16:57:23 +03:00
parent 9c5396e711
commit 5bf4e20ead
2 changed files with 5 additions and 3 deletions

View File

@ -11,7 +11,7 @@
- `gmake` on BSDs
- For Windows, CBQN works in WSL, and [WinBQN](https://github.com/actalley/WinBQN) provides Cygwin/Msys2 builds.
- `make clean` if anything goes bad and you want a clean slate
- `make [...]; sudo make install` to install into `/usr/local/bin/bqn`; `sudo make uninstall` to uninstall
- `make [...]; sudo make install` to install into `/usr/local/bin/bqn` (a `PREFIX=/some/path` argument will install to `/some/path/bin/bqn`); `sudo make uninstall` to uninstall
- If you want to use custom build types but your system doesn't have `shasum`/`sha256sum`, add `force_build_dir=some_identifier`. That identifier will be used to decide on the directory for incremental build object files.
2. `./BQN somefile.bqn` to execute a file, or `rlwrap ./BQN` for a REPL

View File

@ -253,11 +253,13 @@ ifeq (${i_singeli}, 1)
-include obj/singeli/*.d
endif
DESTDIR =
PREFIX = /usr/local
install:
cp -f BQN /usr/local/bin/bqn
cp -f BQN "$(DESTDIR)$(PREFIX)/bin/bqn"
uninstall:
rm -f /usr/local/bin/bqn
rm -f "$(DESTDIR)$(PREFIX)/bin/bqn"
clean-singeli:
rm -rf src/singeli/gen/