mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 02:27:58 +01:00
updated makefile for autogenerating help with asciidoc, thanks a lot bartman!
This commit is contained in:
23
Makefile
23
Makefile
@@ -6,6 +6,9 @@ VERSION = 0.6pre
|
||||
OS = $(shell uname -s)
|
||||
BUILD_DATE = $(shell date "+%Y/%m/%d %H:%M:%S")
|
||||
|
||||
DOC_SRC_FILES = $(wildcard locale/*/*.txt)
|
||||
DOC_FILES = ${DOC_SRC_FILES:%.txt=%.html}
|
||||
|
||||
JAR_TXT_FILES = ${shell find content skin locale \
|
||||
-type f \
|
||||
-a ! -path '*CVS*' \
|
||||
@@ -22,7 +25,7 @@ JAR_BIN_FILES = ${shell find content skin \
|
||||
-a ! -path '*CVS*' \
|
||||
-a -path '*.png' \
|
||||
}
|
||||
JAR_FILES = ${JAR_BIN_FILES} ${JAR_TXT_FILES}
|
||||
JAR_FILES = ${JAR_BIN_FILES} ${JAR_TXT_FILES} ${DOC_FILES}
|
||||
JAR = chrome/vimperator.jar
|
||||
|
||||
XPI_TXT_FILES = install.rdf chrome.manifest TODO AUTHORS Donators NEWS
|
||||
@@ -42,6 +45,7 @@ BUILD_XPI_DIR = ${BUILD_DIR}/xpi
|
||||
BUILD_JAR_SUBDIRS = $(sort ${JAR_DIRS:%=${BUILD_JAR_DIR}/%})
|
||||
BUILD_XPI_SUBDIRS = $(sort ${XPI_DIRS:%=${BUILD_XPI_DIR}/%})
|
||||
|
||||
ASCIIDOC = asciidoc
|
||||
ZIP = zip
|
||||
SED = sed
|
||||
|
||||
@@ -70,7 +74,7 @@ CP_V=$(if ${V},-v)
|
||||
|
||||
#### rules
|
||||
|
||||
.PHONY: all help info needs_chrome_dir jar xpi install clean
|
||||
.PHONY: all help info needs_chrome_dir doc jar xpi install clean distclean
|
||||
all: help
|
||||
|
||||
help:
|
||||
@@ -78,17 +82,20 @@ help:
|
||||
@echo
|
||||
@echo " make help - display this help"
|
||||
@echo " make info - show some info about the system"
|
||||
@echo " make doc - build doc files"
|
||||
@echo " make jar - build a JAR (${JAR})"
|
||||
@echo " make install - install into your firefox dir (run info)"
|
||||
@echo " make xpi - build an XPI (${XPI_NAME})"
|
||||
@echo " make release - updates update.rdf (this is not for you)"
|
||||
@echo " make clean - clean up"
|
||||
@echo " make distclean - clean up more"
|
||||
@echo
|
||||
@echo "running some commands with V=1 will show more build details"
|
||||
|
||||
info:
|
||||
@echo "version ${VERSION}"
|
||||
@echo "release file ${XPI}"
|
||||
@echo "doc files ${DOC_SRC_FILES}"
|
||||
@echo -e "jar files $(shell echo ${JAR_FILES} | sed 's/ /\\n /g' )"
|
||||
@test -d "${FIREFOX_DEFAULT}" || ( echo "E: didn't find your .mozilla/firefox/*.default/ dir" ; false )
|
||||
@echo "firefox default ${FIREFOX_DEFAULT}"
|
||||
@@ -105,6 +112,7 @@ needs_chrome_dir:
|
||||
-${Q}mkdir -p "${INSTALL_CHROME}"
|
||||
${Q}test -d "${INSTALL_CHROME}"
|
||||
|
||||
doc: ${DOC_FILES}
|
||||
xpi: ${XPI}
|
||||
jar: ${JAR}
|
||||
|
||||
@@ -125,6 +133,10 @@ clean:
|
||||
@echo "Cleanup..."
|
||||
${Q}rm -f ${JAR} ${XPI}
|
||||
${Q}find . -name '*~' -exec rm -f {} \;
|
||||
|
||||
distclean: clean
|
||||
@echo "More cleanup..."
|
||||
${Q}rm -f ${DOC_FILES}
|
||||
${Q}rm -rf ${BUILD_DIR}
|
||||
|
||||
#### xpi
|
||||
@@ -173,3 +185,10 @@ ${JAR}: ${BUILD_JAR_SUBDIRS} ${JAR_FILES}
|
||||
done
|
||||
${Q}( cd ${BUILD_JAR_DIR} && ${ZIP} -r ${TOP}/${JAR} ${JAR_FILES} )
|
||||
@echo "SUCCESS: $@"
|
||||
|
||||
#### doc
|
||||
|
||||
${DOC_FILES}: %.html: %.txt Makefile
|
||||
@echo "DOC $@"
|
||||
${Q}${ASCIIDOC} --unsafe -a linkcss -o $@ $<
|
||||
|
||||
|
||||
@@ -300,7 +300,7 @@ vimperator.Completion = function () //{{{
|
||||
Help: function (filter)
|
||||
{
|
||||
var res = [];
|
||||
var files = ["introduction.xhtml", "options.xhtml"];
|
||||
var files = ["introduction.xhtml", "options.xhtml", "motion.html"];
|
||||
for (var file in files)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -84,6 +84,7 @@ td.taglist code {
|
||||
code.tag {
|
||||
font-weight: bold;
|
||||
color: rgb(255, 0, 255); /* magenta */
|
||||
padding-left: 5px;
|
||||
}
|
||||
tr.description {
|
||||
margin-bottom: 4px;
|
||||
|
||||
@@ -1,9 +1,41 @@
|
||||
[glossary]
|
||||
author=Martin Stubenschrott
|
||||
email=stubenschrott@gmx.net
|
||||
|
||||
# [header]
|
||||
# <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
# "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
# <html>
|
||||
# <head>
|
||||
# <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
# <meta name="generator" content="AsciiDoco DocBook, text to LinuxDoc, text to XML, AsciiDoc, Python installer, Python execution environment" />
|
||||
# <link rel="stylesheet" href="main.css" type="text/css" />
|
||||
# <title>{doctitle}</title>
|
||||
# </head>
|
||||
# <body>
|
||||
# <id="content">
|
||||
# <h1>{doctitle}</h1>
|
||||
|
||||
|
||||
|
||||
[replacements]
|
||||
HEADER=image:chrome://vimperator/content/logo_white.png[Vimperator]
|
||||
|
||||
[macros]
|
||||
# Tags
|
||||
[\\]?<(?P<index>\d+)>=tags
|
||||
# Tag: |primary,secondary,tertiary| not yet support, only use single tags
|
||||
(?su)(?<!\S)[\\]?\|(?P<attrlist>.+?)\|(?!\+)=tag
|
||||
# same as tag, but with anchor
|
||||
(?su)(?<!\S)[\\]?\|(?P<attrlist>.+?)\|(?!\+)=atag
|
||||
|
||||
[tags-inlinemacro]
|
||||
bla bla
|
||||
[tag-inlinemacro]
|
||||
<link rel="stylesheet" href="../content/help.css" type="text/css"/>
|
||||
<span style="float: right;">
|
||||
<code class="tag" style="padding-left: 10px;">{target}</code>
|
||||
</span>
|
||||
|
||||
[atag-inlinemacro]
|
||||
<link rel="stylesheet" href="../content/help.css" type="text/css"/>
|
||||
<a href="{target}"></a>
|
||||
<span style="float: right;">
|
||||
<code class="tag" style="padding-left: 10px;">{target}</code>
|
||||
</span>
|
||||
|
||||
@@ -12,21 +12,21 @@ VIMperator :)*
|
||||
This is the optional preamble (an untitled section body). Useful for
|
||||
writing simple sectionless documents consisting only of a preamble.
|
||||
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
<link rel="stylesheet" href="../content/help.css" type="text/css"/>
|
||||
<span style="float: right;">
|
||||
<code class="tag">asciidoc</code>
|
||||
<code class="tag">foo</code>
|
||||
<code class="tag">bar</code>
|
||||
</span>
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// <link rel="stylesheet" href="../content/help.css" type="text/css"/>
|
||||
// <span style="float: right;">
|
||||
// <code class="tag">asciidoc</code>
|
||||
// <code class="tag">foo</code>
|
||||
// <code class="tag">bar</code>
|
||||
// </span>
|
||||
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
tags:foo[]
|
||||
atag:abstract[] tag:beginning[]
|
||||
|
||||
anchor:abstract[abstract]
|
||||
Abstract
|
||||
--------
|
||||
The optional abstract (one or more paragraphs) goes here.
|
||||
You can also jump to xref:section[section].
|
||||
|
||||
This document is an AsciiDoc article skeleton containing briefly
|
||||
annotated element placeholders plus a couple of example index entries
|
||||
@@ -34,6 +34,8 @@ and footnotes. The preface, appendix, bibliography, glossary and index
|
||||
section titles are significant ('specialsections').
|
||||
|
||||
|
||||
atag:section[]
|
||||
|
||||
The First Section
|
||||
-----------------
|
||||
Article sections start at level 1 and can be nested up to four levels
|
||||
|
||||
Reference in New Issue
Block a user