2018-10-28 14:39:45 -04:00
|
|
|
# GNU make is required to run this file. To install on *BSD, run:
|
|
|
|
# gmake PREFIX=/usr/local install
|
|
|
|
|
2017-09-06 16:44:55 -04:00
|
|
|
PREFIX ?= /usr
|
|
|
|
PROGNAME := papirus-folders
|
2018-09-09 17:37:19 -04:00
|
|
|
VERSION ?=
|
2019-06-26 11:57:58 -04:00
|
|
|
ZSHCOMPDIR ?= $(PREFIX)/share/zsh/vendor-completions
|
2017-09-06 16:44:55 -04:00
|
|
|
|
|
|
|
all:
|
|
|
|
|
|
|
|
install:
|
2017-09-19 10:15:12 -04:00
|
|
|
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
|
|
|
install -m 755 $(PROGNAME) $(DESTDIR)$(PREFIX)/bin
|
2018-03-10 01:54:51 -05:00
|
|
|
mkdir -p $(DESTDIR)$(PREFIX)/share/bash-completion/completions
|
2018-03-09 11:43:23 -05:00
|
|
|
install -m 644 completion/$(PROGNAME) \
|
2018-03-10 01:54:51 -05:00
|
|
|
$(DESTDIR)$(PREFIX)/share/bash-completion/completions
|
2019-06-26 11:57:58 -04:00
|
|
|
mkdir -p $(DESTDIR)$(ZSHCOMPDIR)
|
2018-03-09 11:43:23 -05:00
|
|
|
install -m 644 completion/_$(PROGNAME) \
|
2019-06-26 11:57:58 -04:00
|
|
|
$(DESTDIR)$(ZSHCOMPDIR)
|
2017-09-06 16:44:55 -04:00
|
|
|
|
|
|
|
uninstall:
|
|
|
|
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROGNAME)
|
2018-03-10 01:54:51 -05:00
|
|
|
rm -f $(DESTDIR)$(PREFIX)/share/bash-completion/completions/$(PROGNAME)
|
2019-06-26 11:57:58 -04:00
|
|
|
rm -f $(DESTDIR)$(ZSHCOMPDIR)/_$(PROGNAME)
|
2017-09-06 16:44:55 -04:00
|
|
|
|
|
|
|
_get_version:
|
2018-12-05 02:26:50 -05:00
|
|
|
$(if $(VERSION),,$(error VERSION is not defined. Pass via "make bump VERSION=0.1.2"))
|
2017-09-06 16:44:55 -04:00
|
|
|
|
2018-09-09 17:37:19 -04:00
|
|
|
bump: _get_version
|
|
|
|
sed -i '/VERSION=/s/[0-9.]\+/$(VERSION)/' $(PROGNAME)
|
|
|
|
dch -v $(VERSION)-1 -- ''
|
|
|
|
git commit -am "Bump to v$(VERSION)"
|
|
|
|
git tag -f v$(VERSION)
|
|
|
|
|
|
|
|
release:
|
2017-11-07 07:58:59 -05:00
|
|
|
git push origin
|
2017-09-06 16:44:55 -04:00
|
|
|
git push origin --tags
|
|
|
|
|
|
|
|
|
2018-09-09 17:37:19 -04:00
|
|
|
.PHONY: all install uninstall _get_version bump release
|
2018-10-28 14:39:45 -04:00
|
|
|
|
|
|
|
# .BEGIN is ignored by GNU make so we can use it as a guard
|
|
|
|
.BEGIN:
|
|
|
|
@head -3 Makefile
|
2018-12-05 02:26:50 -05:00
|
|
|
@false
|