aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 96fd134389c8d7acba5bb0f6b179379c7f4a6737 (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
28
29
30
31
VERSION = 1.5

PREFIX = /usr
MANPREFIX = $(PREFIX)/share/man

PKGNAME = gpp
COMMAND = gpp

PY = python
SHEBANG = /usr$(BIN)/env $(PY)


all: gpp

gpp: gpp.py
	env VERSION='$(VERSION)' SHEBANG='$(SHEBANG)' $(PY) "$<" < "$<" > "$@"

install: gpp
	install -dm755 -- "$(DESTDIR)$(PREFIX)/bin"
	install -m755 -- gpp "$(DESTDIR)$(PREFIX)/bin/$(COMMAND)"
	install -dm755 -- "$(DESTDIR)$(MANPREFIX)/man"
	install -m644 -- gpp.1 "$(DESTDIR)$(MANPREFIX)/man/$(COMMAND).1"

uninstall:
	-rm -- "$(DESTDIR)$(PREFIX)/bin/$(COMMAND)"
	-rm -- "$(DESTDIR)$(MANPREFIX)/man/$(COMMAND).1"

clean:
	-rm -rf -- gpp bin obj

.PHONY: all install uninstall clean