From: Andre Noll Date: Sun, 3 Mar 2019 12:02:26 +0000 (+0100) Subject: build: Support DESTDIR. X-Git-Tag: v1.0.2~3 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=ea2bd7286bd8eae90513f19f1e2eef39f6315447;p=lopsub.git build: Support DESTDIR. It's strongly recommended to support this feature because it eases packaging. And it's easy to implement. --- diff --git a/Makefile b/Makefile index 683ea8b..2ff12fa 100644 --- a/Makefile +++ b/Makefile @@ -98,15 +98,16 @@ web/%.html: % $(GROFF) -m man -Thtml $< | sed -e '1,/^/d' >> $@ install: liblopsub.a lopsub.7 - $(INSTALL) -d $(PREFIX)/lib $(PREFIX)/include $(PREFIX)/man/man1 \ - $(PREFIX)/man/man5 $(PREFIX)/man/man7 $(PREFIX)/bin - $(INSTALL) -m 755 liblopsub.a $(PREFIX)/lib - $(INSTALL) -m 755 lopsubgen $(PREFIX)/bin - $(INSTALL) -m 644 lopsub.h $(PREFIX)/include - $(INSTALL) -m 644 lopsub-internal.h $(PREFIX)/include - $(INSTALL) -m 644 lopsubgen.1 $(PREFIX)/man/man1 - $(INSTALL) -m 644 lopsub-suite.5 $(PREFIX)/man/man5 - $(INSTALL) -m 644 lopsub.7 $(PREFIX)/man/man7 + $(INSTALL) -d $(DESTDIR)$(PREFIX)/lib $(DESTDIR)$(PREFIX)/include \ + $(DESTDIR)$(PREFIX)/man/man1 $(DESTDIR)$(PREFIX)/man/man5 \ + $(DESTDIR)$(PREFIX)/man/man7 $(DESTDIR)$(PREFIX)/bin + $(INSTALL) -m 755 liblopsub.a $(DESTDIR)$(PREFIX)/lib + $(INSTALL) -m 755 lopsubgen $(DESTDIR)$(PREFIX)/bin + $(INSTALL) -m 644 lopsub.h $(DESTDIR)$(PREFIX)/include + $(INSTALL) -m 644 lopsub-internal.h $(DESTDIR)$(PREFIX)/include + $(INSTALL) -m 644 lopsubgen.1 $(DESTDIR)$(PREFIX)/man/man1 + $(INSTALL) -m 644 lopsub-suite.5 $(DESTDIR)$(PREFIX)/man/man5 + $(INSTALL) -m 644 lopsub.7 $(DESTDIR)$(PREFIX)/man/man7 clean: $(RM) $(all) $(html) *.o *.man