PREFIX = /usr/local
gbib: gbib.sh gbib.awk gbib.tsv
cat gbib.sh > $@
echo 'exit 0' >> $@
echo "#EOF" >> $@
tar cz -f - gbib.awk gbib.tsv >> $@
chmod +x $@
test: gbib.sh
shellcheck -s sh gbib.sh
clean:
rm -f gbib
install: gbib
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f gbib $(DESTDIR)$(PREFIX)/bin
chmod 755 $(DESTDIR)$(PREFIX)/bin/gbib
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/gbib
.PHONY: test clean install uninstall