SOURCE=git-sonar PREFIX?=/usr/local PWD=$(shell pwd) .PHONY: all install develop all: @echo 'Simple install script for *git-sonar*' @echo '' @echo 'For a normal installation into /usr/local, use:' @echo ' make install' @echo '' @echo 'For a development install (symlinked files), use:' @echo ' make develop' @echo '' @echo 'If you want to install *git-sonar* for your user only:' @echo ' PREFIX=$$HOME/.local make install' install: $(SOURCE) @echo 'Installing in' $(PREFIX)/bin '...' mkdir -p $(PREFIX)/bin cp $(PWD)/$(SOURCE) $(PREFIX)/bin develop: $(SOURCE) @echo 'Symlinking in' $(PREFIX)/bin '...' mkdir -p $(PREFIX)/bin ln -sf $(PWD)/$(SOURCE) $(PREFIX)/bin