You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 2.1 KiB

5 vuotta sitten
5 vuotta sitten
2 vuotta sitten
5 vuotta sitten
1 vuosi sitten
5 vuotta sitten
5 vuotta sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. .POSIX:
  2. OS = $(shell uname -s)
  3. ifndef PREFIX
  4. PREFIX = /usr/local
  5. endif
  6. ifndef MANPREFIX
  7. MANPREFIX = $(PREFIX)/share/man
  8. endif
  9. install:
  10. mkdir -p $(DESTDIR)$(PREFIX)/bin
  11. mkdir -p $(DESTDIR)$(PREFIX)/lib/mutt-wizard
  12. cp -f bin/mw bin/mailsync $(DESTDIR)$(PREFIX)/bin/
  13. cp -f lib/openfile $(DESTDIR)$(PREFIX)/lib/mutt-wizard
  14. chmod 755 $(DESTDIR)$(PREFIX)/bin/mw $(DESTDIR)$(PREFIX)/bin/mailsync $(DESTDIR)$(PREFIX)/lib/mutt-wizard/openfile
  15. mkdir -p $(DESTDIR)$(PREFIX)/share/mutt-wizard
  16. chmod 755 $(DESTDIR)$(PREFIX)/share/mutt-wizard
  17. for shared in share/*; do \
  18. cp -f $$shared $(DESTDIR)$(PREFIX)/share/mutt-wizard; \
  19. chmod 644 $(DESTDIR)$(PREFIX)/share/mutt-wizard/$$(basename $(notdir $$shared)); \
  20. done
  21. mkdir -p $(DESTDIR)$(MANPREFIX)/man1
  22. cp -f mw.1 $(DESTDIR)$(MANPREFIX)/man1/mw.1
  23. cp -f mailsync.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1
  24. chmod 644 $(DESTDIR)$(MANPREFIX)/man1/mw.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1
  25. if [ "$(PREFIX)" ]; then \
  26. sed -iba 's:/usr/local:$(PREFIX):' $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrc; \
  27. rm -f $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrcba; \
  28. sed -iba 's:/usr/local:$(PREFIX):' $(DESTDIR)$(PREFIX)/bin/mw; \
  29. rm -f $(DESTDIR)$(PREFIX)/bin/mwba; \
  30. sed -iba 's:/usr/local:$(PREFIX):' $(DESTDIR)$(MANPREFIX)/man1/mw.1; \
  31. rm -f $(DESTDIR)$(MANPREFIX)/man1/mw.1ba; \
  32. sed -iba 's:/usr/local:$(PREFIX):' $(DESTDIR)$(PREFIX)/share/mutt-wizard/mailcap; \
  33. rm -f $(DESTDIR)$(PREFIX)/share/mutt-wizard/mailcapba; \
  34. fi
  35. mkdir -p $(DESTDIR)$(PREFIX)/share/zsh/site-functions/
  36. chmod 755 $(DESTDIR)$(PREFIX)/share/zsh/site-functions/
  37. cp -f completion/_mutt-wizard.zsh $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_mutt-wizard.zsh
  38. chmod 644 $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_mutt-wizard.zsh
  39. uninstall:
  40. rm -f $(DESTDIR)$(PREFIX)/bin/mw $(DESTDIR)$(PREFIX)/bin/mailsync $(DESTDIR)$(PREFIX)/lib/mutt-wizard/openfile
  41. rm -rf $(DESTDIR)$(PREFIX)/share/mutt-wizard $(DESTDIR)$(PREFIX)/lib/mutt-wizard
  42. rm -f $(DESTDIR)$(MANPREFIX)/man1/mw.1 $(DESTDIR)$(MANPREFIX)/man1/mailsync.1
  43. rm -f $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_mutt-wizard.zsh
  44. .PHONY: install uninstall