aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2022-02-22 23:32:15 +0100
committerGuilhem Moulin <guilhem@fripost.org>2022-02-22 23:58:08 +0100
commit7ee950907f27dcb50da1821d206aeffe3d25c5c1 (patch)
tree09865054a2d0480eaf78aa6b2972d14dd3622d04 /Makefile
parent6cf878f69e15c6414dda4fb1171db244953bf8a4 (diff)
Makefile: Honor INSTALL_PROGRAM and INSTALL_DATA.
Cf. https://www.gnu.org/prep/standards/html_node/Command-Variables.html .
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files 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