| version 1.25, 2003/01/16 12:16:49 |
version 1.26, 2003/01/16 12:20:38 |
|
|
| # Makefile for creating distribution of vim configfiles. |
# |
| |
# Makefile for creating distribution of vim config files. |
| # Type 'make dist' for create tar-gziped and zip archiv. |
# Type 'make dist' for create tar-gziped and zip archiv. |
| |
|
| # |
# |
| # (c) Lubomir Host 'rajo' <8host AT pauli.fmph.uniba.sk> |
# Developed by Lubomir Host 'rajo' <8host AT pauli.fmph.uniba.sk> |
| |
# Copyright (c) 2001 - 2003 Platon SDG |
| |
# Licensed under terms of GNU General Public License. |
| |
# All rights reserved. |
| # |
# |
| |
|
| # $Id$ |
# $Platon$ |
| |
|
| PACKAGE = vimconfig |
PACKAGE = vimconfig |
| VERSION = 1.8pre1 |
VERSION = 1.8pre1 |
| PACKAGE_TEMPLATE_PLUGIN = templatefile |
PACKAGE_TEMPLATE_PLUGIN = templatefile |
| VERSION_TEMPLATE_PLUGIN = 1.8pre1 |
VERSION_TEMPLATE_PLUGIN = $(VERSION) |
| |
|
| |
# DISTFILES_TEMPLATE_PLUGIN {{{ |
| |
DISTFILES_TEMPLATE_PLUGIN = vim \ |
| |
vim/plugin \ |
| |
vim/plugin/templatefile.vim \ |
| |
vim/templates/ \ |
| |
vim/templates/skel.c \ |
| |
vim/templates/skel.h \ |
| |
vim/templates/skel.sh \ |
| |
vim/templates/skel.tex \ |
| |
vim/templates/Makefile |
| |
|
| DISTFILES_TEMPLATE_PLUGIN = vim \ |
# DISTFILES_TEMPLATE_PLUGIN }}} |
| vim/plugin \ |
|
| vim/plugin/templatefile.vim \ |
|
| vim/templates/ \ |
|
| vim/templates/skel.c \ |
|
| vim/templates/skel.h \ |
|
| vim/templates/skel.sh \ |
|
| vim/templates/Makefile |
|
| |
|
| |
# DISTFILES {{{ |
| DISTFILES = README \ |
DISTFILES = README \ |
| Makefile vimrc gvimrc vim \ |
Makefile vimrc gvimrc vim \ |
| vim/strace.vim \ |
vim/strace.vim \ |
| Line 41 DISTFILES = README \ |
|
| Line 49 DISTFILES = README \ |
|
| vim/ftplugin/perl.vim \ |
vim/ftplugin/perl.vim \ |
| vim/ftplugin/sgml.vim \ |
vim/ftplugin/sgml.vim \ |
| vim/ftplugin/tex.vim \ |
vim/ftplugin/tex.vim \ |
| |
vim/ftplugin/txt.vim \ |
| vim/ftplugin/vim.vim \ |
vim/ftplugin/vim.vim \ |
| vim/indent/ \ |
vim/indent/ \ |
| vim/indent/php.vim \ |
vim/indent/php.vim \ |
| vim/indent/tex.vim \ |
vim/indent/tex.vim \ |
| |
vim/local \ |
| |
vim/local/README \ |
| vim/plugin \ |
vim/plugin \ |
| vim/plugin/CmdlineCompl.vim \ |
vim/plugin/CmdlineCompl.vim \ |
| vim/plugin/calendar.vim \ |
vim/plugin/calendar.vim \ |
| Line 56 DISTFILES = README \ |
|
| Line 67 DISTFILES = README \ |
|
| vim/syntax/FEATURES.vim \ |
vim/syntax/FEATURES.vim \ |
| $(DISTFILES_TEMPLATE_PLUGIN) |
$(DISTFILES_TEMPLATE_PLUGIN) |
| |
|
| |
# DISTFILES }}} |
| |
|
| TAR = tar |
TAR = tar |
| ZIP = zip |
ZIP = zip |
| |
LN_S = ln -s |
| |
|
| ZIP_ENV = -r9 |
ZIP_ENV = -r9 |
| GZIP_ENV = --best |
GZIP_ENV = --best |
| |
|
| LN_S = ln -s |
|
| |
|
| |
|
| srcdir = . |
srcdir = . |
| distdir = $(PACKAGE)-$(VERSION) |
distdir = $(PACKAGE)-$(VERSION) |
| distdir_template_plugin = $(PACKAGE_TEMPLATE_PLUGIN)-$(VERSION_TEMPLATE_PLUGIN) |
distdir_template_plugin = $(PACKAGE_TEMPLATE_PLUGIN)-$(VERSION_TEMPLATE_PLUGIN) |
| top_distdir = $(distdir) |
top_distdir = $(distdir) |
| top_builddir = . |
top_builddir = . |
| |
|
| ######### |
######### |
| # Targets |
# Targets |
| |
|
| all: tags dist dist-template-plugin |
all: tags dist dist-template-plugin |
| |
|
| clean: clean-dist clean-dist-template-plugin clean-tags |
|
| |
|
| tags: |
tags: |
| vim -u NONE -U NONE -c ":helptags ./vim/doc" -c ":q" |
vim -u NONE -U NONE -c ":helptags ./vim/doc" -c ":q" |
| |
|
| |
# Clean {{{ |
| |
clean: clean-dist clean-dist-template-plugin clean-tags |
| |
|
| clean-tags: |
clean-tags: |
| rm -f vim/doc/tags |
rm -f vim/doc/tags |
| |
|
| Line 92 clean-dist-template-plugin: |
|
| Line 105 clean-dist-template-plugin: |
|
| -rm -rf $(distdir_template_plugin) |
-rm -rf $(distdir_template_plugin) |
| -rm -f $(distdir_template_plugin).tar.gz $(distdir_template_plugin).zip |
-rm -f $(distdir_template_plugin).tar.gz $(distdir_template_plugin).zip |
| |
|
| |
# }}} |
| |
|
| # Distribution of template plugin {{{ |
# Distribution of template plugin {{{ |
| dist-template-plugin: distdir_template_plugin |
dist-template-plugin: distdir_template_plugin |
| GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir_template_plugin).tar.gz $(distdir_template_plugin) |
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir_template_plugin).tar.gz $(distdir_template_plugin) |
| Line 122 distdir_template_plugin: $(DISTFILES_TEM |
|
| Line 137 distdir_template_plugin: $(DISTFILES_TEM |
|
| done |
done |
| # }}} Distribution of template plugin |
# }}} Distribution of template plugin |
| |
|
| |
# Distribution {{{ |
| dist: distdir |
dist: distdir |
| GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) |
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) |
| ZIP=$(ZIP_ENV) $(ZIP) $(distdir).zip $(distdir) |
ZIP=$(ZIP_ENV) $(ZIP) $(distdir).zip $(distdir) |
| Line 149 distdir: $(DISTFILES) |
|
| Line 165 distdir: $(DISTFILES) |
|
| || cp -p $$d/$$file $(distdir)/$$file ; \ |
|| cp -p $$d/$$file $(distdir)/$$file ; \ |
| fi; \ |
fi; \ |
| done |
done |
| |
# }}} |
| |
|
| |
# Install {{{ |
| install: |
install: |
| @here=`pwd`; \ |
@here="`pwd`"; \ |
| backup="bak.`date \"+%y%m%d\"`"; \ |
backup="bak.`date '+%y%m%d'`"; \ |
| if [ -d $$HOME/.vim -o -L $$HOME/.vim ]; then \ |
if [ -d "$$HOME/.vim" -o -L "$$HOME/.vim" ]; then \ |
| if [ -d $$HOME/.vim\-$$backup -o -L $$HOME/.vim\-$$backup ]; then \ |
if [ -d "$$HOME/.vim\-$$backup" -o -L "$$HOME/.vim\-$$backup" ]; then \ |
| echo "Moving $$HOME/.vim ---> $$HOME/.vim-`date \"+%y%m%d-%X\"`"; \ |
echo "Moving $$HOME/.vim ---> $$HOME/.vim-`date \"+%y%m%d-%X\"`"; \ |
| mv $$HOME/.vim $$HOME/.vim-`date "+%y%m%d-%X"` ; \ |
mv "$$HOME/.vim" "$$HOME/.vim-`date '+%y%m%d-%X'`" ; \ |
| echo "Creating symlink $$HOME/.vim ---> $$here/vim"; \ |
echo "Creating symlink $$HOME/.vim ---> $$here/vim"; \ |
| $(LN_S) $$here/vim $$HOME/.vim; \ |
$(LN_S) "$$here/vim" "$$HOME/.vim"; \ |
| else \ |
else \ |
| echo "Moving $$HOME/.vim ---> $$HOME/.vim-$$backup"; \ |
echo "Moving $$HOME/.vim ---> $$HOME/.vim-$$backup"; \ |
| mv $$HOME/.vim $$HOME/.vim-$$backup; \ |
mv "$$HOME/.vim" "$$HOME/.vim-$$backup"; \ |
| echo "Creating symlink $$HOME/.vim ---> $$here/vim"; \ |
echo "Creating symlink $$HOME/.vim ---> $$here/vim"; \ |
| $(LN_S) $$here/vim $$HOME/.vim; \ |
$(LN_S) "$$here/vim" "$$HOME/.vim"; \ |
| fi \ |
fi \ |
| else \ |
else \ |
| echo "Creating symlink $$HOME/.vim ---> $$here/vim"; \ |
echo "Creating symlink $$HOME/.vim ---> $$here/vim"; \ |
| $(LN_S) $$here/vim $$HOME/.vim; \ |
$(LN_S) "$$here/vim" "$$HOME/.vim"; \ |
| fi; \ |
fi; \ |
| for file in vimrc gvimrc; do \ |
for file in vimrc gvimrc; do \ |
| if [ -f $$HOME/.$$file -o -L $$HOME/.$$file ]; then \ |
if [ -f "$$HOME/.$$file" -o -L "$$HOME/.$$file" ]; then \ |
| if [ -f $$HOME/.$$file\-$$backup -o -L $$HOME/.$$file\-$$backup ]; then \ |
if [ -f "$$HOME/.$$file\-$$backup" -o -L "$$HOME/.$$file\-$$backup" ]; then \ |
| echo "Moving $$HOME/.$$file ---> $$HOME/.$$file-`date \"+%y%m%d-%X\"`"; \ |
echo "Moving $$HOME/.$$file ---> $$HOME/.$$file-`date \"+%y%m%d-%X\"`"; \ |
| mv $$HOME/.$$file $$HOME/.$$file-`date "+%y%m%d-%X"` ; \ |
mv "$$HOME/.$$file" "$$HOME/.$$file-`date '+%y%m%d-%X'`" ; \ |
| echo "Creating symlink $$HOME/.$$file ---> $$here/$$file"; \ |
echo "Creating symlink $$HOME/.$$file ---> $$here/$$file"; \ |
| $(LN_S) $$here/$$file $$HOME/.$$file; \ |
$(LN_S) "$$here/$$file" "$$HOME/.$$file"; \ |
| else \ |
else \ |
| echo "Moving $$HOME/.$$file ---> $$HOME/.$$file-$$backup"; \ |
echo "Moving $$HOME/.$$file ---> $$HOME/.$$file-$$backup"; \ |
| mv $$HOME/.$$file $$HOME/.$$file-$$backup; \ |
mv "$$HOME/.$$file" "$$HOME/.$$file-$$backup;" \ |
| echo "Creating symlink $$HOME/.$$file ---> $$here/$$file"; \ |
echo "Creating symlink $$HOME/.$$file ---> $$here/$$file"; \ |
| $(LN_S) $$here/$$file $$HOME/.$$file; \ |
$(LN_S) "$$here/$$file" "$$HOME/.$$file"; \ |
| fi \ |
fi \ |
| else \ |
else \ |
| echo "Creating symlink $$HOME/.$$file ---> $$here/$$file"; \ |
echo "Creating symlink $$HOME/.$$file ---> $$here/$$file"; \ |
| $(LN_S) $$here/$$file $$HOME/.$$file; \ |
$(LN_S) "$$here/$$file" "$$HOME/.$$file"; \ |
| fi; \ |
fi; \ |
| done |
done |
| |
|
| |
# }}} |
| |
|
| uninstall: |
uninstall: |
| @echo "Please remove instalation files manualy:"; \ |
@echo "Please remove instalation files manualy:"; \ |
| echo " $$HOME/.vim"; \ |
echo " $$HOME/.vim"; \ |