summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: ef233c94e0ad0b5981922ca4c1a1cfd6296fed12 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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