[beast] DOCS: download and build Beast-Quickstart.html from beast.testbit.eu
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast] DOCS: download and build Beast-Quickstart.html from beast.testbit.eu
- Date: Wed, 4 May 2011 00:36:23 +0000 (UTC)
commit f13868a3c1ad90acb68056442cae511e15fb44f2
Author: Tim Janik <timj gtk org>
Date: Wed May 4 02:35:14 2011 +0200
DOCS: download and build Beast-Quickstart.html from beast.testbit.eu
beast-gtk/bstapp.c | 2 +-
configure.in | 1 -
docs/Makefile.am | 103 +++++++++-------
docs/beast-index.doxi | 2 +-
docs/imports/Beast-Quickstart | 260 -----------------------------------------
docs/imports/Makefile.am | 33 -----
docs/imports/beastdocs.css | 36 ------
docs/imports/style-append.css | 10 --
8 files changed, 61 insertions(+), 386 deletions(-)
---
diff --git a/beast-gtk/bstapp.c b/beast-gtk/bstapp.c
index b7c2869..b6ce56d 100644
--- a/beast-gtk/bstapp.c
+++ b/beast-gtk/bstapp.c
@@ -1067,7 +1067,7 @@ app_action_exec (gpointer data,
docs_title = "BEAST FAQ";
goto BROWSE_LOCAL_URL;
case ACTION_HELP_QUICK_START:
- docs_url = "html/Beast-Quickstart";
+ docs_url = "html/Beast-Quickstart.html";
docs_title = "BEAST Quick Start Guide";
goto BROWSE_LOCAL_URL;
case ACTION_HELP_RELEASE_NOTES:
diff --git a/configure.in b/configure.in
index 1ade236..084682e 100644
--- a/configure.in
+++ b/configure.in
@@ -696,7 +696,6 @@ tests/filecheck/Makefile
doxer/Makefile
docs/Makefile
docs/images/Makefile
-docs/imports/Makefile
])
AC_OUTPUT
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 8c23198..ba87bd7 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -4,17 +4,71 @@
## GNU Lesser General Public License version 2 or any later version.
include $(top_srcdir)/Makefile.decl
-SUBDIRS = images imports
+SUBDIRS = images
-# Manual Pages to be built and installed
+# === Manual Pages to be fetched, built and installed
man_MANS = ${MANUAL_PAGES} # automake-1.11 needs this expandable w/o patsubst
MANUAL_PAGES = mans/bse.5 mans/beast.1 mans/bsescm.1 mans/bsewavetool.1 mans/sfidl.1
-CACHE_TARGETS = $(patsubst mans/%,cache/%,$(MANUAL_PAGES))
+MANUAL_CACHE_TARGETS = $(patsubst mans/%,cache/%,$(MANUAL_PAGES))
HTMLMAN_TARGETS = $(patsubst mans/%,html/%.html,$(MANUAL_PAGES))
EXTRA_DIST += $(MANUAL_PAGES) $(HTMLMAN_TARGETS)
-MAINTAINERCLEANFILES += $(CACHE_TARGETS) $(MAN_TARGETS)
+MAINTAINERCLEANFILES += $(MANUAL_CACHE_TARGETS) $(MAN_TARGETS)
CLEANFILES += $(HTMLMAN_TARGETS)
+# rules
+mans/:
+ mkdir -p $@
+$(MANUAL_CACHE_TARGETS): cache/stamp-refresh
+ curl -sfS http://beast.testbit.eu/$(@F)?action=render >$(@D)/xgen-$(@F)
+ mv $(@D)/xgen-$(@F) $@ ; rm -f $(@D)/xgen-$(@F)
+WIKIHTML2MAN = wikihtml2man.py
+mans/%: cache/% | mans/
+ $(WIKIHTML2MAN) $< >$(@D)/xgen-$(@F)
+ mv $(@D)/xgen-$(@F) $@ ; rm -f $(@D)/xgen-$(@F)
+html/%.html: mans/% | html/
+ groff -mandoc -Thtml $< >$(@D)/xgen-$(@F)
+ mv $(@D)/xgen-$(@F) $@ ; rm -f $(@D)/xgen-$(@F)
+
+# === Html Docs to be fetched, built and installed
+htmldocsdir = ${beastdocsdir}/html
+htmldocs_DATA = $(HTML_DOCS) $(HTML_TARGETS) $(HTMLMAN_TARGETS)
+HTML_DOCS = html/Beast-Quickstart.html
+HTML_CACHE_TARGETS = $(patsubst html/%,cache/%,$(HTML_DOCS))
+EXTRA_DIST += $(HTML_DOCS) $(HTML_TARGETS)
+MAINTAINERCLEANFILES += $(HTML_CACHE_TARGETS)
+# rules
+html/:
+ mkdir -p $@
+$(HTML_CACHE_TARGETS): cache/stamp-refresh
+ curl -sfS http://beast.testbit.eu/$(basename $(@F))?action=render >$(@D)/xgen-$(@F)
+ mv $(@D)/xgen-$(@F) $@ ; rm -f $(@D)/xgen-$(@F)
+html/%.html: cache/%.html | html/
+ @echo 'htmlgen... $(@F)...'
+ @echo -e $(HTML1) > $(@D)/xgen-$(@F) && sed -n $(H1SED) $< >> $(@D)/xgen-$(@F)
+ @echo -e $(HTML2) >> $(@D)/xgen-$(@F) && cat $< >> $(@D)/xgen-$(@F) && echo -e $(HTML3) >> $(@D)/xgen-$(@F)
+ mv $(@D)/xgen-$(@F) $@ ; rm -f $(@D)/xgen-$(@F)
+HTML1 = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n' \
+ '<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">\n' \
+ '<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n' \
+ '<title>'
+HTML2 = '</title>\n' \
+ '</head> <body>\n'
+HTML3 = '\n</body></html>\n'
+H1SED = '/<[hH]1\b/{ s/<[^>]\+>//g ; s/^\s\+//; p ; q }' # sed hack to extract first H1 title
+# === cache/ handling for file downloads
+cache/:
+ mkdir -p $@
+.PHONY: stamp-refresh-message
+stamp-refresh-message: # conditional phony dependency
+ @TXT=" Some source files hosted online appear outdated; forcing refresh... " \
+ && echo "$$TXT" | sed 's/./=/g' && echo "$$TXT" && echo "$$TXT" | sed 's/./=/g'
+cache/stamp-refresh: $(call AGINGRULE, cache/stamp-refresh, 1440, stamp-refresh-message) | cache/ # refresh daily
+ touch $@
+# $(call AGINGRULE, stamp-file-for-aging, AgingInMinutes, rule-name-for-remaking)
+AGINGRULE = $(shell test -e $(1) && find $(1) -type f -mmin -"$(strip $(2))" | grep -q '.' || echo " $(3)")
+
+
+# === Html built targets, old-doxer
HTML_TARGETS = $(strip \
html/architecture.html \
html/beast-index.html \
@@ -27,12 +81,6 @@ HTML_TARGETS = $(strip \
html/sfidl-manual.html \
\
html/coding-style.html \
- \
- ${HTML_IMPORTS} \
-)
-HTML_IMPORTS = $(strip \
- html/beastdocs.css \
- html/Beast-Quickstart \
)
CLEANFILES += ${HTML_TARGETS}
STYLE_FILES = $(strip \
@@ -49,6 +97,7 @@ STYLE_FILES = $(strip \
EXTRA_DIST += $(patsubst %, %, $(STYLE_FILES))
STYLE_TARGETS = $(patsubst %, html/%, $(STYLE_FILES))
CLEANFILES += ${STYLE_TARGETS}
+
PSOURCE_TARGETS = $(strip \
psource/birnet.psrc \
psource/sfi.psrc \
@@ -63,12 +112,6 @@ DOXER = $(top_srcdir)/doxer/doxer.py
DOCFRAME_DEFS = -D DOXI_INCLUDE_FILE \"docframe.doxi\"
DOXIDEFS = -D TOP_WEBDIR "." -D BST_VERSION ${BST_VERSION} -I $(srcdir) $(call DOCFRAME_DEFS)
-# ship readily built documentation
-EXTRA_DIST += $(MAN_TARGETS) $(HTML_TARGETS)
-
-# build and install HTML docs
-htmldocsdir = ${beastdocsdir}/html
-htmldocs_DATA = ${HTML_TARGETS} $(HTMLMAN_TARGETS)
# build and install HTML style/ targets
styledocsdir = ${htmldocsdir}/style
styledocs_DATA = ${STYLE_TARGETS}
@@ -92,29 +135,6 @@ html/style/%: $(srcdir)/style/%
style/doxer-style.css: @DOXRULE@
$(DOXER) writecss -d style/
-# $(call AGINGRULE, stamp-file-for-aging, AgingInMinutes, rule-name-for-remaking)
-AGINGRULE = $(shell test -e $(1) && find $(1) -type f -mmin -"$(strip $(2))" | grep -q '.' || echo " $(3)")
-
-# MAN rules for download, roff and html generation
-mans/ cache/ html/:
- mkdir -p $@
-.PHONY: stamp-refresh-message
-stamp-refresh-message: # conditional phony dependency
- @TXT=" Some source files hosted online appear outdated; forcing refresh... " \
- && echo "$$TXT" | sed 's/./=/g' && echo "$$TXT" && echo "$$TXT" | sed 's/./=/g'
-cache/stamp-refresh: $(call AGINGRULE, cache/stamp-refresh, 1440, stamp-refresh-message) | cache/ # refresh daily
- touch $@
-$(CACHE_TARGETS): cache/stamp-refresh
- curl -sfS http://beast.testbit.eu/$(@F)?action=render >$(@D)/xgen-$(@F)
- mv $(@D)/xgen-$(@F) $@ ; rm -f $(@D)/xgen-$(@F)
-WIKIHTML2MAN = wikihtml2man.py
-mans/%: cache/% | mans/
- $(WIKIHTML2MAN) $< >$(@D)/xgen-$(@F)
- mv $(@D)/xgen-$(@F) $@ ; rm -f $(@D)/xgen-$(@F)
-html/%.html: mans/% | html/
- groff -mandoc -Thtml $< >$(@D)/xgen-$(@F)
- mv $(@D)/xgen-$(@F) $@ ; rm -f $(@D)/xgen-$(@F)
-
# HTML generation rules
html/%.html: @DOXRULE@ %.doxi
@mkdir -p html/
@@ -123,11 +143,6 @@ html/%.html: @DOXRULE@ gendoxi/%.doxi
@mkdir -p html/
$(DOXER) doxi2html $< -d html/ $(DOXIDEFS)
-# HTML import rules
-${HTML_IMPORTS}:
- @mkdir -p html/
- cp $(subst html/, ${srcdir}/imports/, ${HTML_IMPORTS}) html/
-
# Generated .doxi files
gendoxi/:
mkdir -p $@
diff --git a/docs/beast-index.doxi b/docs/beast-index.doxi
index 0840a0d..de5a462 100644
--- a/docs/beast-index.doxi
+++ b/docs/beast-index.doxi
@@ -10,7 +10,7 @@
@itemize
@item @uri{ top_webdir/beast-index.html, Index}
@item @uri{ top_webdir/faq.html, FAQ (Frequently Asked Questions)}
- item @uri{ top_webdir/Beast-Quickstart, Quickstart Guide}
+ item @uri{ top_webdir/Beast-Quickstart.html, Quickstart Guide}
@done
@heading Manual Pages
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]