| 1 |
all install uninstall clean: |
| 2 |
cd src && $(MAKE) $@ |
| 3 |
|
| 4 |
TAG = $(shell git describe --abbrev=0 --tags) |
| 5 |
VERSION = $(shell echo $(TAG) | sed s/^v//) |
| 6 |
FORMAT = tar.gz |
| 7 |
|
| 8 |
dist: |
| 9 |
@ if [ -n "`git tag --list $(TAG)`" ]; \ |
| 10 |
then \ |
| 11 |
git archive --verbose --format=$(FORMAT) \ |
| 12 |
--prefix=imapfilter-$(VERSION)/ \ |
| 13 |
--output=imapfilter-$(VERSION).$(FORMAT) v$(VERSION); \ |
| 14 |
echo "Created Git archive: imapfilter-$(VERSION).$(FORMAT)"; \ |
| 15 |
else \ |
| 16 |
echo "No such tag in the Git repository: $(TAG)"; \ |
| 17 |
fi |
| 18 |
|
| 19 |
distclean: |
| 20 |
rm -f imapfilter-*.* |