mirror of
https://github.com/Raimondi/delimitMate.git
synced 2025-12-08 05:34:45 +08:00
Makefile rewrite.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@
|
|||||||
*.zip
|
*.zip
|
||||||
*.gz
|
*.gz
|
||||||
vimball.txt
|
vimball.txt
|
||||||
|
*.orig
|
||||||
|
|||||||
87
Makefile
87
Makefile
@@ -1,35 +1,68 @@
|
|||||||
PLUGIN=delimitMate
|
PLUGIN=$(shell basename "$$PWD")
|
||||||
|
SCRIPT=$(wildcard plugin/*.vim)
|
||||||
|
#AUTOL=$(wildcard autoload/*.vim)
|
||||||
|
AUTOL=autoload/$(PLUGIN).vim
|
||||||
|
DOC=$(wildcard doc/*.txt)
|
||||||
|
TESTS=$(wildcard autoload/*Tests.vim)
|
||||||
|
VERSION=$(shell perl -ne 'if (/\*\sCurrent\srelease:/) {s/^\s+(\d+\.\d+).*$$/\1/;print}' $(DOC))
|
||||||
VIMFOLDER=~/.vim
|
VIMFOLDER=~/.vim
|
||||||
|
DATE=`date '+%F'`
|
||||||
|
VIM=/usr/bin/vim
|
||||||
|
|
||||||
install:
|
.PHONY: $(PLUGIN).vba README
|
||||||
install -m 755 -d ${VIMFOLDER}
|
|
||||||
install -m 755 -d ${VIMFOLDER}/plugin/
|
|
||||||
install -m 755 -d ${VIMFOLDER}/autoload/
|
|
||||||
install -m 755 -d ${VIMFOLDER}/doc/
|
|
||||||
cp -f doc/${PLUGIN}.txt ${VIMFOLDER}/doc/${PLUGIN}.txt
|
|
||||||
cp -f plugin/${PLUGIN}.vim ${VIMFOLDER}/plugin/${PLUGIN}.vim
|
|
||||||
cp -f autoload/${PLUGIN}.vim ${VIMFOLDER}/autoload/${PLUGIN}.vim
|
|
||||||
cp -f autoload/${PLUGIN}Tests.vim ${VIMFOLDER}/autoload/${PLUGIN}Tests.vim
|
|
||||||
|
|
||||||
doc_update: install
|
all: uninstall vimball install README
|
||||||
/usr/bin/vim -u NONE -c ':helptags ${VIMFOLDER}/doc' -c ':q'
|
|
||||||
|
|
||||||
zip:
|
vimball: $(PLUGIN).vba
|
||||||
zip -r ${PLUGIN}.zip doc plugin autoload
|
|
||||||
zip ${PLUGIN}.zip -d \*.sw\?
|
|
||||||
zip ${PLUGIN}.zip -d autoload/${PLUGIN}Tests.vim
|
|
||||||
|
|
||||||
vimball: install
|
clean:
|
||||||
echo doc/${PLUGIN}.txt > vimball.txt
|
@echo clean
|
||||||
echo plugin/${PLUGIN}.vim >> vimball.txt
|
rm -f *.vba */*.orig *.~* .VimballRecord *.zip *.gz
|
||||||
echo autoload/${PLUGIN}.vim >> vimball.txt
|
|
||||||
/usr/bin/vim -c 'e vimball.txt' -c '%MkVimball! ${PLUGIN}' -c 'q'
|
|
||||||
|
|
||||||
gzip: vimball
|
dist-clean: clean
|
||||||
gzip -f ${PLUGIN}.vba
|
|
||||||
|
install: vimball
|
||||||
|
@echo install
|
||||||
|
$(VIM) -N -c ':so %' -c':q!' $(PLUGIN)-$(VERSION).vba
|
||||||
|
cp -f autoload/$(PLUGIN)Tests.vim $(VIMFOLDER)/autoload/$(PLUGIN)Tests.vim
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f ${VIMFOLDER}/plugin/${PLUGIN}.vim
|
@echo uninstall
|
||||||
rm -f ${VIMFOLDER}/autoload/${PLUGIN}.vim
|
$(VIM) -N -c':RmVimball' -c':q!' $(PLUGIN)-$(VERSION).vba
|
||||||
rm -f ${VIMFOLDER}/doc/${PLUGIN}.txt
|
rm -f $(VIMFOLDER)/autoload/$(PLUGIN)Tests.txt
|
||||||
rm -f ${VIMFOLDER}/autoload/${PLUGIN}Tests.txt
|
|
||||||
|
undo:
|
||||||
|
for i in **/*.orig; do mv -f "$$i" "$${i%.*}"; done
|
||||||
|
|
||||||
|
README:
|
||||||
|
@echo README
|
||||||
|
cp -f $(DOC) README
|
||||||
|
|
||||||
|
$(PLUGIN).vba:
|
||||||
|
@echo $(PLUGIN).vba
|
||||||
|
rm -f $(PLUGIN)-$(VERSION).vba
|
||||||
|
$(VIM) -N -c 'ru! vimballPlugin.vim' -c ':call append("0", [ "$(SCRIPT)", "$(AUTOL)", "$(DOC)"])' -c '$$d' -c ":%MkVimball $(PLUGIN)-$(VERSION) ." -c':q!'
|
||||||
|
ln -f $(PLUGIN)-$(VERSION).vba $(PLUGIN).vba
|
||||||
|
|
||||||
|
zip:
|
||||||
|
@echo zip
|
||||||
|
zip -r $(PLUGIN).zip doc plugin autoload
|
||||||
|
zip $(PLUGIN).zip -d \*.sw\?
|
||||||
|
zip $(PLUGIN).zip -d autoload/$(PLUGIN)Tests.vim
|
||||||
|
|
||||||
|
gzip: vimball
|
||||||
|
@echo vimball
|
||||||
|
gzip -f $(PLUGIN).vba
|
||||||
|
|
||||||
|
release: version all
|
||||||
|
|
||||||
|
version:
|
||||||
|
@echo version: $(VERSION)
|
||||||
|
perl -i.orig -pne 'if (/^"\sVersion:/) {s/(\d+\.\d+)/$(VERSION)/e}' $(SCRIPT) $(AUTOL)
|
||||||
|
perl -i.orig -pne 'if (/let\sdelimitMate_version/) {s/(\d+\.\d+)/$(VERSION)/e}' $(SCRIPT)
|
||||||
|
perl -i.orig -pne 'if (/beasts/) {s/(v\d+\.\d+)/v.$(VERSION)/e}' $(DOC)
|
||||||
|
perl -i.orig -pne 'if (/^"\sModified:/) {s/(\d+-\d+-\d+)/sprintf("%s", `date "+%F"`)/e}' $(SCRIPT) $(AUTOL)
|
||||||
|
perl -i.orig -pne 'if (/^\s+$(VERSION)\s+\d+-\d+-\d+\s+\*/) {s/(\d+-\d+-\d+)/$(DATE)/e}' $(DOC)
|
||||||
|
@echo Version: $(VERSION)
|
||||||
|
|
||||||
|
echo:
|
||||||
|
|||||||
2
README
2
README
@@ -451,7 +451,7 @@ e.g.: This mapping could be used to select an item on a pop-up menu or expand
|
|||||||
<CR> inside an empty pair: >
|
<CR> inside an empty pair: >
|
||||||
|
|
||||||
inoremap <expr> <CR> pumvisible() ? "\<c-y>" :
|
inoremap <expr> <CR> pumvisible() ? "\<c-y>" :
|
||||||
\ delimitMate#WithinEmptyPair ?
|
\ delimitMate#WithinEmptyPair() ?
|
||||||
\ delimitMate#ExpandReturn() : "\<CR>"
|
\ delimitMate#ExpandReturn() : "\<CR>"
|
||||||
<
|
<
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
" ============================================================================
|
" ============================================================================
|
||||||
" File: autoload/delimitMate.vim
|
" File: autoload/delimitMate.vim
|
||||||
" Version: 2.2
|
" Version: 2.2
|
||||||
" Modified: 2010-01-01
|
" Modified: 2010-05-16
|
||||||
|
|
||||||
" Description: This plugin provides auto-completion for quotes, parens, etc.
|
" Description: This plugin provides auto-completion for quotes, parens, etc.
|
||||||
" Maintainer: Israel Chauca F. <israelchauca@gmail.com>
|
" Maintainer: Israel Chauca F. <israelchauca@gmail.com>
|
||||||
" Manual: Read ":help delimitMate".
|
" Manual: Read ":help delimitMate".
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
" ============================================================================
|
" ============================================================================
|
||||||
" File: plugin/delimitMate.vim
|
" File: plugin/delimitMate.vim
|
||||||
" Version: 2.2
|
" Version: 2.2
|
||||||
" Modified: 2010-01-01
|
" Modified: 2010-05-16
|
||||||
|
|
||||||
" Description: This plugin provides auto-completion for quotes, parens, etc.
|
" Description: This plugin provides auto-completion for quotes, parens, etc.
|
||||||
" Maintainer: Israel Chauca F. <israelchauca@gmail.com>
|
" Maintainer: Israel Chauca F. <israelchauca@gmail.com>
|
||||||
" Manual: Read ":help delimitMate".
|
" Manual: Read ":help delimitMate".
|
||||||
|
|||||||
Reference in New Issue
Block a user