]> git.tue.mpg.de Git - lopsub.git/commitdiff
build: Support DESTDIR.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 3 Mar 2019 12:02:26 +0000 (13:02 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Thu, 14 Mar 2019 13:11:03 +0000 (14:11 +0100)
It's strongly recommended to support this feature because it eases
packaging. And it's easy to implement.

Makefile

index 683ea8b270052715717fffb6de1563791afd0a81..2ff12faaa56c945180f72014aa3b40e6ac5bab5d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -98,15 +98,16 @@ web/%.html: %
        $(GROFF) -m man -Thtml $< | sed -e '1,/^<body>/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