From 3319d70e4e8fd89fe6140e95504a718717bd4e80 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 15 Mar 2023 14:24:10 -0500 Subject: Rewrite with sh --- Makefile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a9401a1..b6efa17 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,12 @@ NAME = shin DESC = Include shell scripts in other shell scripts +INSTALLED = shin shinb + DESTDIR = PREFIX = /usr/local -BIN = $(DESTDIR)$(PREFIX)/bin/$(NAME) +BIN = $(DESTDIR)$(PREFIX)/bin .PHONY: help help: @@ -19,13 +21,16 @@ help: @echo " uninstall Uninstall $(NAME)-related files." .PHONY: install -install: $(NAME) - install -D $< $(BIN) +install: $(INSTALLED) + install -Dt $(BIN) $? .PHONY: link -link: - ln -sf $(PWD)/$(NAME) $(BIN) +link: $(NAME) shinb $(BIN) + ln -sf $(PWD)/$(NAME) $(PWD)/shinb $(BIN) .PHONY: uninstall uninstall: rm $(BIN) + +$(BIN): + mkdir -p $(BIN) -- cgit 1.4.1-21-gabe81