summaryrefslogtreecommitdiff
path: root/Makefile
blob: 7cd47332cf0365073f74346b2cd1d64c389b9f5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
prefix = /usr/local

build/apt-why.1: bin/apt-why
	mkdir -p build
	pod2man $< > $@

test: test/main
	sh $<

install: build/apt-why.1
	mkdir -p $(prefix)/bin $(prefix)/share/man/man1
	cp bin/apt-why $(prefix)/bin
	cp build/apt-why.1 $(prefix)/share/man/man1
	chmod 755 $(prefix)/bin/apt-why
	chmod 644 $(prefix)/share/man/man1/apt-why.1

clean:
	rm -rf build

uninstall:
	rm -f $(prefix)/bin/apt-why
	rm -f $(prefix)/share/man/man1/apt-why.1

.PHONY: clean install test uninstall