diff options
author | Peter Odding <peter@peterodding.com> | 2010-06-18 14:11:35 +0200 |
---|---|---|
committer | Peter Odding <peter@peterodding.com> | 2010-06-18 14:11:35 +0200 |
commit | 336064071eb1c42f8b694efe00c9d4d216df56bf (patch) | |
tree | 3c89040e6ed712bc497075e2a1892b667285732a | |
parent | 24cd42357f25f0cf182c83b3b82a3b60e6e6e9f0 (diff) | |
download | vim-easytags-336064071eb1c42f8b694efe00c9d4d216df56bf.tar.gz |
Moved generation of HTML documentation to my website
-rw-r--r-- | Makefile | 44 | ||||
-rw-r--r-- | doc/README.footer | 2 | ||||
-rw-r--r-- | doc/README.header | 20 |
3 files changed, 13 insertions, 53 deletions
@@ -1,43 +1,25 @@ +PROJECT=easytags +VIMDOC := $(shell mktemp -u) +ZIPFILE := $(shell mktemp -u) +ZIPDIR := $(shell mktemp -d) DEPENDS=autoload/xolox.vim \ autoload/xolox/escape.vim \ autoload/xolox/timer.vim \ autoload/xolox/option.vim -VIMDOC=doc/easytags.txt -HTMLDOC=doc/readme.html -ZIPDIR := $(shell mktemp -d) -ZIPFILE := $(shell mktemp -u) # NOTE: Make does NOT expand the following back ticks! -VERSION=`grep '^" Version:' easytags.vim | awk '{print $$3}'` +VERSION=`grep '^" Version:' $(PROJECT).vim | awk '{print $$3}'` # The main rule builds a ZIP that can be published to http://www.vim.org. -archive: Makefile easytags.vim autoload.vim $(VIMDOC) $(HTMLDOC) - @echo "Creating \`easytags-$(VERSION).zip' .." +archive: Makefile $(PROJECT).vim autoload.vim README.md + @echo "Creating \`$(PROJECT).txt' .." + @mkd2vimdoc.py $(PROJECT).txt < README.md > $(VIMDOC) + @echo "Creating \`$(PROJECT)-$(VERSION).zip' .." @mkdir -p $(ZIPDIR)/plugin $(ZIPDIR)/autoload/xolox $(ZIPDIR)/doc - @cp easytags.vim $(ZIPDIR)/plugin - @cp autoload.vim $(ZIPDIR)/autoload/easytags.vim + @cp $(PROJECT).vim $(ZIPDIR)/plugin + @cp autoload.vim $(ZIPDIR)/autoload/$(PROJECT).vim @for SCRIPT in $(DEPENDS); do cp $$HOME/.vim/$$SCRIPT $(ZIPDIR)/$$SCRIPT; done - @cp $(VIMDOC) $(ZIPDIR)/doc/easytags.txt - @cp $(HTMLDOC) $(ZIPDIR)/doc/easytags.html + @cp $(VIMDOC) $(ZIPDIR)/doc/$(PROJECT).txt @cd $(ZIPDIR) && zip -r $(ZIPFILE) . >/dev/null @rm -R $(ZIPDIR) - @mv $(ZIPFILE) easytags-$(VERSION).zip - -# This rule converts the Markdown README to Vim documentation. -$(VIMDOC): Makefile README.md - @echo "Creating \`$(VIMDOC)' .." - @mkd2vimdoc.py `basename $(VIMDOC)` < README.md > $(VIMDOC) - -# This rule converts the Markdown README to HTML, which reads easier. -$(HTMLDOC): Makefile README.md doc/README.header doc/README.footer - @echo "Creating \`$(HTMLDOC)' .." - @cat doc/README.header > $(HTMLDOC) - @cat README.md | markdown | SmartyPants >> $(HTMLDOC) - @cat doc/README.footer >> $(HTMLDOC) - -# This is only useful for myself, it uploads the latest README to my website. -web: $(HTMLDOC) - @echo "Uploading homepage .." - @scp -q $(HTMLDOC) vps:/home/peterodding.com/public/files/code/vim/easytags/index.html - -all: archive web + @mv $(ZIPFILE) $(PROJECT)-$(VERSION).zip diff --git a/doc/README.footer b/doc/README.footer deleted file mode 100644 index 70723d9..0000000 --- a/doc/README.footer +++ /dev/null @@ -1,2 +0,0 @@ - </body> -</html> diff --git a/doc/README.header b/doc/README.header deleted file mode 100644 index c2e063d..0000000 --- a/doc/README.header +++ /dev/null @@ -1,20 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" -"http://www.w3.org/TR/html4/strict.dtd"> -<html> - <head> - <title>easytags.vim - Automated tag generation and syntax highlighting in Vim</title> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> - <style type="text/css"> - body { font-family: sans-serif; padding: 1em 30% 4em 1em; } - a:link, a:visited { color: #000080; } - a:hover, a:active { color: #8B0000; } - pre, code, tt { font-family: Monaco, Consolas, monospace; } - pre { margin-left: 2em; } - code { background: #F6F6F6; padding: .1em .3em; } - p { text-align: justify; line-height: 1.75em; } - h1 { padding: 0 30% 0 0; } - h2, h3 { border-bottom: 2px solid #F6F6F6; margin: 2em 0 -0.5em 0; padding-left: 0.5em; } - hr { height: 0; border: none; border: 1px solid #F6F6F6; } - </style> - </head> - <body> |