From 4b650772b7d257a95d6f8aceb564aa0bc339e5a0 Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Wed, 18 May 2022 13:32:36 -0400 Subject: Support `make install` Closes: https://github.com/google/walk/issues/4 --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile b/Makefile index b768764..fbcce99 100644 --- a/Makefile +++ b/Makefile @@ -13,9 +13,19 @@ # limitations under the License. CFLAGS = -Wall -O2 +prefix ?= /usr/local +bindir ?= $(prefix)/bin +mandir ?= $(prefix)/share/man .DEFAULT_GOAL := walk .PHONY: clean clean: $(RM) walk + +.PHONY: install +install: sor sor.1 walk walk.1 + mkdir -p "$(bindir)" "$(mandir)/man1" + install -c sor walk "$(bindir)" + gzip -9 "$(mandir)/man1/sor.1.gz" + gzip -9 "$(mandir)/man1/walk.1.gz" -- cgit v1.2.3