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 1.0 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
123456789101112131415161718192021222324252627282930313233343536
  1. .POSIX:
  2. OS = $(shell uname -s)
  3. ifndef PREFIX
  4. PREFIX = /usr/local
  5. endif
  6. MANPREFIX = $(PREFIX)/share/man
  7. install:
  8. mkdir -p $(DESTDIR)$(PREFIX)/bin
  9. for script in bin/*; do \
  10. cp -f $$script $(DESTDIR)$(PREFIX)/bin/; \
  11. chmod 755 $(DESTDIR)$(PREFIX)/$$script; \
  12. done
  13. mkdir -p $(DESTDIR)$(PREFIX)/share/mutt-wizard
  14. for shared in share/*; do \
  15. cp -f $$shared $(DESTDIR)$(PREFIX)/share/mutt-wizard; \
  16. done
  17. mkdir -p $(DESTDIR)$(MANPREFIX)/man1
  18. cp -f mw.1 $(DESTDIR)$(MANPREFIX)/man1/mw.1
  19. if [ "$(PREFIX)" ]; then \
  20. sed -iba 's:/usr/local:$(PREFIX):' $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrc; \
  21. sed -iba 's:/usr/local:$(PREFIX):' $(DESTDIR)$(PREFIX)/bin/mw; \
  22. sed -iba 's:/usr/local:$(PREFIX):' $(DESTDIR)$(MANPREFIX)/man1/mw.1; \
  23. fi
  24. if [ "$(OS)" = "Darwin" ]; then \
  25. rm $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrcba; \
  26. fi
  27. uninstall:
  28. for script in bin/*; do \
  29. rm -f $(DESTDIR)$(PREFIX)/bin/$$script; \
  30. done
  31. rm -rf $(DESTDIR)$(PREFIX)/share/mutt-wizard
  32. .PHONY: install uninstall