mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 08:47:59 +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)
|
OS = $(shell uname -s)
|
||||||
BUILD_DATE = $(shell date "+%Y/%m/%d %H:%M:%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 \
|
JAR_TXT_FILES = ${shell find content skin locale \
|
||||||
-type f \
|
-type f \
|
||||||
-a ! -path '*CVS*' \
|
-a ! -path '*CVS*' \
|
||||||
@@ -22,7 +25,7 @@ JAR_BIN_FILES = ${shell find content skin \
|
|||||||
-a ! -path '*CVS*' \
|
-a ! -path '*CVS*' \
|
||||||
-a -path '*.png' \
|
-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
|
JAR = chrome/vimperator.jar
|
||||||
|
|
||||||
XPI_TXT_FILES = install.rdf chrome.manifest TODO AUTHORS Donators NEWS
|
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_JAR_SUBDIRS = $(sort ${JAR_DIRS:%=${BUILD_JAR_DIR}/%})
|
||||||
BUILD_XPI_SUBDIRS = $(sort ${XPI_DIRS:%=${BUILD_XPI_DIR}/%})
|
BUILD_XPI_SUBDIRS = $(sort ${XPI_DIRS:%=${BUILD_XPI_DIR}/%})
|
||||||
|
|
||||||
|
ASCIIDOC = asciidoc
|
||||||
ZIP = zip
|
ZIP = zip
|
||||||
SED = sed
|
SED = sed
|
||||||
|
|
||||||
@@ -70,7 +74,7 @@ CP_V=$(if ${V},-v)
|
|||||||
|
|
||||||
#### rules
|
#### 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
|
all: help
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@@ -78,17 +82,20 @@ help:
|
|||||||
@echo
|
@echo
|
||||||
@echo " make help - display this help"
|
@echo " make help - display this help"
|
||||||
@echo " make info - show some info about the system"
|
@echo " make info - show some info about the system"
|
||||||
|
@echo " make doc - build doc files"
|
||||||
@echo " make jar - build a JAR (${JAR})"
|
@echo " make jar - build a JAR (${JAR})"
|
||||||
@echo " make install - install into your firefox dir (run info)"
|
@echo " make install - install into your firefox dir (run info)"
|
||||||
@echo " make xpi - build an XPI (${XPI_NAME})"
|
@echo " make xpi - build an XPI (${XPI_NAME})"
|
||||||
@echo " make release - updates update.rdf (this is not for you)"
|
@echo " make release - updates update.rdf (this is not for you)"
|
||||||
@echo " make clean - clean up"
|
@echo " make clean - clean up"
|
||||||
|
@echo " make distclean - clean up more"
|
||||||
@echo
|
@echo
|
||||||
@echo "running some commands with V=1 will show more build details"
|
@echo "running some commands with V=1 will show more build details"
|
||||||
|
|
||||||
info:
|
info:
|
||||||
@echo "version ${VERSION}"
|
@echo "version ${VERSION}"
|
||||||
@echo "release file ${XPI}"
|
@echo "release file ${XPI}"
|
||||||
|
@echo "doc files ${DOC_SRC_FILES}"
|
||||||
@echo -e "jar files $(shell echo ${JAR_FILES} | sed 's/ /\\n /g' )"
|
@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 )
|
@test -d "${FIREFOX_DEFAULT}" || ( echo "E: didn't find your .mozilla/firefox/*.default/ dir" ; false )
|
||||||
@echo "firefox default ${FIREFOX_DEFAULT}"
|
@echo "firefox default ${FIREFOX_DEFAULT}"
|
||||||
@@ -105,6 +112,7 @@ needs_chrome_dir:
|
|||||||
-${Q}mkdir -p "${INSTALL_CHROME}"
|
-${Q}mkdir -p "${INSTALL_CHROME}"
|
||||||
${Q}test -d "${INSTALL_CHROME}"
|
${Q}test -d "${INSTALL_CHROME}"
|
||||||
|
|
||||||
|
doc: ${DOC_FILES}
|
||||||
xpi: ${XPI}
|
xpi: ${XPI}
|
||||||
jar: ${JAR}
|
jar: ${JAR}
|
||||||
|
|
||||||
@@ -125,6 +133,10 @@ clean:
|
|||||||
@echo "Cleanup..."
|
@echo "Cleanup..."
|
||||||
${Q}rm -f ${JAR} ${XPI}
|
${Q}rm -f ${JAR} ${XPI}
|
||||||
${Q}find . -name '*~' -exec rm -f {} \;
|
${Q}find . -name '*~' -exec rm -f {} \;
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
@echo "More cleanup..."
|
||||||
|
${Q}rm -f ${DOC_FILES}
|
||||||
${Q}rm -rf ${BUILD_DIR}
|
${Q}rm -rf ${BUILD_DIR}
|
||||||
|
|
||||||
#### xpi
|
#### xpi
|
||||||
@@ -173,3 +185,10 @@ ${JAR}: ${BUILD_JAR_SUBDIRS} ${JAR_FILES}
|
|||||||
done
|
done
|
||||||
${Q}( cd ${BUILD_JAR_DIR} && ${ZIP} -r ${TOP}/${JAR} ${JAR_FILES} )
|
${Q}( cd ${BUILD_JAR_DIR} && ${ZIP} -r ${TOP}/${JAR} ${JAR_FILES} )
|
||||||
@echo "SUCCESS: $@"
|
@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)
|
Help: function (filter)
|
||||||
{
|
{
|
||||||
var res = [];
|
var res = [];
|
||||||
var files = ["introduction.xhtml", "options.xhtml"];
|
var files = ["introduction.xhtml", "options.xhtml", "motion.html"];
|
||||||
for (var file in files)
|
for (var file in files)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ td.taglist code {
|
|||||||
code.tag {
|
code.tag {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: rgb(255, 0, 255); /* magenta */
|
color: rgb(255, 0, 255); /* magenta */
|
||||||
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
tr.description {
|
tr.description {
|
||||||
margin-bottom: 4px;
|
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]
|
[replacements]
|
||||||
HEADER=image:chrome://vimperator/content/logo_white.png[Vimperator]
|
HEADER=image:chrome://vimperator/content/logo_white.png[Vimperator]
|
||||||
|
|
||||||
[macros]
|
[macros]
|
||||||
# Tags
|
# Tag: |primary,secondary,tertiary| not yet support, only use single tags
|
||||||
[\\]?<(?P<index>\d+)>=tags
|
(?su)(?<!\S)[\\]?\|(?P<attrlist>.+?)\|(?!\+)=tag
|
||||||
|
# same as tag, but with anchor
|
||||||
|
(?su)(?<!\S)[\\]?\|(?P<attrlist>.+?)\|(?!\+)=atag
|
||||||
|
|
||||||
[tags-inlinemacro]
|
[tag-inlinemacro]
|
||||||
bla bla
|
<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
|
This is the optional preamble (an untitled section body). Useful for
|
||||||
writing simple sectionless documents consisting only of a preamble.
|
writing simple sectionless documents consisting only of a preamble.
|
||||||
|
|
||||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
<link rel="stylesheet" href="../content/help.css" type="text/css"/>
|
// <link rel="stylesheet" href="../content/help.css" type="text/css"/>
|
||||||
<span style="float: right;">
|
// <span style="float: right;">
|
||||||
<code class="tag">asciidoc</code>
|
// <code class="tag">asciidoc</code>
|
||||||
<code class="tag">foo</code>
|
// <code class="tag">foo</code>
|
||||||
<code class="tag">bar</code>
|
// <code class="tag">bar</code>
|
||||||
</span>
|
// </span>
|
||||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
|
||||||
tags:foo[]
|
atag:abstract[] tag:beginning[]
|
||||||
|
|
||||||
anchor:abstract[abstract]
|
|
||||||
Abstract
|
Abstract
|
||||||
--------
|
--------
|
||||||
The optional abstract (one or more paragraphs) goes here.
|
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
|
This document is an AsciiDoc article skeleton containing briefly
|
||||||
annotated element placeholders plus a couple of example index entries
|
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').
|
section titles are significant ('specialsections').
|
||||||
|
|
||||||
|
|
||||||
|
atag:section[]
|
||||||
|
|
||||||
The First Section
|
The First Section
|
||||||
-----------------
|
-----------------
|
||||||
Article sections start at level 1 and can be nested up to four levels
|
Article sections start at level 1 and can be nested up to four levels
|
||||||
|
|||||||
Reference in New Issue
Block a user