Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

61 lines (44 sloc) 1.99 kb
SCRIPT=$(wildcard plugin/*.vim)
AUTOL =$(wildcard autoload/*.vim)
DOC=$(wildcard doc/*.txt)
PLUGIN=$(shell basename "$$PWD")
VERSION=$(shell sed -n '/Version:/{s/^.*\(\S\.\S\+\)$$/\1/;p}' $(SCRIPT))
.PHONY: $(PLUGIN).vmb README $(PLUGIN).zip
all: vimball install
convert-images:
for item in autoload/DynamicSigns/*.bmp; do mogrify "$$item" -type palette -colors 256; done
release: uninstall archive install README
vimball: $(PLUGIN).vmb
archive: $(PLUGIN).zip
clean:
find . -type f \( -name "*.vba" -o -name "*.orig" -o -name "*.~*" \
-o -name ".VimballRecord" -o -name ".*.un~" -o -name "*.sw*" -o \
-name tags -o -name "*.vmb" \) -delete
dist-clean: clean
install:
vim -N -c':so %' -c':q!' $(PLUGIN).vmb
uninstall:
vim -N -c':RmVimball' -c':q!' $(PLUGIN).vmb
undo:
for i in */*.orig; do mv -f "$$i" "$${i%.*}"; done
README:
cp -f $(DOC) README
$(PLUGIN).zip:
-@/bin/sh -c "if [ -f $(PLUGIN).zip ]; then \
zip -u $(PLUGIN).zip ${SCRIPT} ${AUTOL} ${DOC} autoload/*/* ; \
else \
zip $(PLUGIN).zip ${SCRIPT} ${AUTOL} ${DOC} autoload/*/* ; \
fi "
ln -f $(PLUGIN).zip $(PLUGIN)-$(VERSION).zip
$(PLUGIN).vmb:
rm -f $(PLUGIN).vmb
vim -N -c 'ru! vimballPlugin.vim' -c ':call append("0", [ "$(SCRIPT)", "$(AUTOL)", "$(DOC)"])' -c '$$d' -c ":%MkVimball $(PLUGIN) ." -c':q!'
release: version all
version:
perl -i.orig -pne 's/(let s:debug)\s*=\s*1/$$1 = 0/' ${AUTOL}
perl -i.orig -pne 'if (/Version:/) {s/\.(\d*)/sprintf(".%d", 1+$$1)/e}' ${SCRIPT} ${AUTOL}
perl -i -pne 'if (/GetLatestVimScripts:/) {s/(\d+)\s+:AutoInstall:/sprintf("%d :AutoInstall:", 1+$$1)/e}' ${SCRIPT} ${AUTOL}
#perl -i -pne 'if (/Last Change:/) {s/\d+\.\d+\.\d\+$$/sprintf("%s", `date -R`)/e}' ${SCRIPT}
perl -i -pne 'if (/Last Change:/) {s/(:\s+).*\n/sprintf(": %s", `date -R`)/e}' ${SCRIPT} ${AUTOL}
perl -i.orig -pne 'if (/Version:/) {s/\.(\d+).*\n/sprintf(".%d %s", 1+$$1, `date -R`)/e}' ${DOC}
VERSION=$(shell sed -n '/Version:/{s/^.*\(\S\.\S\+\)$$/\1/;p}' $(SCRIPT))
Jump to Line
Something went wrong with that request. Please try again.