Skip to content

Commit

Permalink
Makefile: fix 'make install' for alternate prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
apjanke committed Apr 13, 2016
1 parent 4f831c6 commit d2ef990
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
prefix=/usr/local
exec_prefix=$(prefix)
bindir=$(exec_prefix)/bin
datarootdir=$(prefix)/share
datadir=$(datarootdir)
mandir=$(datarootdir)/man

# files that need mode 755
EXEC_FILES=git-standup

.PHONY: all install uninstall

all:
@echo "usage: make install"
@echo " make uninstall"

install:
install -m 0755 $(EXEC_FILES) $(prefix)/bin
mkdir -p $(bindir)
install -m 0755 $(EXEC_FILES) $(bindir)

uninstall:
test -d $(prefix)/bin && \
cd $(prefix)/bin && \
test -d $(bindir) && \
cd $(bindir) && \
rm -f $(EXEC_FILES)

0 comments on commit d2ef990

Please sign in to comment.