tj.git-extras/Makefile
Jonathan "Duke" Leto fc46f303e0 Allow user to specify PREFIX
Now users can specify PREFIX when they run make:

PREFIX=$HOME make

Without a defined PREFIX, it defaults to /usr/local, so this is
backward compatible to previous behavior.
2010-09-08 12:58:39 -07:00

22 lines
381 B
Makefile

ifeq ($(PREFIX),)
PREFIX = /usr/local
endif
BINS = $(wildcard bin/git-*)
install:
@echo "... installing to $(PREFIX)/bin"
@$(foreach BIN, $(BINS), \
echo "... installing `basename $(BIN)`"; \
cp -f $(BIN) $(PREFIX)/$(BIN); \
)
uninstall:
@$(foreach BIN, $(BINS), \
echo "... uninstalling $(PREFIX)/$(BIN)"; \
rm -f $(PREFIX)/$(BIN); \
)
.PHONY: install uninstall