Index: Makefile.am
===================================================================
--- Makefile.am	(revision caa791c53cad0234aa9bf3d99129f50457d7ff0c)
+++ Makefile.am	(revision ac3150674e4f72a972310344c039e3479bb29f51)
@@ -6,6 +6,7 @@
 dox emacs redhat desktop
 
+DIST_SUBDIRS = $(SUBDIRS) doc
+
 EXTRA_DIST = README README.md README.pkg autogen.sh doxy redhat/singular.spec.in GPL2 GPL3
-EXTRA_DIST += doc/Makefile.in doc/version.texi.in doc/pyobject.yes.doc doc/pyobject.no.doc doc/cones.yes.doc doc/cones.no.doc
 
 bin_SCRIPTS = libsingular-config
@@ -26,6 +27,4 @@
 DISTCLEANFILES = $(nodist_configheader_HEADERS)
 
-dist_man1_MANS = doc/Singular.man doc/ESingular.man doc/TSingular.man
-
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = Singular.pc
Index: configure.ac
===================================================================
--- configure.ac	(revision caa791c53cad0234aa9bf3d99129f50457d7ff0c)
+++ configure.ac	(revision ac3150674e4f72a972310344c039e3479bb29f51)
@@ -333,4 +333,5 @@
 AC_CHECK_PROGS([DVIPS], [dvips])
 AC_CONFIG_FILES([doc/Makefile])
+AC_CONFIG_FILES([doc/Makefile-docbuild])
 AC_CONFIG_FILES([doc/version.texi])
 AC_CONFIG_LINKS([doc/pyobject.doc:doc/pyobject.${enable_pyobject_module}.doc
Index: doc/Makefile-docbuild.in
===================================================================
--- doc/Makefile-docbuild.in	(revision ac3150674e4f72a972310344c039e3479bb29f51)
+++ doc/Makefile-docbuild.in	(revision ac3150674e4f72a972310344c039e3479bb29f51)
@@ -0,0 +1,289 @@
+####################################################################
+###
+### Makefile for Singular documentation
+#####################################################################
+SHELL=/bin/sh
+
+####################################################################
+##
+## Configuration
+##
+SINGUNAME       = spielwiese
+
+top_builddir    = @top_builddir@
+top_srcdir      = @top_srcdir@
+bindir	        = ${top_builddir}/Singular
+EXEEXT          = @EXEEXT@
+
+##
+## needed programs
+##
+MKINSTALLDIRS   = mkdir -p
+UUDECODE        = uudecode
+
+PERL            = perl
+TEX             = tex
+MAKEINFO        = @MAKEINFO@ --force
+TEXI2PDF        = @TEXI2PDF@
+TEXINDEX        = @TEXINDEX@
+# use our local texi2html
+TEXI2HTML       = ./texi2html
+DVIPS           = @DVIPS@
+
+VERBOSE         = 1 # override this with make VERBOSE=2
+
+# d2t stuff
+SINGULAR        = ${top_builddir}/Singular/Singular
+SINGULAR_LIB_DIR= ${top_srcdir}/Singular/LIB
+# from Singular/Makefile.am, extended by dynmodules stuff:
+TESTS_ENVIRONMENT = SINGULARPATH='${top_builddir}/Singular/LIB:${top_srcdir}/Singular/LIB:${top_builddir}/libpolys/polys/.libs:${top_builddir}/factory/gftables:'"$$(for d in ${top_builddir}/Singular/dyn_modules/*/.libs; do printf $$d:; done)" SINGULAR_ROOT_DIR='${top_builddir}' PATH="${top_builddir}/IntegerProgramming:$$PATH"
+LIBPARSE        = ${bindir}/libparse${EXEEXT}
+DOC_SUBDIR      = ./d2t_singular
+EX_SUBDIR       = ./examples
+CHKSUM_DB       = ${DOC_SUBDIR}/chksum
+# which tags to avoid:
+DOC2TEX_EXAMPLE_EXCLUSIONS = -exclude polymake -exclude bertini
+@ENABLE_PYOBJECT_MODULE_FALSE@ DOC2TEX_EXAMPLE_EXCLUSIONS += -exclude pyobject
+# which tags to avoid:
+TAG		= polymake
+DOC2TEX         = ${TESTS_ENVIRONMENT} ${PERL} ./doc2tex.pl -docdir ${DOC_SUBDIR} \
+                  -Singular ${SINGULAR} -verbose ${VERBOSE} -make ${MAKE} \
+		  -exdir ${EX_SUBDIR} ${DOC2TEX_EXAMPLE_EXCLUSIONS}
+
+DOC2TEX_M        = ${TESTS_ENVIRONMENT} ${PERL} ./doc2tex.pl -docdir ${DOC_SUBDIR} \
+                  -Singular ${SINGULAR} -verbose ${VERBOSE} -make ${MAKE} \
+		  -exdir ${EX_SUBDIR}
+
+PL2DOC		= ${PERL} ./pl2doc.pl ${TAG} -db ${CHKSUM_DB}
+PL2DOC_M	= ${PERL} ./pl2doc.pl -db ${CHKSUM_DB}
+
+# t2h stuff
+TMP_DIR		= tmp
+HTML_SUBDIR     = html
+TEXI2HTML_INIT  = t2h_singular.init
+ifeq ($(VERBOSE),0)
+T2H_VERBOSE	=
+else
+T2H_VERBOSE     = -Verbose
+endif
+TEXI2HTML_OPTS  = -init_file ${TEXI2HTML_INIT} -l2h \
+	          -short_ext -l2h_tmp ${TMP_DIR} -subdir ${HTML_SUBDIR} \
+                  ${T2H_VERBOSE}
+HTML_MANUAL_PREFIX = sing
+HTML_TUTOR_PREFIX  = tut
+HTML_MANUAL_TOP    = index.htm
+HTML_TUTOR_TOP     = tutor.htm
+##
+## End configuration dependend stuff
+#################################################################
+
+###########################################################
+# File sets
+#
+STANDALONE_TEXI_FILES	= COPYING.texi NEWS.texi  lib2doc.texi
+
+DOC2TEX_FILES	= cones.tex countedref.tex decodegb.tex \
+		examples.tex general.tex ti_ip.tex math.tex reference.tex \
+		start.tex types.tex pdata.tex tricks.tex platform.tex \
+		plural.tex letterplace.tex plulibs.tex sca.tex pyobject.tex
+
+MANUAL_FILES	= ${TEX_FILES} ${DOC2TEX_FILES}
+
+TUTOR_FILES	= \
+		tutor.tex examples.tex start.tex COPYING.texi
+
+IMAGES_UU	:= $(wildcard images/*.uu)
+IMAGES     := $(IMAGES_UU:images/%.uu=%)
+IMAGES_SRC := $(IMAGES:%=images/%)
+IMAGES_HTML := $(IMAGES:%=${HTML_SUBDIR}/%)
+
+# prepend bindir to path so that programs from there are taken first
+export PATH := "${bindir}:${PATH}"
+
+###########################################################
+# top targets
+#
+
+.PHONY: info dvi ps html
+
+# default target
+all: info dvi html singular.idx
+
+# info stuff
+info: singular.hlp
+
+singular.hlp: ${MANUAL_FILES} singular.tex s-plural.tex s-plulibs.tex s-letterplace.tex
+	- ${MAKEINFO} --no-split singular.tex
+
+# dvi stuff
+dvi: manual.dvi usercard.dvi
+
+singular.dvi: ${MANUAL_FILES} singular.tex s-plural.tex s-plulibs.tex s-letterplace.tex
+	tex singular.tex
+	texindex singular.cp
+	tex singular.tex
+	texindex singular.cp
+	tex singular.tex
+
+singular.pdf: ${MANUAL_FILES} singular.tex s-plural.tex s-plulibs.tex s-letterplace.tex
+	${TEXI2PDF} singular.tex
+
+manual.dvi: ${MANUAL_FILES} manual.tex s-plural.tex s-plulibs.tex  s-letterplace.tex
+	tex manual.tex
+	texindex manual.cp
+	tex manual.tex
+	texindex manual.cp
+	tex manual.tex
+
+tutor.dvi: ${TUTOR_FILES}
+	tex tutor.tex
+	tex tutor.tex
+	tex tutor.tex
+
+tutor.pdf: ${TUTOR_FILES}
+	${TEXI2PDF} tutor.tex
+
+usercard.dvi: usercard.tex singcard.tex
+	${TEX} $<
+
+s-plural.tex: plural.tex
+	sed -e "s/BR_PLURAL_BR/(plural)/g" <plural.tex >s-plural.tex
+
+s-plulibs.tex: plulibs.tex
+	sed -e "s/BR_PLURAL_BR/(plural)/g" <plulibs.tex >s-plulibs.tex
+
+s-letterplace.tex: letterplace.tex
+	sed -e "s/BR_LETTERPLACE_BR/(letterplace)/g" <letterplace.tex >s-letterplace.tex
+
+# postscript stuff
+ps: dvi manual.ps usercard.ps
+
+usercard.ps: usercard.dvi
+	${DVIPS} -t landscape -t a4 $< -o $@
+
+%.ps: %.dvi
+	${DVIPS} $< -o $@
+
+###########################################################
+# texinfo targets
+#
+manual.tex:  ${MANUAL_FILES} doc2tex.pl ${SINGULAR} singular.doc $(STANDALONE_TEXI_FILES)
+	+${DOC2TEX_M} -no_fun -o manual.tex singular.doc
+
+singular.tex: ${MANUAL_FILES} doc2tex.pl ${LIB_TEX_FILES} ${SINGULAR} ${LIBPARSE} singular.doc $(STANDALONE_TEXI_FILES)
+	+${DOC2TEX} -o singular.tex singular.doc
+
+#pattern rule for tex files
+%_noEx.tex : %.doc doc2tex.pl ${SINGULAR}
+	+${DOC2TEX_M} -o $@ -no_ex $<
+
+%.tex: %.doc doc2tex.pl ${SINGULAR}
+	+${DOC2TEX} -o $@ $<
+
+# pattern rules for lib docus
+${DOC_SUBDIR}/%_lib.pl : ${SINGULAR_LIB_DIR}/%.lib ${LIBPARSE}
+	test -d ${DOC_SUBDIR} || mkdir ${DOC_SUBDIR}
+	${LIBPARSE} -i $< > $@
+
+%_noFun.doc : %.pl pl2doc.pl
+	${PL2DOC_M}  -no_fun -o $@  $<
+
+%.doc : %.pl pl2doc.pl
+	${PL2DOC} -o $@ $<
+
+# do not delete intermediate .pl and .doc files
+.PRECIOUS: %.doc %_noFun.doc ${DOC_SUBDIR}/%_lib.pl
+
+# index file for help
+singular.idx: singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx doc2idx.pl
+	${PERL} doc2idx.pl singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx ${CHKSUM_DB} > singular.idx
+
+###########################################################
+
+ifeq ($(SINGUNAME),@SINGUNAME@)
+UNAME_OPT = -D UNAME
+endif
+
+# targets which produce stand-alone documents
+%.${SINGUNAME}.txt : %.texi
+	${MAKEINFO} $(UNAME_OPT) --no-header --paragraph-indent none  -o $@ $<
+
+%.txt :  %.texi
+	${MAKEINFO} --no-header --paragraph-indent none -o $@ $<
+
+%.${SINGUNAME}.html : %.texi
+	${PERL} ${TEXI2HTML} $(UNAME_OPT) -init_file t2h_standalone.init -split none -out_file $@ $<
+
+%.html : %.texi
+	${PERL} ${TEXI2HTML} -init_file t2h_standalone.init -split none -out_file $@ $<
+
+% : %.txt
+	cp $< $@
+
+###########################################################
+# html targets
+#
+html: ${TMP_DIR} ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${IMAGES_HTML} $(STANDALONE_TEXI_FILES)
+${HTML_SUBDIR}/${HTML_MANUAL_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} singular.tex s-plural.tex s-letterplace.tex
+	${PERL} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_MANUAL_PREFIX} \
+        -top_file ${HTML_MANUAL_TOP} singular.tex
+
+# html stuff
+html_tutor: ${TMP_DIR} ${HTML_SUBDIR}/${HTML_TUTOR_TOP} ${IMAGES_HTML}
+${HTML_SUBDIR}/${HTML_TUTOR_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} tutor.tex
+	${PERL} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_TUTOR_PREFIX} \
+        -top_file ${HTML_TUTOR_TOP} tutor.tex
+
+${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx: ${HTML_SUBDIR}/${HTML_MANUAL_TOP}
+
+${TMP_DIR}:
+	${MKINSTALLDIRS} ${TMP_DIR}
+
+# pattern rules for images - but not everybody has gnu-uudecode
+images/%.gif : images/%.gif.uu
+	cd images; ${UUDECODE} ../$< ;cd ..
+
+images/%.jpg : images/%.jpg.uu
+	cd images; ${UUDECODE} ../$< ;cd ..
+
+images/%.xbm : images/%.xbm.uu
+	cd images; ${UUDECODE} ../$< ;cd ..
+
+${IMAGES_HTML} : ${IMAGES_SRC}
+	test -d ${HTML_SUBDIR} || mkdir ${HTML_SUBDIR}
+	cp ${IMAGES_SRC} ${HTML_SUBDIR}
+
+###########################################################
+# misc targets
+#
+texi2html = $(TEXI2HTML:%.pl=%)
+
+clean: mostlyclean
+	/bin/rm -rf singular.tex manual.tex ${DOC_SUBDIR} ${EX_SUBDIR}
+
+mostlyclean:
+	/bin/rm -f .singular_hist doe.tmp dump.ascii example.mp example.txt
+	/bin/rm -f save_i test.ascii test.mp
+	/bin/rm -f Z* *.tst *.pag *.dir *.lst *.log *.aux *.cp *.cps
+	/bin/rm -f *.fn *.fns *.ky *.kys *.log *.pg *.pgs *.toc *.tp
+	/bin/rm -f *.tps *.vr *.vrs *.dvi *.ps
+	/bin/rm -f s-plural.tex s-plulibs.tex s-letterplace.tex
+	/bin/rm -f singular.hlp manual.hlp  ${DOC2TEX_FILES} singular.idx
+	/bin/rm -f manual.hlp
+	/bin/rm -f ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${HTML_SUBDIR}/${HTML_TUTOR_TOP}
+	/bin/rm -rf ${STANDALONE_HTML_FILES} ${STANDALONE_FILES} ${STANDALONE_TXT_FILES}
+	/bin/rm -f INSTALL_unix.${SINGUNAME}.txt INSTALL_unix.${SINGUNAME}.html
+
+distclean: clean
+	/bin/rm -f Makefile
+	/bin/rm -rf ${HTML_SUBDIR} ../html ../examples
+
+maintainer-clean: distclean
+
+depend:
+	@echo "No make depend available!"
+
+${SINGULAR}:
+#	cd ..; ${MAKE} ${SINGULAR}
+
+html-done: ${MANUAL_FILES}
Index: doc/Makefile.am
===================================================================
--- doc/Makefile.am	(revision ac3150674e4f72a972310344c039e3479bb29f51)
+++ doc/Makefile.am	(revision ac3150674e4f72a972310344c039e3479bb29f51)
@@ -0,0 +1,166 @@
+dist_man1_MANS = Singular.man ESingular.man TSingular.man
+
+# Docbuild scripts
+EXTRA_DIST =					\
+	Makefile-docbuild.in version.texi.in	\
+	help.cnf
+
+# Text
+EXTRA_DIST +=					\
+	Building-Singular-from-source.md	\
+	C-STYLEGUIDE.md				\
+	C_CPP_StyleGuide.md			\
+	Development-model.md			\
+	How-To-Contribute.md			\
+	Porting-instructions.md			\
+	external-packages-dynamic-modules.md
+
+# .doc files
+EXTRA_DIST +=					\
+	cones.no.doc				\
+	cones.yes.doc				\
+	countedref.doc				\
+	decodegb.doc				\
+	examples.doc				\
+	general.doc				\
+	letterplace.doc				\
+	math.doc				\
+	pdata.doc				\
+	platform.doc				\
+	plulibs.doc				\
+	plural.doc				\
+	pyobject.no.doc				\
+	pyobject.yes.doc			\
+	reference.doc				\
+	sca.doc					\
+	singular.doc				\
+	start.doc				\
+	ti_ip.doc				\
+	tricks.doc				\
+	types.doc
+
+
+# Vendored copies
+EXTRA_DIST +=					\
+	texi2html				\
+	texinfo.tex
+
+# Other
+EXTRA_DIST += 					\
+	COPYING.texi				\
+	DEPENDENCIES				\
+	HOWTO-libsingular			\
+	HOWTO.ispell				\
+	Hans 2010-10-06.jpg			\
+	Includes.dot				\
+	Makefile-docbuild.in			\
+	Makefile.lib2doc			\
+	NEWS.texi				\
+	STYLEGUIDE				\
+	bad_lib0.lib				\
+	build_standards				\
+	changes_in_singular4.texi		\
+	dir_structure				\
+	doc2idx.pl				\
+	doc2tex.pl				\
+	elementsInTermsOfGeneratorsG25.sing	\
+	images/Mybg.gif.uu			\
+	images/a_begin.gif.uu			\
+	images/a_begin_na.gif.uu		\
+	images/a_document.gif.uu		\
+	images/a_document_na.gif.uu		\
+	images/a_empty.gif.uu			\
+	images/a_end.gif.uu			\
+	images/a_end_na.gif.uu			\
+	images/a_help.gif.uu			\
+	images/a_help_na.gif.uu			\
+	images/a_index.gif.uu			\
+	images/a_index_na.gif.uu		\
+	images/a_left.gif.uu			\
+	images/a_left_na.gif.uu			\
+	images/a_leftdouble.gif.uu		\
+	images/a_leftdouble_na.gif.uu		\
+	images/a_page.gif.uu			\
+	images/a_page_na.gif.uu			\
+	images/a_right.gif.uu			\
+	images/a_right_na.gif.uu		\
+	images/a_rightdouble.gif.uu		\
+	images/a_rightdouble_na.gif.uu		\
+	images/a_search.gif.uu			\
+	images/a_search_na.gif.uu		\
+	images/a_searchdoc.gif.uu		\
+	images/a_searchdoc_na.gif.uu		\
+	images/a_tableofcon.gif.uu		\
+	images/a_tableofcon_na.gif.uu		\
+	images/a_top.gif.uu			\
+	images/a_top_na.gif.uu			\
+	images/a_up.gif.uu			\
+	images/a_up_na.gif.uu			\
+	images/bg.jpg.uu			\
+	images/bg_left.gif.uu			\
+	images/bg_right.gif.uu			\
+	images/blue_dir.gif.uu			\
+	images/blue_down.gif.uu			\
+	images/blue_grab.gif.uu			\
+	images/blue_help.gif.uu			\
+	images/blue_next.gif.uu			\
+	images/blue_nnext.gif.uu		\
+	images/blue_pprev.gif.uu		\
+	images/blue_prev.gif.uu			\
+	images/blue_readme.gif.uu		\
+	images/blue_top.gif.uu			\
+	images/blue_up.gif.uu			\
+	images/blue_uup.gif.uu			\
+	images/contents_motif.gif.uu		\
+	images/index_motif.gif.uu		\
+	images/invisible.xbm.uu			\
+	images/letterplace.jpg.uu		\
+	images/next_motif.gif.uu		\
+	images/next_motif_gr.gif.uu		\
+	images/plural-2.jpg.uu			\
+	images/plural.jpg.uu			\
+	images/previous_motif.gif.uu		\
+	images/previous_motif_gr.gif.uu		\
+	images/sca.jpg.uu			\
+	images/singular-1.jpg.uu		\
+	images/singular-2.jpg.uu		\
+	images/singular-3.jpg.uu		\
+	images/singular-icon-transparent.gif.uu	\
+	images/singular-small.jpg.uu		\
+	images/singular.jpg.uu			\
+	images/spacer3.gif.uu			\
+	images/xy_contents.gif.uu		\
+	images/xy_foot.gif.uu			\
+	images/xy_next.gif.uu			\
+	images/xy_next_gr.gif.uu		\
+	images/xy_nextsection.gif.uu		\
+	images/xy_nextsection_gr.gif.uu		\
+	images/xy_previous.gif.uu		\
+	images/xy_previous_gr.gif.uu		\
+	images/xy_previoussection.gif.uu	\
+	images/xy_previoussection_gr.gif.uu	\
+	images/xy_up.gif.uu			\
+	images/xy_up_gr.gif.uu			\
+	latex2html.init				\
+	lib2doc.texi				\
+	manual-titlepage.tex			\
+	memory/OMALLOC.texi			\
+	orbits.gp				\
+	orbitsG25.gp				\
+	packages				\
+	pl2doc.pl				\
+	sample.lib				\
+	sample_lib0.lib				\
+	simple-make				\
+	simplexOrbitRepresentativesG25.sing	\
+	simplexSymmetryGroupG25.sing		\
+	singcard.tex				\
+	singular.dic				\
+	singular.dot				\
+	singular_toc.html			\
+	t2h_singular.init			\
+	t2h_standalone.init			\
+	tutor-titlepage.tex			\
+	tutor.tex				\
+	usercard.tex				\
+	version.texi.in
Index: c/Makefile.in
===================================================================
--- doc/Makefile.in	(revision caa791c53cad0234aa9bf3d99129f50457d7ff0c)
+++ 	(revision )
@@ -1,289 +1,0 @@
-####################################################################
-###
-### Makefile for Singular documentation
-#####################################################################
-SHELL=/bin/sh
-
-####################################################################
-##
-## Configuration
-##
-SINGUNAME       = spielwiese
-
-top_builddir    = @top_builddir@
-top_srcdir      = @top_srcdir@
-bindir	        = ${top_builddir}/Singular
-EXEEXT          = @EXEEXT@
-
-##
-## needed programs
-##
-MKINSTALLDIRS   = mkdir -p
-UUDECODE        = uudecode
-
-PERL            = perl
-TEX             = tex
-MAKEINFO        = @MAKEINFO@ --force
-TEXI2PDF        = @TEXI2PDF@
-TEXINDEX        = @TEXINDEX@
-# use our local texi2html
-TEXI2HTML       = ./texi2html
-DVIPS           = @DVIPS@
-
-VERBOSE         = 1 # override this with make VERBOSE=2
-
-# d2t stuff
-SINGULAR        = ${top_builddir}/Singular/Singular
-SINGULAR_LIB_DIR= ${top_srcdir}/Singular/LIB
-# from Singular/Makefile.am, extended by dynmodules stuff:
-TESTS_ENVIRONMENT = SINGULARPATH='${top_builddir}/Singular/LIB:${top_srcdir}/Singular/LIB:${top_builddir}/libpolys/polys/.libs:${top_builddir}/factory/gftables:'"$$(for d in ${top_builddir}/Singular/dyn_modules/*/.libs; do printf $$d:; done)" SINGULAR_ROOT_DIR='${top_builddir}' PATH="${top_builddir}/IntegerProgramming:$$PATH"
-LIBPARSE        = ${bindir}/libparse${EXEEXT}
-DOC_SUBDIR      = ./d2t_singular
-EX_SUBDIR       = ./examples
-CHKSUM_DB       = ${DOC_SUBDIR}/chksum
-# which tags to avoid:
-DOC2TEX_EXAMPLE_EXCLUSIONS = -exclude polymake -exclude bertini
-@ENABLE_PYOBJECT_MODULE_FALSE@ DOC2TEX_EXAMPLE_EXCLUSIONS += -exclude pyobject
-# which tags to avoid:
-TAG		= polymake
-DOC2TEX         = ${TESTS_ENVIRONMENT} ${PERL} ./doc2tex.pl -docdir ${DOC_SUBDIR} \
-                  -Singular ${SINGULAR} -verbose ${VERBOSE} -make ${MAKE} \
-		  -exdir ${EX_SUBDIR} ${DOC2TEX_EXAMPLE_EXCLUSIONS}
-
-DOC2TEX_M        = ${TESTS_ENVIRONMENT} ${PERL} ./doc2tex.pl -docdir ${DOC_SUBDIR} \
-                  -Singular ${SINGULAR} -verbose ${VERBOSE} -make ${MAKE} \
-		  -exdir ${EX_SUBDIR}
-
-PL2DOC		= ${PERL} ./pl2doc.pl ${TAG} -db ${CHKSUM_DB}
-PL2DOC_M	= ${PERL} ./pl2doc.pl -db ${CHKSUM_DB}
-
-# t2h stuff
-TMP_DIR		= tmp
-HTML_SUBDIR     = html
-TEXI2HTML_INIT  = t2h_singular.init
-ifeq ($(VERBOSE),0)
-T2H_VERBOSE	=
-else
-T2H_VERBOSE     = -Verbose
-endif
-TEXI2HTML_OPTS  = -init_file ${TEXI2HTML_INIT} -l2h \
-	          -short_ext -l2h_tmp ${TMP_DIR} -subdir ${HTML_SUBDIR} \
-                  ${T2H_VERBOSE}
-HTML_MANUAL_PREFIX = sing
-HTML_TUTOR_PREFIX  = tut
-HTML_MANUAL_TOP    = index.htm
-HTML_TUTOR_TOP     = tutor.htm
-##
-## End configuration dependend stuff
-#################################################################
-
-###########################################################
-# File sets
-#
-STANDALONE_TEXI_FILES	= COPYING.texi NEWS.texi  lib2doc.texi
-
-DOC2TEX_FILES	= cones.tex countedref.tex decodegb.tex \
-		examples.tex general.tex ti_ip.tex math.tex reference.tex \
-		start.tex types.tex pdata.tex tricks.tex platform.tex \
-		plural.tex letterplace.tex plulibs.tex sca.tex pyobject.tex
-
-MANUAL_FILES	= ${TEX_FILES} ${DOC2TEX_FILES}
-
-TUTOR_FILES	= \
-		tutor.tex examples.tex start.tex COPYING.texi
-
-IMAGES_UU	:= $(wildcard images/*.uu)
-IMAGES     := $(IMAGES_UU:images/%.uu=%)
-IMAGES_SRC := $(IMAGES:%=images/%)
-IMAGES_HTML := $(IMAGES:%=${HTML_SUBDIR}/%)
-
-# prepend bindir to path so that programs from there are taken first
-export PATH := "${bindir}:${PATH}"
-
-###########################################################
-# top targets
-#
-
-.PHONY: info dvi ps html
-
-# default target
-all: info dvi html singular.idx
-
-# info stuff
-info: singular.hlp
-
-singular.hlp: ${MANUAL_FILES} singular.tex s-plural.tex s-plulibs.tex s-letterplace.tex
-	- ${MAKEINFO} --no-split singular.tex
-
-# dvi stuff
-dvi: manual.dvi usercard.dvi
-
-singular.dvi: ${MANUAL_FILES} singular.tex s-plural.tex s-plulibs.tex s-letterplace.tex
-	tex singular.tex
-	texindex singular.cp
-	tex singular.tex
-	texindex singular.cp
-	tex singular.tex
-
-singular.pdf: ${MANUAL_FILES} singular.tex s-plural.tex s-plulibs.tex s-letterplace.tex
-	${TEXI2PDF} singular.tex
-
-manual.dvi: ${MANUAL_FILES} manual.tex s-plural.tex s-plulibs.tex  s-letterplace.tex
-	tex manual.tex
-	texindex manual.cp
-	tex manual.tex
-	texindex manual.cp
-	tex manual.tex
-
-tutor.dvi: ${TUTOR_FILES}
-	tex tutor.tex
-	tex tutor.tex
-	tex tutor.tex
-
-tutor.pdf: ${TUTOR_FILES}
-	${TEXI2PDF} tutor.tex
-
-usercard.dvi: usercard.tex singcard.tex
-	${TEX} $<
-
-s-plural.tex: plural.tex
-	sed -e "s/BR_PLURAL_BR/(plural)/g" <plural.tex >s-plural.tex
-
-s-plulibs.tex: plulibs.tex
-	sed -e "s/BR_PLURAL_BR/(plural)/g" <plulibs.tex >s-plulibs.tex
-
-s-letterplace.tex: letterplace.tex
-	sed -e "s/BR_LETTERPLACE_BR/(letterplace)/g" <letterplace.tex >s-letterplace.tex
-
-# postscript stuff
-ps: dvi manual.ps usercard.ps
-
-usercard.ps: usercard.dvi
-	${DVIPS} -t landscape -t a4 $< -o $@
-
-%.ps: %.dvi
-	${DVIPS} $< -o $@
-
-###########################################################
-# texinfo targets
-#
-manual.tex:  ${MANUAL_FILES} doc2tex.pl ${SINGULAR} singular.doc $(STANDALONE_TEXI_FILES)
-	+${DOC2TEX_M} -no_fun -o manual.tex singular.doc
-
-singular.tex: ${MANUAL_FILES} doc2tex.pl ${LIB_TEX_FILES} ${SINGULAR} ${LIBPARSE} singular.doc $(STANDALONE_TEXI_FILES)
-	+${DOC2TEX} -o singular.tex singular.doc
-
-#pattern rule for tex files
-%_noEx.tex : %.doc doc2tex.pl ${SINGULAR}
-	+${DOC2TEX_M} -o $@ -no_ex $<
-
-%.tex: %.doc doc2tex.pl ${SINGULAR}
-	+${DOC2TEX} -o $@ $<
-
-# pattern rules for lib docus
-${DOC_SUBDIR}/%_lib.pl : ${SINGULAR_LIB_DIR}/%.lib ${LIBPARSE}
-	test -d ${DOC_SUBDIR} || mkdir ${DOC_SUBDIR}
-	${LIBPARSE} -i $< > $@
-
-%_noFun.doc : %.pl pl2doc.pl
-	${PL2DOC_M}  -no_fun -o $@  $<
-
-%.doc : %.pl pl2doc.pl
-	${PL2DOC} -o $@ $<
-
-# do not delete intermediate .pl and .doc files
-.PRECIOUS: %.doc %_noFun.doc ${DOC_SUBDIR}/%_lib.pl
-
-# index file for help
-singular.idx: singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx doc2idx.pl
-	${PERL} doc2idx.pl singular.hlp ${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx ${CHKSUM_DB} > singular.idx
-
-###########################################################
-
-ifeq ($(SINGUNAME),@SINGUNAME@)
-UNAME_OPT = -D UNAME
-endif
-
-# targets which produce stand-alone documents
-%.${SINGUNAME}.txt : %.texi
-	${MAKEINFO} $(UNAME_OPT) --no-header --paragraph-indent none  -o $@ $<
-
-%.txt :  %.texi
-	${MAKEINFO} --no-header --paragraph-indent none -o $@ $<
-
-%.${SINGUNAME}.html : %.texi
-	${PERL} ${TEXI2HTML} $(UNAME_OPT) -init_file t2h_standalone.init -split none -out_file $@ $<
-
-%.html : %.texi
-	${PERL} ${TEXI2HTML} -init_file t2h_standalone.init -split none -out_file $@ $<
-
-% : %.txt
-	cp $< $@
-
-###########################################################
-# html targets
-#
-html: ${TMP_DIR} ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${IMAGES_HTML} $(STANDALONE_TEXI_FILES)
-${HTML_SUBDIR}/${HTML_MANUAL_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} singular.tex s-plural.tex s-letterplace.tex
-	${PERL} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_MANUAL_PREFIX} \
-        -top_file ${HTML_MANUAL_TOP} singular.tex
-
-# html stuff
-html_tutor: ${TMP_DIR} ${HTML_SUBDIR}/${HTML_TUTOR_TOP} ${IMAGES_HTML}
-${HTML_SUBDIR}/${HTML_TUTOR_TOP}: ${TEXI2HTML_INIT} ${TEXI2HTML} tutor.tex
-	${PERL} ${TEXI2HTML} ${TEXI2HTML_OPTS} -prefix ${HTML_TUTOR_PREFIX} \
-        -top_file ${HTML_TUTOR_TOP} tutor.tex
-
-${HTML_SUBDIR}/${HTML_MANUAL_PREFIX}_cp.idx: ${HTML_SUBDIR}/${HTML_MANUAL_TOP}
-
-${TMP_DIR}:
-	${MKINSTALLDIRS} ${TMP_DIR}
-
-# pattern rules for images - but not everybody has gnu-uudecode
-images/%.gif : images/%.gif.uu
-	cd images; ${UUDECODE} ../$< ;cd ..
-
-images/%.jpg : images/%.jpg.uu
-	cd images; ${UUDECODE} ../$< ;cd ..
-
-images/%.xbm : images/%.xbm.uu
-	cd images; ${UUDECODE} ../$< ;cd ..
-
-${IMAGES_HTML} : ${IMAGES_SRC}
-	test -d ${HTML_SUBDIR} || mkdir ${HTML_SUBDIR}
-	cp ${IMAGES_SRC} ${HTML_SUBDIR}
-
-###########################################################
-# misc targets
-#
-texi2html = $(TEXI2HTML:%.pl=%)
-
-clean: mostlyclean
-	/bin/rm -rf singular.tex manual.tex ${DOC_SUBDIR} ${EX_SUBDIR}
-
-mostlyclean:
-	/bin/rm -f .singular_hist doe.tmp dump.ascii example.mp example.txt
-	/bin/rm -f save_i test.ascii test.mp
-	/bin/rm -f Z* *.tst *.pag *.dir *.lst *.log *.aux *.cp *.cps
-	/bin/rm -f *.fn *.fns *.ky *.kys *.log *.pg *.pgs *.toc *.tp
-	/bin/rm -f *.tps *.vr *.vrs *.dvi *.ps
-	/bin/rm -f s-plural.tex s-plulibs.tex s-letterplace.tex
-	/bin/rm -f singular.hlp manual.hlp  ${DOC2TEX_FILES} singular.idx
-	/bin/rm -f manual.hlp
-	/bin/rm -f ${HTML_SUBDIR}/${HTML_MANUAL_TOP} ${HTML_SUBDIR}/${HTML_TUTOR_TOP}
-	/bin/rm -rf ${STANDALONE_HTML_FILES} ${STANDALONE_FILES} ${STANDALONE_TXT_FILES}
-	/bin/rm -f INSTALL_unix.${SINGUNAME}.txt INSTALL_unix.${SINGUNAME}.html
-
-distclean: clean
-	/bin/rm -f Makefile
-	/bin/rm -rf ${HTML_SUBDIR} ../html ../examples
-
-maintainer-clean: distclean
-
-depend:
-	@echo "No make depend available!"
-
-${SINGULAR}:
-#	cd ..; ${MAKE} ${SINGULAR}
-
-html-done: ${MANUAL_FILES}
