From ea2bd7286bd8eae90513f19f1e2eef39f6315447 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 3 Mar 2019 13:02:26 +0100 Subject: [PATCH] build: Support DESTDIR. It's strongly recommended to support this feature because it eases packaging. And it's easy to implement. --- Makefile | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) 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 -- 2.39.5