| 1 |
VERSION = $(shell grep '^my $$version' chewmail | perl -pe 's/^[^0-9]*([0-9\.]+).*$$/$$1/g') |
| 2 |
|
| 3 |
|
| 4 |
all: chewmail.1 |
| 5 |
|
| 6 |
clean: |
| 7 |
rm -f chewmail.1 *~ |
| 8 |
rm -rf chewmail-* |
| 9 |
|
| 10 |
install: all |
| 11 |
install -d $(DESTDIR)/usr/bin |
| 12 |
install -m 755 chewmail $(DESTDIR)/usr/bin |
| 13 |
install -d $(DESTDIR)/usr/share/man/man1 |
| 14 |
install -m 644 chewmail.1 $(DESTDIR)/usr/share/man/man1 |
| 15 |
|
| 16 |
dist: clean |
| 17 |
mkdir chewmail-$(VERSION) |
| 18 |
files=`ls` ; cp -r $$files chewmail-$(VERSION) |
| 19 |
tar --exclude=.gitignore --exclude=.git -Jcf \ |
| 20 |
chewmail-$(VERSION).tar.xz chewmail-$(VERSION) |
| 21 |
rm -rf chewmail-$(VERSION) |
| 22 |
|
| 23 |
chewmail.1: chewmail |
| 24 |
pod2man chewmail chewmail.1 |