Skip to content

Commit

Permalink
build(makefile): support setting DESTDIR / PREFIX
Browse files Browse the repository at this point in the history
  • Loading branch information
alebcay committed Jul 31, 2023
1 parent 5818c2b commit b820c1f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
DESTDIR=
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin

all: test VERSION
initool: initool.mlb stringtrim.sml ini.sml initool.sml
mlton initool.mlb
Expand All @@ -8,7 +12,8 @@ test: initool
clean:
-rm initool VERSION
install: initool
install initool /usr/local/bin/
mkdir -p $(DESTDIR)$(BINDIR)
install initool $(DESTDIR)$(BINDIR)
uninstall:
rm /usr/local/bin/initool
rm $(DESTDIR)$(BINDIR)/initool
.PHONY: all clean test install uninstall

0 comments on commit b820c1f

Please sign in to comment.