Krolyxon
Commit f3cd56e

Branches

Refs →

nsxivf3cd56e

Support DESTDIR

GNU coding standard recommends supporting DESTDIR in projects Makefiles. This
is already expected by many GNU/Linux distributions. This patch adds DESTDIR
support to sxiv Makefile.
Author
Petr Sabata
Date
2011-05-10 09:31 +0200
Parent
fdafbf7
Commit
f3cd56e3d361e955466ee9539fb4d0b71053fb62

+5 −4

1 file changed

  1. M Makefile +5 −4
M Makefile View
@@ -3,6 +3,7 @@ all: sxiv
33 VERSION=0.8.1
44
55 CC?=gcc
6+DESTDIR?=
67 PREFIX?=/usr/local
78 CFLAGS+= -Wall -pedantic -DVERSION=\"$(VERSION)\"
89 LDFLAGS+=
@@ -18,10 +19,10 @@ sxiv: $(OBJFILES)
1819 $(CC) $(CFLAGS) -c -o $@ $<
1920
2021 install: all
21− install -D -m 755 -o root -g root sxiv $(PREFIX)/bin/sxiv
22− mkdir -p $(PREFIX)/share/man/man1
23− sed "s/VERSION/$(VERSION)/g" sxiv.1 > $(PREFIX)/share/man/man1/sxiv.1
24− chmod 644 $(PREFIX)/share/man/man1/sxiv.1
22+ install -D -m 755 -o root -g root sxiv ${DESTDIR}$(PREFIX)/bin/sxiv
23+ mkdir -p ${DESTDIR}$(PREFIX)/share/man/man1
24+ sed "s/VERSION/$(VERSION)/g" sxiv.1 > ${DESTDIR}$(PREFIX)/share/man/man1/sxiv.1
25+ chmod 644 ${DESTDIR}$(PREFIX)/share/man/man1/sxiv.1
2526
2627 clean:
2728 rm -f sxiv *.o