From 7ee950907f27dcb50da1821d206aeffe3d25c5c1 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Tue, 22 Feb 2022 23:32:15 +0100 Subject: Makefile: Honor INSTALL_PROGRAM and INSTALL_DATA. Cf. https://www.gnu.org/prep/standards/html_node/Command-Variables.html . --- Makefile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 0324d65..7db373d 100644 --- a/Makefile +++ b/Makefile @@ -52,6 +52,10 @@ $(HTML_FILES): $(BUILD_DOCDIR)/%.html: $(srcdir)/doc/%.md $(HTML_TEMPLATE) doc: manual html +INSTALL ?= install +INSTALL_PROGRAM ?= $(INSTALL) +INSTALL_DATA ?= $(INSTALL) -m0644 + prefix ?= $(DESTDIR) exec_prefix ?= $(prefix) bindir ?= $(exec_prefix)/bin @@ -61,12 +65,12 @@ mandir ?= $(datarootdir)/man man1dir ?= $(mandir)/man1 install: all - install -m0755 -vDt $(bindir) $(srcdir)/interimap $(srcdir)/pullimap - install -m0644 -vDT $(srcdir)/lib/Net/IMAP/InterIMAP.pm $(datarootdir)/perl5/Net/IMAP/InterIMAP.pm - install -m0644 -vDt $(man1dir) $(BUILD_DOCDIR)/interimap.1 $(BUILD_DOCDIR)/pullimap.1 - install -m0644 -vDt $(datarootdir)/doc/pullimap $(srcdir)/pullimap.sample - install -m0644 -vDt $(datarootdir)/doc/interimap $(srcdir)/interimap.sample $(srcdir)/doc/getting-started.md $(srcdir)/doc/multi-account.md README - install -m0644 -vDt $(libdir)/systemd/user $(srcdir)/*.service + $(INSTALL_PROGRAM) -vDt $(bindir) $(srcdir)/interimap $(srcdir)/pullimap + $(INSTALL_DATA) -vDT $(srcdir)/lib/Net/IMAP/InterIMAP.pm $(datarootdir)/perl5/Net/IMAP/InterIMAP.pm + $(INSTALL_DATA) -vDt $(man1dir) $(BUILD_DOCDIR)/interimap.1 $(BUILD_DOCDIR)/pullimap.1 + $(INSTALL_DATA) -vDt $(datarootdir)/doc/pullimap $(srcdir)/pullimap.sample + $(INSTALL_DATA) -vDt $(datarootdir)/doc/interimap $(srcdir)/interimap.sample $(srcdir)/doc/getting-started.md $(srcdir)/doc/multi-account.md README + $(INSTALL_DATA) -vDt $(libdir)/systemd/user $(srcdir)/*.service uninstall: rm -vf -- $(bindir)/interimap $(man1dir)/interimap.1 $(libdir)/systemd/user/interimap*.service -- cgit v1.2.3