From ad00c58ffe7d6b51b91b62971d84df009746555a Mon Sep 17 00:00:00 2001
From: Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
Date: Sun, 9 Jan 2011 18:28:00 +0000
Subject: [PATCH]   * ./stratus:     - Change: In doc, activate installation of
 stratus, dpgen & pattern documentation.

---
 stratus1/CMakeLists.txt                     |  8 +++
 stratus1/doc/CMakeLists.txt                 |  4 ++
 stratus1/doc/dpgen/CMakeLists.txt           | 61 +++++++++++++++++++++
 stratus1/doc/dpgen/{ASIM.css => SoC.css}    |  0
 stratus1/doc/patterns/CMakeLists.txt        | 23 ++++++++
 stratus1/doc/patterns/{ASIM.css => SoC.css} |  0
 stratus1/doc/stratus/.latex2html-init       |  2 +-
 stratus1/doc/stratus/CMakeLists.txt         | 61 +++++++++++++++++++++
 stratus1/doc/stratus/{ASIM.css => SoC.css}  |  0
 stratus1/doc/stratus/man_example.tex        | 12 ++--
 stratus1/doc/stratus/man_library.tex        |  6 +-
 stratus1/doc/stratus/man_resize_ab.tex      |  2 +-
 stratus1/doc/stratus/stratus.tex            |  3 +-
 stratus1/src/stratus/st_model.py            |  3 +-
 14 files changed, 172 insertions(+), 13 deletions(-)
 create mode 100644 stratus1/doc/CMakeLists.txt
 create mode 100644 stratus1/doc/dpgen/CMakeLists.txt
 rename stratus1/doc/dpgen/{ASIM.css => SoC.css} (100%)
 create mode 100644 stratus1/doc/patterns/CMakeLists.txt
 rename stratus1/doc/patterns/{ASIM.css => SoC.css} (100%)
 create mode 100644 stratus1/doc/stratus/CMakeLists.txt
 rename stratus1/doc/stratus/{ASIM.css => SoC.css} (100%)

diff --git a/stratus1/CMakeLists.txt b/stratus1/CMakeLists.txt
index 395a22b0..5ae34d19 100644
--- a/stratus1/CMakeLists.txt
+++ b/stratus1/CMakeLists.txt
@@ -1,6 +1,8 @@
 
  project(STRATUS1)
  
+ option(BUILD_DOC "Build the documentation (latex2html)" OFF)
+
  cmake_minimum_required(VERSION 2.4.0)
  list(INSERT CMAKE_MODULE_PATH 0 "$ENV{BOOTSTRAP_TOP}/share/cmake/Modules/")
  find_package(Bootstrap REQUIRED)
@@ -17,6 +19,12 @@
  find_package(VLSISAPD REQUIRED)
  find_package(HURRICANE REQUIRED)
  find_package(CORIOLIS REQUIRED)
+ if(BUILD_DOC)
+   include(UseLATEX)
+ endif(BUILD_DOC)
  
  add_subdirectory(src)
  add_subdirectory(etc)
+ if(BUILD_DOC)
+   add_subdirectory(doc)
+ endif(BUILD_DOC)
diff --git a/stratus1/doc/CMakeLists.txt b/stratus1/doc/CMakeLists.txt
new file mode 100644
index 00000000..4a180a6d
--- /dev/null
+++ b/stratus1/doc/CMakeLists.txt
@@ -0,0 +1,4 @@
+
+ add_subdirectory(stratus)
+ add_subdirectory(dpgen)
+ add_subdirectory(patterns)
diff --git a/stratus1/doc/dpgen/CMakeLists.txt b/stratus1/doc/dpgen/CMakeLists.txt
new file mode 100644
index 00000000..50282817
--- /dev/null
+++ b/stratus1/doc/dpgen/CMakeLists.txt
@@ -0,0 +1,61 @@
+
+                   set ( LATEX2HTML_CONVERTER_FLAGS "-html_version" "4.0,latin1,unicode"
+                                                    "-style" "SoC.css"
+                                                    "-init_file" "${CMAKE_CURRENT_SOURCE_DIR}/.latex2html-init"
+                                                    CACHE STRING "Custom arguments passeds to latex2html" FORCE )
+
+    add_latex_document ( dpgen.tex INPUTS man_dpgenadsb2f.tex
+                                          man_dpgenand2.tex
+                                          man_dpgenand3.tex
+                                          man_dpgenand4.tex
+                                          man_dpgenbuff.tex
+                                          man_dpgenbuse.tex
+                                          man_dpgenconst.tex
+                                          man_dpgendff.tex
+                                          man_dpgendfft.tex
+                                          man_dpgenfifo.tex
+                                          man_dpgeninv.tex
+                                          man_dpgenmux2.tex
+                                          man_dpgennand2mask.tex
+                                          man_dpgennand2.tex
+                                          man_dpgennand3.tex
+                                          man_dpgennand4.tex
+                                          man_dpgennbuse.tex
+                                          man_dpgennmux2.tex
+                                          man_dpgennor2mask.tex
+                                          man_dpgennor2.tex
+                                          man_dpgennor3.tex
+                                          man_dpgennor4.tex
+                                          man_dpgennul.tex
+                                          man_dpgenor2.tex
+                                          man_dpgenor3.tex
+                                          man_dpgenor4.tex
+                                          man_dpgenram.tex
+                                          man_dpgenrf1d.tex
+                                          man_dpgenrf1.tex
+                                          man_dpgenrom2.tex
+                                          man_dpgenrom4.tex
+                                          man_dpgensff.tex
+                                          man_dpgensfft.tex
+                                          man_dpgenshift.tex
+                                          man_dpgenshrot.tex
+                                          man_dpgenxnor2mask.tex
+                                          man_dpgenxnor2.tex
+                                          man_dpgenxor2.tex
+                                 )
+
+                   set ( htmlInstallDir  share/doc/coriolis2/en/html/ )
+                   set ( latexInstallDir share/doc/coriolis2/en/latex/dpgen )
+
+ latex_get_output_path ( output_dir )
+
+
+                 #file ( COPY "${CMAKE_CURRENT_SOURCE_DIR}/SoC.css" DESTINATION "${output_dir}/README" )
+        make_directory ( "${output_dir}/dpgen" )
+       execute_process ( COMMAND cp -r "${CMAKE_CURRENT_SOURCE_DIR}/SoC.css" "${output_dir}/dpgen" )
+
+               install ( FILES ${output_dir}/dpgen.tex
+                               ${output_dir}/dpgen.dvi
+                               ${output_dir}/dpgen.pdf
+                               DESTINATION ${latexInstallDir} )
+               install ( DIRECTORY ${output_dir}/dpgen DESTINATION ${htmlInstallDir} )
diff --git a/stratus1/doc/dpgen/ASIM.css b/stratus1/doc/dpgen/SoC.css
similarity index 100%
rename from stratus1/doc/dpgen/ASIM.css
rename to stratus1/doc/dpgen/SoC.css
diff --git a/stratus1/doc/patterns/CMakeLists.txt b/stratus1/doc/patterns/CMakeLists.txt
new file mode 100644
index 00000000..4e240c9f
--- /dev/null
+++ b/stratus1/doc/patterns/CMakeLists.txt
@@ -0,0 +1,23 @@
+
+                   set ( LATEX2HTML_CONVERTER_FLAGS "-html_version" "4.0,latin1,unicode"
+                                                    "-style" "SoC.css"
+                                                    "-init_file" "${CMAKE_CURRENT_SOURCE_DIR}/.latex2html-init"
+                                                    CACHE STRING "Custom arguments passeds to latex2html" FORCE )
+
+    add_latex_document ( patterns.tex )
+
+                   set ( htmlInstallDir  share/doc/coriolis2/en/html/ )
+                   set ( latexInstallDir share/doc/coriolis2/en/latex/patterns )
+
+ latex_get_output_path ( output_dir )
+
+
+                 #file ( COPY "${CMAKE_CURRENT_SOURCE_DIR}/SoC.css" DESTINATION "${output_dir}/README" )
+        make_directory ( "${output_dir}/patterns" )
+       execute_process ( COMMAND cp -r "${CMAKE_CURRENT_SOURCE_DIR}/SoC.css" "${output_dir}/patterns" )
+
+               install ( FILES ${output_dir}/patterns.tex
+                               ${output_dir}/patterns.dvi
+                               ${output_dir}/patterns.pdf
+                               DESTINATION ${latexInstallDir} )
+               install ( DIRECTORY ${output_dir}/patterns DESTINATION ${htmlInstallDir} )
diff --git a/stratus1/doc/patterns/ASIM.css b/stratus1/doc/patterns/SoC.css
similarity index 100%
rename from stratus1/doc/patterns/ASIM.css
rename to stratus1/doc/patterns/SoC.css
diff --git a/stratus1/doc/stratus/.latex2html-init b/stratus1/doc/stratus/.latex2html-init
index df1398eb..5608495e 100644
--- a/stratus1/doc/stratus/.latex2html-init
+++ b/stratus1/doc/stratus/.latex2html-init
@@ -291,7 +291,7 @@ sub bot_navigation_panel {
 }
 
 
-#$EXTERNAL_STYLESHEET = "../ASIM.css";
+#$EXTERNAL_STYLESHEET = "../SoC.css";
 
 $ADDRESS = "Sophie <small>BELLOEIL</small><br>20051116.1";
 
diff --git a/stratus1/doc/stratus/CMakeLists.txt b/stratus1/doc/stratus/CMakeLists.txt
new file mode 100644
index 00000000..e5c68f61
--- /dev/null
+++ b/stratus1/doc/stratus/CMakeLists.txt
@@ -0,0 +1,61 @@
+
+                   set ( LATEX2HTML_CONVERTER_FLAGS "-html_version" "4.0,latin1,unicode"
+                                                    "-style" "SoC.css"
+                                                    "-init_file" "${CMAKE_CURRENT_SOURCE_DIR}/.latex2html-init"
+                                                    CACHE STRING "Custom arguments passeds to latex2html" FORCE )
+
+    add_latex_document ( stratus.tex INPUTS man_alim_connectors.tex
+                                            man_alim_rail.tex
+                                            man_arithmetic.tex
+                                            man_boolean.tex
+                                            man_buff.tex
+                                            man_comp.tex
+                                            man_const.tex
+                                            man_copy_up_segment.tex
+                                            man_def_ab.tex
+                                            man_example.tex
+                                            man_fill_cell.tex
+                                            man_generate.tex
+                                            man_get_ref.tex
+                                            man_inst.tex
+                                            man_library.tex
+                                            man_mux.tex
+                                            man_net.tex
+                                            man_new.tex
+                                            man_pads.tex
+                                            man_place_bottom.tex
+                                            man_place_centric.tex
+                                            man_place_contact.tex
+                                            man_place_glu.tex
+                                            man_place_left.tex
+                                            man_place_pin.tex
+                                            man_place_ref.tex
+                                            man_place_right.tex
+                                            man_place_segment.tex
+                                            man_place.tex
+                                            man_place_top.tex
+                                            man_power_ring.tex
+                                            man_reg.tex
+                                            man_resize_ab.tex
+                                            man_route_ck.tex
+                                            man_set_ref_ins.tex
+                                            man_shift.tex
+                                            man_stratus.tex
+                                            see_also.tex
+                                 IMAGE_DIRS images )
+
+                   set ( htmlInstallDir  share/doc/coriolis2/en/html/ )
+                   set ( latexInstallDir share/doc/coriolis2/en/latex/stratus )
+
+ latex_get_output_path ( output_dir )
+
+
+                 #file ( COPY "${CMAKE_CURRENT_SOURCE_DIR}/SoC.css" DESTINATION "${output_dir}/README" )
+        make_directory ( "${output_dir}/stratus" )
+       execute_process ( COMMAND cp -r "${CMAKE_CURRENT_SOURCE_DIR}/SoC.css" "${output_dir}/stratus" )
+
+               install ( FILES ${output_dir}/stratus.tex
+                               ${output_dir}/stratus.dvi
+                               ${output_dir}/stratus.pdf
+                               DESTINATION ${latexInstallDir} )
+               install ( DIRECTORY ${output_dir}/stratus DESTINATION ${htmlInstallDir} )
diff --git a/stratus1/doc/stratus/ASIM.css b/stratus1/doc/stratus/SoC.css
similarity index 100%
rename from stratus1/doc/stratus/ASIM.css
rename to stratus1/doc/stratus/SoC.css
diff --git a/stratus1/doc/stratus/man_example.tex b/stratus1/doc/stratus/man_example.tex
index 867ff5dd..ee4aa2d7 100644
--- a/stratus1/doc/stratus/man_example.tex
+++ b/stratus1/doc/stratus/man_example.tex
@@ -2,7 +2,7 @@
 
 \begin{figure}[h!]
 \centering
-\includegraphics[width=.9\textwidth]{./images/add1.png}
+\includegraphics[width=.9\textwidth]{./images/add1}
 \end{figure}
   
 \newpage
@@ -10,7 +10,7 @@
 
 \begin{figure}[h!]
 \centering
-\includegraphics[width=.9\textwidth]{./images/add2.png}
+\includegraphics[width=.9\textwidth]{./images/add2}
 \end{figure}
 
 \newpage
@@ -18,12 +18,12 @@
 
 \begin{figure}[h!]
 \centering
-\includegraphics[width=1.4\textwidth]{./images/addaccu1.png}
+\includegraphics[width=1.4\textwidth]{./images/addaccu1}
 \end{figure}
 
 \begin{figure}[h!]
 \centering
-\includegraphics[width=1.4\textwidth]{./images/addaccu2.png}
+\includegraphics[width=1.4\textwidth]{./images/addaccu2}
 \end{figure}
 
 \newpage
@@ -31,7 +31,7 @@
 
 \begin{figure}[h!]
 \centering
-\includegraphics[width=1.4\textwidth]{./images/test.png}
+\includegraphics[width=1.4\textwidth]{./images/test}
 \end{figure}
 
 \subsubsection{How to execute the file}
@@ -50,7 +50,7 @@ chmod u+x test.py
 The method \verb-View- permits to open an editor in which one can see the cell being created as shown in the picture below.
 \begin{figure}[h!]
 \centering
-\includegraphics[width=.8\textwidth]{./images/editor.png}
+\includegraphics[width=.8\textwidth]{./images/editor}
 \end{figure}
 
 \newpage
diff --git a/stratus1/doc/stratus/man_library.tex b/stratus1/doc/stratus/man_library.tex
index 66e78355..7ce9f864 100644
--- a/stratus1/doc/stratus/man_library.tex
+++ b/stratus1/doc/stratus/man_library.tex
@@ -42,9 +42,9 @@ The virtual library is mapped to the sxlib library. A piece of the corresponding
 
 \indent The environment variable used to point the right file is \verb-STRATUS_MAPPING_NAME-.
 
-\begin{figure}[h!]
-%\centering
-\includegraphics[width=1\textwidth]{images/xml.png}
+\begin{figure}[hbtp]
+\centering
+\includegraphics[width=\textwidth]{images/xml}
 \end{figure}
 
 \subsubsection{Generators}
diff --git a/stratus1/doc/stratus/man_resize_ab.tex b/stratus1/doc/stratus/man_resize_ab.tex
index 8eb71021..d0c39ed7 100644
--- a/stratus1/doc/stratus/man_resize_ab.tex
+++ b/stratus1/doc/stratus/man_resize_ab.tex
@@ -25,7 +25,7 @@ This function modifies the abutment box of the current cell.\\
 \indent The Values are used as follow :
 \begin{figure}[h!]
 \centering
-\includegraphics[width=.3\textwidth]{./images/resizeAb.png}
+\includegraphics[width=.3\textwidth]{./images/resizeAb}
 \end{figure}
       
 \subsubsection{Example}
diff --git a/stratus1/doc/stratus/stratus.tex b/stratus1/doc/stratus/stratus.tex
index 44fef7ce..78aa1614 100644
--- a/stratus1/doc/stratus/stratus.tex
+++ b/stratus1/doc/stratus/stratus.tex
@@ -8,7 +8,8 @@
 \usepackage{wrapfig}
 \usepackage[dvips]{graphics}
 \usepackage{graphicx}
-\usepackage{epsfig}
+%\usepackage{epsfig}
+\usepackage[dvips]{hyperref}
 \usepackage{multicol}
 \usepackage{url}
 \usepackage{html}
diff --git a/stratus1/src/stratus/st_model.py b/stratus1/src/stratus/st_model.py
index 47cc71df..f3723f7b 100644
--- a/stratus1/src/stratus/st_model.py
+++ b/stratus1/src/stratus/st_model.py
@@ -501,7 +501,8 @@ class Model :
       
     if not name : name = self._name
 
-    if tool == 'asimut' : runpat ( self._name, name, '-l 1 -p 100 -zerodelay -nocheckdriver -nostrict -bdd -nowarning' )
+   # Removed unknown asimut options: -nocheckdriver -nostrict -nowarning
+    if tool == 'asimut' : runpat ( self._name, name, '-l 1 -p 100 -zerodelay -bdd' )
     else                : raise Exception ( 'not implemented yet' )
 
   ##### Create a stratus file given the database #####