From df1a340774efc74f80ab4d99fb01da958d3f18e2 Mon Sep 17 00:00:00 2001
From: Russell Bryant <russell@russellbryant.com>
Date: Mon, 2 Jul 2007 22:27:46 +0000
Subject: [PATCH] * Move LaTeX docs into a tex/ subdirectory of the doc/ dir *
 Add a Makefile in doc/tex/ for generating PDF and HTML * Add a README.txt
 file to doc/tex/ to document which tools are used and what   web sites to
 visit for getting them. * Update build_tools/prep_tarball to put the proper
 Asterisk version string   in the automatically generated PDF for release
 tarballs

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 Makefile                                      | 18 ----------
 build_tools/prep_tarball                      |  4 ++-
 doc/tex/Makefile                              | 35 +++++++++++++++++++
 doc/tex/README.txt                            | 24 +++++++++++++
 doc/{ => tex}/ael.tex                         |  0
 doc/{ => tex}/ajam.tex                        |  0
 doc/{ => tex}/app-sms.tex                     |  0
 doc/{ => tex}/ast_agi_commands.tex            |  0
 doc/{ => tex}/ast_appdocs.tex                 |  0
 doc/{ => tex}/ast_cli_commands.tex            |  0
 doc/{ => tex}/ast_funcdocs.tex                |  0
 doc/{ => tex}/ast_manager_actiondocs.tex      |  0
 doc/{ => tex}/asterisk-conf.tex               |  0
 doc/{ => tex}/asterisk.tex                    |  4 +--
 doc/{ => tex}/billing.tex                     |  0
 doc/{ => tex}/cdrdriver.tex                   |  0
 doc/{ => tex}/chaniax.tex                     |  0
 doc/{ => tex}/channelvariables.tex            |  0
 doc/{ => tex}/cliprompt.tex                   |  0
 doc/{ => tex}/configuration.tex               |  0
 doc/{ => tex}/dundi.tex                       |  0
 doc/{ => tex}/enum.tex                        |  0
 doc/{ => tex}/extensions.tex                  |  0
 doc/{ => tex}/freetds.tex                     |  0
 doc/{ => tex}/hardware.tex                    |  0
 doc/{ => tex}/ices.tex                        |  0
 doc/{ => tex}/imapstorage.tex                 |  0
 doc/{ => tex}/jitterbuffer.tex                |  0
 doc/{ => tex}/localchannel.tex                |  0
 doc/{ => tex}/manager.tex                     |  0
 doc/{ => tex}/misdn.tex                       |  0
 doc/{ => tex}/mp3.tex                         |  0
 doc/{ => tex}/odbcstorage.tex                 |  0
 doc/{ => tex}/privacy.tex                     |  0
 doc/{ => tex}/qos.tex                         |  0
 doc/{ => tex}/queuelog.tex                    |  0
 .../queues-with-callback-members.tex          |  0
 doc/{ => tex}/realtime.tex                    |  0
 doc/{ => tex}/security.tex                    |  0
 doc/{ => tex}/sla.tex                         |  0
 40 files changed, 64 insertions(+), 21 deletions(-)
 create mode 100644 doc/tex/Makefile
 create mode 100644 doc/tex/README.txt
 rename doc/{ => tex}/ael.tex (100%)
 rename doc/{ => tex}/ajam.tex (100%)
 rename doc/{ => tex}/app-sms.tex (100%)
 rename doc/{ => tex}/ast_agi_commands.tex (100%)
 rename doc/{ => tex}/ast_appdocs.tex (100%)
 rename doc/{ => tex}/ast_cli_commands.tex (100%)
 rename doc/{ => tex}/ast_funcdocs.tex (100%)
 rename doc/{ => tex}/ast_manager_actiondocs.tex (100%)
 rename doc/{ => tex}/asterisk-conf.tex (100%)
 rename doc/{ => tex}/asterisk.tex (98%)
 rename doc/{ => tex}/billing.tex (100%)
 rename doc/{ => tex}/cdrdriver.tex (100%)
 rename doc/{ => tex}/chaniax.tex (100%)
 rename doc/{ => tex}/channelvariables.tex (100%)
 rename doc/{ => tex}/cliprompt.tex (100%)
 rename doc/{ => tex}/configuration.tex (100%)
 rename doc/{ => tex}/dundi.tex (100%)
 rename doc/{ => tex}/enum.tex (100%)
 rename doc/{ => tex}/extensions.tex (100%)
 rename doc/{ => tex}/freetds.tex (100%)
 rename doc/{ => tex}/hardware.tex (100%)
 rename doc/{ => tex}/ices.tex (100%)
 rename doc/{ => tex}/imapstorage.tex (100%)
 rename doc/{ => tex}/jitterbuffer.tex (100%)
 rename doc/{ => tex}/localchannel.tex (100%)
 rename doc/{ => tex}/manager.tex (100%)
 rename doc/{ => tex}/misdn.tex (100%)
 rename doc/{ => tex}/mp3.tex (100%)
 rename doc/{ => tex}/odbcstorage.tex (100%)
 rename doc/{ => tex}/privacy.tex (100%)
 rename doc/{ => tex}/qos.tex (100%)
 rename doc/{ => tex}/queuelog.tex (100%)
 rename doc/{ => tex}/queues-with-callback-members.tex (100%)
 rename doc/{ => tex}/realtime.tex (100%)
 rename doc/{ => tex}/security.tex (100%)
 rename doc/{ => tex}/sla.tex (100%)

diff --git a/Makefile b/Makefile
index fb540468c5..be1830f1dc 100644
--- a/Makefile
+++ b/Makefile
@@ -699,22 +699,4 @@ menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(di
 
 asterisk.pdf: doc/asterisk.pdf
 
-doc/asterisk.pdf: $(wildcard doc/*.tex)
-ifeq ($(findstring rubber,$(RUBBER)),)
-	@echo "**********************************************"
-	@echo "** You must install the \"rubber\" tool      ***"
-	@echo "** to generate the Asterisk reference PDF. ***"
-	@echo "**********************************************"
-else
-	@echo "**********************************************"
-	@echo "** The Asterisk reference PDF will now be  ***"
-	@echo "** generated.  When complete, it will be   ***"
-	@echo "** located at doc/asterisk.pdf.            ***"	
-	@echo "**********************************************"
-	@cp doc/asterisk.tex doc/asterisk.tex.orig
-	@sed -i -e 's/ASTERISKVERSION/$(ASTERISKVERSION)/' doc/asterisk.tex
-	@cd doc && $(RUBBER) --pdf asterisk.tex
-	@mv doc/asterisk.tex.orig doc/asterisk.tex
-endif
-
 .PHONY: menuselect main sounds clean dist-clean distclean all prereqs cleantest uninstall _uninstall uninstall-all dont-optimize $(SUBDIRS_INSTALL) $(SUBDIRS_CLEAN) $(SUBDIRS_UNINSTALL) $(SUBDIRS) $(MOD_SUBDIRS_EMBED_LDSCRIPT) $(MOD_SUBDIRS_EMBED_LDFLAGS) $(MOD_SUBDIRS_EMBED_LIBS) menuselect.makeopts
diff --git a/build_tools/prep_tarball b/build_tools/prep_tarball
index dbdbd46b2c..d8a55be3df 100755
--- a/build_tools/prep_tarball
+++ b/build_tools/prep_tarball
@@ -9,4 +9,6 @@ make -C sounds all MENUSELECT_CORE_SOUNDS=CORE-SOUNDS-EN-GSM MENUSELECT_MOH=MOH-
 
 make menuselect-tree
 
-cd doc && rubber --pdf asterisk.tex
+VERSION=`cat .version`
+sed -i -e "s/ASTERISKVERSION/${VERSION}/" doc/tex/asterisk.tex
+cd doc/tex && rubber --pdf asterisk.tex
diff --git a/doc/tex/Makefile b/doc/tex/Makefile
new file mode 100644
index 0000000000..2ccf892d33
--- /dev/null
+++ b/doc/tex/Makefile
@@ -0,0 +1,35 @@
+include ../../makeopts
+
+pdf: asterisk.pdf
+
+asterisk.pdf: $(wildcard *.tex)
+ifeq ($(findstring rubber,$(RUBBER)),)
+	@echo "**********************************************"
+	@echo "** You must install the \"rubber\" tool      ***"
+	@echo "** to generate the Asterisk reference PDF. ***"
+	@echo "**********************************************"
+else
+	@echo "**********************************************"
+	@echo "** The Asterisk reference PDF will now be  ***"
+	@echo "** generated.  When complete, it will be   ***"
+	@echo "** located at asterisk.pdf.                ***"	
+	@echo "**********************************************"
+	@cp asterisk.tex asterisk.tex.orig
+	@sed -i -e 's/ASTERISKVERSION/$(ASTERISKVERSION)/' asterisk.tex
+	@$(RUBBER) --pdf asterisk.tex
+	@mv asterisk.tex.orig asterisk.tex
+endif
+
+html:
+	@echo "**********************************************"
+	@echo "** The Asterisk reference HTML will now be ***"
+	@echo "** generated.  When complete, it will be   ***"
+	@echo "** located in the asterisk/ directory.     ***"	
+	@echo "** Note that the latex2html tool is        ***"	
+	@echo "** required for this to work.              ***"	
+	@echo "**********************************************"
+	@cp asterisk.tex asterisk.tex.orig
+	@sed -i -e 's/ASTERISKVERSION/$(ASTERISKVERSION)/' asterisk.tex
+	@latex2html asterisk.tex
+	@mv asterisk.tex.orig asterisk.tex
+
diff --git a/doc/tex/README.txt b/doc/tex/README.txt
new file mode 100644
index 0000000000..460d330a00
--- /dev/null
+++ b/doc/tex/README.txt
@@ -0,0 +1,24 @@
+Asterisk Reference Documentation
+--------------------------------
+
+1) To generate a PDF from this documentation, you will need the rubber tool,
+   and all of its dependencies.  The web site for this tool is:
+
+      http://www.pps.jussieu.fr/~beffara/soft/rubber/
+
+   Then, once this tool is installed, running "make pdf" will generate
+   the PDF automatically using this tool.  The result will be asterisk.pdf.
+
+   NOTE:  After installing rubber, you will need to re-run the top level
+   configure script.  It checks to see if rubber is installed, so that the
+   asterisk.pdf Makefile target can produce a useful error message when it is
+   not installed.
+
+2) To generate HTML from this documentation, you will need the latex2html tool,
+   and all of its dependencies.  The web site for this tool is:
+
+      http://www.latex2html.org/
+
+   Then, once this tool is installed, running "make html" will generate the
+   HTML documentation.  The result will be an asterisk directory full of
+   HTML files.
diff --git a/doc/ael.tex b/doc/tex/ael.tex
similarity index 100%
rename from doc/ael.tex
rename to doc/tex/ael.tex
diff --git a/doc/ajam.tex b/doc/tex/ajam.tex
similarity index 100%
rename from doc/ajam.tex
rename to doc/tex/ajam.tex
diff --git a/doc/app-sms.tex b/doc/tex/app-sms.tex
similarity index 100%
rename from doc/app-sms.tex
rename to doc/tex/app-sms.tex
diff --git a/doc/ast_agi_commands.tex b/doc/tex/ast_agi_commands.tex
similarity index 100%
rename from doc/ast_agi_commands.tex
rename to doc/tex/ast_agi_commands.tex
diff --git a/doc/ast_appdocs.tex b/doc/tex/ast_appdocs.tex
similarity index 100%
rename from doc/ast_appdocs.tex
rename to doc/tex/ast_appdocs.tex
diff --git a/doc/ast_cli_commands.tex b/doc/tex/ast_cli_commands.tex
similarity index 100%
rename from doc/ast_cli_commands.tex
rename to doc/tex/ast_cli_commands.tex
diff --git a/doc/ast_funcdocs.tex b/doc/tex/ast_funcdocs.tex
similarity index 100%
rename from doc/ast_funcdocs.tex
rename to doc/tex/ast_funcdocs.tex
diff --git a/doc/ast_manager_actiondocs.tex b/doc/tex/ast_manager_actiondocs.tex
similarity index 100%
rename from doc/ast_manager_actiondocs.tex
rename to doc/tex/ast_manager_actiondocs.tex
diff --git a/doc/asterisk-conf.tex b/doc/tex/asterisk-conf.tex
similarity index 100%
rename from doc/asterisk-conf.tex
rename to doc/tex/asterisk-conf.tex
diff --git a/doc/asterisk.tex b/doc/tex/asterisk.tex
similarity index 98%
rename from doc/asterisk.tex
rename to doc/tex/asterisk.tex
index 10ad7f0397..e6bbf3820d 100644
--- a/doc/asterisk.tex
+++ b/doc/tex/asterisk.tex
@@ -22,7 +22,7 @@ This document contains various pieces of information that are useful for
 reference purposes.
 
   \section{License Information}
-  \input{../LICENSE}
+  \input{../../LICENSE}
      \subsection{Hold Music}
        Digium has licensed the music included with
        the Asterisk distribution From FreePlayMusic
@@ -81,7 +81,7 @@ reference purposes.
   \section{Introduction}
   \input{dundi.tex}
   \section{Peering Agreement}
-  \input{PEERING}
+  \input{../PEERING}
 
 \chapter{ENUM}
 \input{enum.tex}
diff --git a/doc/billing.tex b/doc/tex/billing.tex
similarity index 100%
rename from doc/billing.tex
rename to doc/tex/billing.tex
diff --git a/doc/cdrdriver.tex b/doc/tex/cdrdriver.tex
similarity index 100%
rename from doc/cdrdriver.tex
rename to doc/tex/cdrdriver.tex
diff --git a/doc/chaniax.tex b/doc/tex/chaniax.tex
similarity index 100%
rename from doc/chaniax.tex
rename to doc/tex/chaniax.tex
diff --git a/doc/channelvariables.tex b/doc/tex/channelvariables.tex
similarity index 100%
rename from doc/channelvariables.tex
rename to doc/tex/channelvariables.tex
diff --git a/doc/cliprompt.tex b/doc/tex/cliprompt.tex
similarity index 100%
rename from doc/cliprompt.tex
rename to doc/tex/cliprompt.tex
diff --git a/doc/configuration.tex b/doc/tex/configuration.tex
similarity index 100%
rename from doc/configuration.tex
rename to doc/tex/configuration.tex
diff --git a/doc/dundi.tex b/doc/tex/dundi.tex
similarity index 100%
rename from doc/dundi.tex
rename to doc/tex/dundi.tex
diff --git a/doc/enum.tex b/doc/tex/enum.tex
similarity index 100%
rename from doc/enum.tex
rename to doc/tex/enum.tex
diff --git a/doc/extensions.tex b/doc/tex/extensions.tex
similarity index 100%
rename from doc/extensions.tex
rename to doc/tex/extensions.tex
diff --git a/doc/freetds.tex b/doc/tex/freetds.tex
similarity index 100%
rename from doc/freetds.tex
rename to doc/tex/freetds.tex
diff --git a/doc/hardware.tex b/doc/tex/hardware.tex
similarity index 100%
rename from doc/hardware.tex
rename to doc/tex/hardware.tex
diff --git a/doc/ices.tex b/doc/tex/ices.tex
similarity index 100%
rename from doc/ices.tex
rename to doc/tex/ices.tex
diff --git a/doc/imapstorage.tex b/doc/tex/imapstorage.tex
similarity index 100%
rename from doc/imapstorage.tex
rename to doc/tex/imapstorage.tex
diff --git a/doc/jitterbuffer.tex b/doc/tex/jitterbuffer.tex
similarity index 100%
rename from doc/jitterbuffer.tex
rename to doc/tex/jitterbuffer.tex
diff --git a/doc/localchannel.tex b/doc/tex/localchannel.tex
similarity index 100%
rename from doc/localchannel.tex
rename to doc/tex/localchannel.tex
diff --git a/doc/manager.tex b/doc/tex/manager.tex
similarity index 100%
rename from doc/manager.tex
rename to doc/tex/manager.tex
diff --git a/doc/misdn.tex b/doc/tex/misdn.tex
similarity index 100%
rename from doc/misdn.tex
rename to doc/tex/misdn.tex
diff --git a/doc/mp3.tex b/doc/tex/mp3.tex
similarity index 100%
rename from doc/mp3.tex
rename to doc/tex/mp3.tex
diff --git a/doc/odbcstorage.tex b/doc/tex/odbcstorage.tex
similarity index 100%
rename from doc/odbcstorage.tex
rename to doc/tex/odbcstorage.tex
diff --git a/doc/privacy.tex b/doc/tex/privacy.tex
similarity index 100%
rename from doc/privacy.tex
rename to doc/tex/privacy.tex
diff --git a/doc/qos.tex b/doc/tex/qos.tex
similarity index 100%
rename from doc/qos.tex
rename to doc/tex/qos.tex
diff --git a/doc/queuelog.tex b/doc/tex/queuelog.tex
similarity index 100%
rename from doc/queuelog.tex
rename to doc/tex/queuelog.tex
diff --git a/doc/queues-with-callback-members.tex b/doc/tex/queues-with-callback-members.tex
similarity index 100%
rename from doc/queues-with-callback-members.tex
rename to doc/tex/queues-with-callback-members.tex
diff --git a/doc/realtime.tex b/doc/tex/realtime.tex
similarity index 100%
rename from doc/realtime.tex
rename to doc/tex/realtime.tex
diff --git a/doc/security.tex b/doc/tex/security.tex
similarity index 100%
rename from doc/security.tex
rename to doc/tex/security.tex
diff --git a/doc/sla.tex b/doc/tex/sla.tex
similarity index 100%
rename from doc/sla.tex
rename to doc/tex/sla.tex
-- 
GitLab