mk: only install if files changed

Signed-off-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
Robin Jarry 2022-01-19 21:57:27 +01:00
parent 877a94f5d9
commit 22ad9e199a
1 changed files with 49 additions and 25 deletions

View File

@ -78,31 +78,55 @@ RM?=rm -f
clean: clean:
$(RM) $(DOCS) aerc.conf aerc $(RM) $(DOCS) aerc.conf aerc
install: all $(DESTDIR)$(BINDIR)/aerc: aerc
mkdir -m755 -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 $(DESTDIR)$(MANDIR)/man5 $(DESTDIR)$(MANDIR)/man7 \ install -m755 -D $< $@
$(DESTDIR)$(SHAREDIR) $(DESTDIR)$(SHAREDIR)/filters $(DESTDIR)$(SHAREDIR)/templates $(DESTDIR)$(SHAREDIR)/stylesets
install -m755 aerc $(DESTDIR)$(BINDIR)/aerc $(DESTDIR)$(MANDIR)/man1/%: %
install -m644 aerc.1 $(DESTDIR)$(MANDIR)/man1/aerc.1 install -m644 -D $< $@
install -m644 aerc-search.1 $(DESTDIR)$(MANDIR)/man1/aerc-search.1
install -m644 aerc-config.5 $(DESTDIR)$(MANDIR)/man5/aerc-config.5 $(DESTDIR)$(MANDIR)/man5/%: %
install -m644 aerc-imap.5 $(DESTDIR)$(MANDIR)/man5/aerc-imap.5 install -m644 -D $< $@
install -m644 aerc-maildir.5 $(DESTDIR)$(MANDIR)/man5/aerc-maildir.5
install -m644 aerc-sendmail.5 $(DESTDIR)$(MANDIR)/man5/aerc-sendmail.5 $(DESTDIR)$(MANDIR)/man7/%: %
install -m644 aerc-notmuch.5 $(DESTDIR)$(MANDIR)/man5/aerc-notmuch.5 install -m644 -D $< $@
install -m644 aerc-smtp.5 $(DESTDIR)$(MANDIR)/man5/aerc-smtp.5
install -m644 aerc-tutorial.7 $(DESTDIR)$(MANDIR)/man7/aerc-tutorial.7 $(DESTDIR)$(SHAREDIR)/aerc.conf: aerc.conf
install -m644 aerc-templates.7 $(DESTDIR)$(MANDIR)/man7/aerc-templates.7 install -m644 -D $< $@
install -m644 aerc-stylesets.7 $(DESTDIR)$(MANDIR)/man7/aerc-stylesets.7
install -m644 config/accounts.conf $(DESTDIR)$(SHAREDIR)/accounts.conf $(DESTDIR)$(SHAREDIR)/%.conf: config/%.conf
install -m644 aerc.conf $(DESTDIR)$(SHAREDIR)/aerc.conf install -m644 -D $< $@
install -m644 config/binds.conf $(DESTDIR)$(SHAREDIR)/binds.conf
install -m755 filters/hldiff $(DESTDIR)$(SHAREDIR)/filters/hldiff $(DESTDIR)$(SHAREDIR)/filters/%: filters/%
install -m755 filters/html $(DESTDIR)$(SHAREDIR)/filters/html install -m755 -D $< $@
install -m755 filters/plaintext $(DESTDIR)$(SHAREDIR)/filters/plaintext
install -m644 templates/new_message $(DESTDIR)$(SHAREDIR)/templates/new_message $(DESTDIR)$(SHAREDIR)/templates/%: templates/%
install -m644 templates/quoted_reply $(DESTDIR)$(SHAREDIR)/templates/quoted_reply install -m644 -D $< $@
install -m644 templates/forward_as_body $(DESTDIR)$(SHAREDIR)/templates/forward_as_body
install -m644 config/default_styleset $(DESTDIR)$(SHAREDIR)/stylesets/default $(DESTDIR)$(SHAREDIR)/stylesets/default: config/default_styleset
install -m644 -D $< $@
install: $(DESTDIR)$(BINDIR)/aerc
install: $(DESTDIR)$(MANDIR)/man1/aerc.1
install: $(DESTDIR)$(MANDIR)/man1/aerc-search.1
install: $(DESTDIR)$(MANDIR)/man5/aerc-config.5
install: $(DESTDIR)$(MANDIR)/man5/aerc-imap.5
install: $(DESTDIR)$(MANDIR)/man5/aerc-maildir.5
install: $(DESTDIR)$(MANDIR)/man5/aerc-sendmail.5
install: $(DESTDIR)$(MANDIR)/man5/aerc-notmuch.5
install: $(DESTDIR)$(MANDIR)/man5/aerc-smtp.5
install: $(DESTDIR)$(MANDIR)/man7/aerc-tutorial.7
install: $(DESTDIR)$(MANDIR)/man7/aerc-templates.7
install: $(DESTDIR)$(MANDIR)/man7/aerc-stylesets.7
install: $(DESTDIR)$(SHAREDIR)/accounts.conf
install: $(DESTDIR)$(SHAREDIR)/aerc.conf
install: $(DESTDIR)$(SHAREDIR)/binds.conf
install: $(DESTDIR)$(SHAREDIR)/filters/hldiff
install: $(DESTDIR)$(SHAREDIR)/filters/html
install: $(DESTDIR)$(SHAREDIR)/filters/plaintext
install: $(DESTDIR)$(SHAREDIR)/templates/new_message
install: $(DESTDIR)$(SHAREDIR)/templates/quoted_reply
install: $(DESTDIR)$(SHAREDIR)/templates/forward_as_body
install: $(DESTDIR)$(SHAREDIR)/stylesets/default
RMDIR_IF_EMPTY:=sh -c '\ RMDIR_IF_EMPTY:=sh -c '\
if test -d $$0 && ! ls -1qA $$0 | grep -q . ; then \ if test -d $$0 && ! ls -1qA $$0 | grep -q . ; then \