raz / commit accb6f2b

commit
accb6f2bf277a7136c03b06bea0dfbb8b8a6449a
author
Luis <42945842+ldiaz94@users.noreply.github.com>
date
parent
ec5976d3
make install and uninstall, under PREFIX (~/.local)

raz and lib/ go to PREFIX/lib/raz with a link in PREFIX/bin.

patch · log

3 files changed, +19 -1

CLAUDE.md modified +1 -0

@@ -15,6 +15,7 @@
1515 make gdb # gdb stops at a line of a test and names it
1616 make stress # 40,000 native threads; make check runs a small version
1717 make fmt # lib/, examples/ and tools/ are formatted
18+ make install # raz on PATH via ~/.local (PREFIX=...); make uninstall
1819
1920 `make check` also runs `tools/Doc.raz` and `tools/Pretty.raz`, the
2021 report's whole examples, each library module's own `main` (its test),

Makefile (history) modified +14 -1

@@ -72,4 +72,17 @@
7272 loc:
7373 @python3 test/loc.py src/*.pas
7474
75-.PHONY: units tests check gdb bench stress fmt loc clean
75+# raz and its library go together under $(PREFIX)/lib/raz; the link
76+# on PATH works since raz finds lib/ beside its real path.
77+PREFIX = $(HOME)/.local
78+
79+install: raz
80+ rm -rf $(PREFIX)/lib/raz
81+ mkdir -p $(PREFIX)/lib/raz $(PREFIX)/bin
82+ cp -r raz lib $(PREFIX)/lib/raz
83+ ln -sf $(PREFIX)/lib/raz/raz $(PREFIX)/bin/raz
84+
85+uninstall:
86+ rm -rf $(PREFIX)/lib/raz $(PREFIX)/bin/raz
87+
88+.PHONY: units tests check gdb bench stress fmt loc clean install uninstall

README.md (history) modified +4 -0

@@ -50,6 +50,10 @@
5050 and builds into the repository's root:
5151
5252 make # ./raz
53+ make install # ~/.local/bin/raz, its library in ~/.local/lib/raz
54+ make uninstall # removes them again
55+
56+Both take `PREFIX=/usr/local` (or another place) instead of `~/.local`.
5357
5458 The tests need a shell and Python 3; the editor checks run if vim or
5559 emacs is installed.