diff --git a/doc/.gitignore b/doc/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..1d549ade60c4d886124e7d79ab6ef6b0fdb9235c
--- /dev/null
+++ b/doc/.gitignore
@@ -0,0 +1,15 @@
+*~
+*.aux
+*.cp
+*.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 0000000000000000000000000000000000000000..6367e9aab6004d329ad1ec1749d3dc347fef0e86
--- /dev/null
+++ b/doc/Makefile
@@ -0,0 +1,77 @@
+#
+# Makefile for the documentation directory
+#
+# Copyright 1994,2000,2010   Alessandro Rubini <rubini@linux.it>
+#
+#################
+#
+# BE CAREFUL in editing:
+#	due to the large number of index files, and my use of a non standard
+#	info input file, any file $(TARGET).* is removed by "make clean"
+#
+#	I chose to use a prefix for the input file ("doc.$(TARGET)"), to ease
+#	makeing clean and applying my own rules.
+#
+###################################################################
+
+TARGET = wrs-software
+
+# Assume makeinfo can do images and --html.
+# In any case, MAKEINFO can be specified on the commandline
+
+MAKEINFO = makeinfo
+
+##############################################
+
+INPUT = $(wildcard *.in)
+TEXI = $(INPUT:.in=.texi)
+
+.SUFFIXES: .in .texi .info .html .txt
+
+.in.texi:
+	@rm -f $@ 2> /dev/null
+	sed -f ./infofilter $< > $@
+	chmod -w $@
+
+# unfortuantely implicit rules are not concatenated, so force a make run
+%.pdf: %.texi $(TEXI)
+	$(MAKE) $(TEXI)
+	texi2pdf --batch $<
+
+%.info: %.texi $(TEXI)
+	$(MAKE) $(TEXI)
+	$(MAKEINFO) $< -o $@
+
+%.html: %.texi $(TEXI)
+	$(MAKE) $(TEXI)
+	$(MAKEINFO) --html --no-split -o $@ $<
+
+%.txt: %.texi $(TEXI)
+	$(MAKE) $(TEXI)
+	$(MAKEINFO) --no-headers $< > $@
+
+##############################################
+
+ALL    = $(TARGET).info $(TARGET).txt $(TARGET).html $(TARGET).pdf
+
+all: images $(TEXI) $(ALL)
+
+images::
+	if [ -d images ]; then $(MAKE) -C images || exit 1; fi
+
+info: $(TARGET).info
+
+check: _err.ps
+	gs -sDEVICE=linux -r320x200x16 $<
+
+terse:
+	for n in cp fn ky pg toc tp vr; do \
+	   rm -f $(TARGET).$$n; \
+	done
+	rm -f *~
+
+clean: terse
+	rm -f $(ALL) $(TEXI)
+
+install:
+
diff --git a/doc/infofilter b/doc/infofilter
new file mode 100644
index 0000000000000000000000000000000000000000..a6a4ab4e21698110508a757e02d92dce5b29e438
--- /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/^[ 	]*//
+