2019-09-16 13:21:29 +00:00
|
|
|
.POSIX:
|
|
|
|
.SUFFIXES:
|
|
|
|
meli:
|
2019-11-18 10:56:52 +00:00
|
|
|
cargo build $(FEATURES)--release
|
2019-09-16 13:21:29 +00:00
|
|
|
|
2019-12-18 07:18:28 +00:00
|
|
|
PREFIX ?= /usr/local
|
2019-09-16 13:21:29 +00:00
|
|
|
|
2019-11-18 10:56:52 +00:00
|
|
|
ifdef MELI_FEATURES
|
|
|
|
FEATURES ?= --features="$(MELI_FEATURES)"
|
|
|
|
else
|
|
|
|
FEATURES ?=
|
|
|
|
endif
|
|
|
|
|
2019-09-16 13:21:29 +00:00
|
|
|
.PHONY: clean
|
2019-12-09 16:33:46 +00:00
|
|
|
clean:
|
2019-12-18 07:18:28 +00:00
|
|
|
rm -r ./target/
|
2019-09-16 13:21:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
.PHONY: uninstall
|
2019-12-09 16:33:46 +00:00
|
|
|
uninstall:
|
|
|
|
rm -f $(DESTDIR)$(PREFIX)/bin/meli
|
2019-09-16 13:21:29 +00:00
|
|
|
rm $(DESTDIR)$(PREFIX)/share/man/man1/meli.1.gz
|
|
|
|
rm $(DESTDIR)$(PREFIX)/share/man/man5/meli.conf.5.gz
|
|
|
|
|
|
|
|
.PHONY: install
|
|
|
|
install: meli
|
|
|
|
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
|
|
|
mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
|
|
|
|
mkdir -p $(DESTDIR)$(PREFIX)/share/man/man5
|
|
|
|
cp -f target/release/meli $(DESTDIR)$(PREFIX)/bin
|
|
|
|
gzip < meli.1 > $(DESTDIR)$(PREFIX)/share/man/man1/meli.1.gz
|
|
|
|
gzip < meli.conf.5 > $(DESTDIR)$(PREFIX)/share/man/man5/meli.conf.5.gz
|
2019-12-18 07:18:28 +00:00
|
|
|
@echo "\n You might want to read the \"STARTING WITH meli\" section in the manpage (\`man meli\`)"
|
|
|
|
@echo " - Report bugs in the mailing list or git issue tracker https://git.meli.delivery"
|
|
|
|
@echo " - If you have a specific feature or workflow you want to use, you can post in the mailing list or git issue tracker."
|