mirror of
https://github.com/tj/git-extras.git
synced 2026-09-11 07:56:18 -04:00
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.
22 lines
381 B
Makefile
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
|