Commit: cb0497c03b04dffbe68fe608bc17b83f339c12ea
Parent: f73e8736b3b03eb36d3c8ac96c047a2ddafa301b
Author: Mike Gabriel
Date: Wed, 10 Mar 2021 14:39:31 +0100
Makefile: Prefix all installation target paths with $(DESTDIR) (#20)
Simplifies distro packaging of xsct. See https://www.gnu.org/prep/standards/html_node/DESTDIR.html .
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
@@ -12,10 +12,10 @@ $(PROG): $(SRCS)
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
install: $(PROG) $(PROG).1
- $(INSTALL) -d $(BIN)
- $(INSTALL) -m 0755 $(PROG) $(BIN)
- $(INSTALL) -d $(MAN)
- $(INSTALL) -m 0644 $(PROG).1 $(MAN)
+ $(INSTALL) -d $(DESTDIR)$(BIN)
+ $(INSTALL) -m 0755 $(PROG) $(DESTDIR)$(BIN)
+ $(INSTALL) -d $(DESTDIR)$(MAN)
+ $(INSTALL) -m 0644 $(PROG).1 $(DESTDIR)$(MAN)
uninstall:
rm -f $(BIN)/$(PROG)