From 66b2d2d7a7d664db7d94fb163c71420894614b46 Mon Sep 17 00:00:00 2001
From: Alessandro Rubini <rubini@gnudd.com>
Date: Wed, 29 Feb 2012 13:07:33 +0100
Subject: [PATCH] doc: empty structure

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
---
 doc/.gitignore | 16 +++++++++++
 doc/Makefile   | 60 ++++++++++++++++++++++++++++++++++++++++
 doc/fixinfo    | 18 ++++++++++++
 doc/infofilter | 21 ++++++++++++++
 doc/spec-sw.in | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 190 insertions(+)
 create mode 100644 doc/.gitignore
 create mode 100644 doc/Makefile
 create mode 100644 doc/fixinfo
 create mode 100644 doc/infofilter
 create mode 100644 doc/spec-sw.in

diff --git a/doc/.gitignore b/doc/.gitignore
new file mode 100644
index 0000000..a6900d9
--- /dev/null
+++ b/doc/.gitignore
@@ -0,0 +1,16 @@
+*~
+*.aux
+*.cp
+*.cps
+*.fn
+*.html
+*.info
+*.ky
+*.log
+*.pdf
+*.pg
+*.texi
+*.toc
+*.tp
+/*.txt
+*.vr
diff --git a/doc/Makefile b/doc/Makefile
new file mode 100644
index 0000000..553ac80
--- /dev/null
+++ b/doc/Makefile
@@ -0,0 +1,60 @@
+#
+# Makefile for the documentation directory
+#
+# Copyright 1994,2000,2010,2011   Alessandro Rubini <rubini@linux.it>
+#
+#################
+
+# There is not basenames here, all *.in are considered input
+INPUT = $(wildcard *.in)
+
+TEXI = $(INPUT:.in=.texi)
+INFO = $(INPUT:.in=.info)
+HTML = $(INPUT:.in=.html)
+TXT  = $(INPUT:.in=.txt)
+PDF  = $(INPUT:.in=.pdf)
+
+ALL    = $(INFO) $(HTML) $(TXT) $(PDF)
+
+MAKEINFO ?= makeinfo
+
+%.texi: %.in
+	@rm -f $@
+	sed -f ./infofilter $< > $@
+	emacs -batch --no-site-file -l fixinfo $@
+	chmod -w $@
+
+%.pdf: %.texi
+	texi2pdf --batch $<
+
+%.info: %.texi
+	$(MAKEINFO) $< -o $@
+
+%.html: %.texi
+	$(MAKEINFO) --html --no-split -o $@ $<
+
+%.txt: %.texi
+	$(MAKEINFO) --no-headers $< > $@
+
+##############################################
+.PHONY: all images check terse clean install
+.INTERMEDIATE: $(TEXI)
+
+all: images $(ALL)
+	$(MAKE) terse
+
+images::
+	if [ -d images ]; then $(MAKE) -C images || exit 1; fi
+
+check: _err.ps
+	gs -sDEVICE=linux -r320x200x16 $<
+
+terse:
+	for n in cp fn ky pg toc tp vr aux log; do rm -f *.$$n; done
+	rm -f *~
+
+clean: terse
+	rm -f $(ALL) $(TEXI)
+
+install:
+
diff --git a/doc/fixinfo b/doc/fixinfo
new file mode 100644
index 0000000..b7ae0ba
--- /dev/null
+++ b/doc/fixinfo
@@ -0,0 +1,18 @@
+
+;; use:
+;;     emacs -batch -l ./fixinfo.el <file>
+;; or, better:
+;;     emacs -batch --no-site-file -l ./fixinfo.el <file>
+
+(defun fixinfo (file)
+  (find-file-other-window file)
+  (message (concat "Maxing texinfo tree in " file))
+  (texinfo-all-menus-update)
+  (texinfo-every-node-update)
+  (save-buffer)
+  (kill-buffer (current-buffer))
+)
+
+;; loop over command line arguments
+(mapcar 'fixinfo command-line-args-left)
+(kill-emacs)
diff --git a/doc/infofilter b/doc/infofilter
new file mode 100644
index 0000000..a6a4ab4
--- /dev/null
+++ b/doc/infofilter
@@ -0,0 +1,21 @@
+#! /usr/bin/sed -f
+
+# allow "%" as a comment char, but only at the beginning of the line
+s/^%/@c /
+#s/[^\\]%.*$//
+s/^\\%/%/
+
+
+#preserve blanks and braces in @example blocks
+/@example/,/@end example/ s/{/@{/g
+/@example/,/@end example/ s/}/@}/g
+/@example/,/@end example/ p
+/@example/,/@end example/ d
+/@smallexample/,/@end smallexample/ s/{/@{/g
+/@smallexample/,/@end smallexample/ s/}/@}/g
+/@smallexample/,/@end smallexample/ p
+/@smallexample/,/@end smallexample/ d
+
+# remove leading blanks
+s/^[ 	]*//
+
diff --git a/doc/spec-sw.in b/doc/spec-sw.in
new file mode 100644
index 0000000..b150117
--- /dev/null
+++ b/doc/spec-sw.in
@@ -0,0 +1,75 @@
+\input texinfo    @c -*-texinfo-*-
+%
+% spec-sw.in - main file for the documentation
+%
+%%%%
+
+%------------------------------------------------------------------------------
+%
+%                         NOTE FOR THE UNAWARE USER
+%                         =========================
+%
+%    This file is a texinfo source. It isn't the binary file of some strange
+%    editor of mine. If you want ASCII, you should "make spec-sw.txt".
+%
+%------------------------------------------------------------------------------
+
+%
+% This is not a conventional info file...
+% I use three extra features:
+%   - The '%' as a comment marker, if at beginning of line ("\%" -> "%")
+%   - leading blanks are allowed (this is something I can't live without)
+%   - braces are automatically escaped when they appear in example blocks
+%
+
+@comment %**start of header
+@documentlanguage en
+@documentencoding ISO-8859-1
+@setfilename spec-sw.info
+@settitle spec-sw
+@iftex
+@afourpaper
+@end iftex
+@paragraphindent none
+@comment %**end of header
+
+@setchapternewpage off
+
+@set update-month February 2012
+
+@finalout
+
+@titlepage
+@title spec-sw
+@subtitle @value{update-month}
+@subtitle A driver for the SPEC card and its FMC modules
+@author Alessandro Rubini for CERN
+@end titlepage
+@headings single
+
+@c ##########################################################################
+@iftex
+@contents
+@end iftex
+
+@c ##########################################################################
+@node Top
+@top Introduction
+
+@menu
+* Examples::                    
+@end menu
+
+@c ##########################################################################
+@node Examples
+@chapter Examples
+
+
+
+@c ##########################################################################
+@bye
+
+
+@c  LocalWords:  gnudd titlepage iftex texinfo CERN documentlanguage settitle
+@c  LocalWords:  documentencoding setfilename afourpaper paragraphindent
+@c  LocalWords:  setchapternewpage finalout
-- 
GitLab