Extend installation guide + reorganize the toc
authorPeter Kovacs <kpeter@inf.elte.hu>
Tue, 28 Oct 2008 18:54:30 +0100
changeset 9a48bf0d3a790
parent 8 4b3d55acc9d7
child 10 55e2f7712e87
child 11 0a51fe554d01
Extend installation guide + reorganize the toc
getting_started.dox
install.dox
mainpage.dox
     1.1 --- a/getting_started.dox	Fri Oct 24 13:34:04 2008 +0100
     1.2 +++ b/getting_started.dox	Tue Oct 28 18:54:30 2008 +0100
     1.3 @@ -17,9 +17,7 @@
     1.4   */
     1.5  
     1.6  /**
     1.7 -\page getting_started Getting Started
     1.8 -
     1.9 -\section hello_lemon Compile Your First Code
    1.10 +\page hello_lemon Compile Your First Code
    1.11  
    1.12  If you have installed LEMON on your system you can paste the following
    1.13  code segment into a file called <tt>hello_lemon.cc</tt> to have a first
    1.14 @@ -30,7 +28,7 @@
    1.15  \until }
    1.16  
    1.17  First let us briefly explain how this example program works.
    1.18 -(The used notions will be discussed in detail in the following chapter.)
    1.19 +(The used notions will be discussed in detail in the following sections.)
    1.20  
    1.21  After some convenience typedefs we create a directed graph (\e digraph)
    1.22  and add some nodes and arcs to it.
    1.23 @@ -52,17 +50,17 @@
    1.24  an \c int value (length) to each arc, and we set this value for each arc.
    1.25  Finally we iterate through all arcs again and print their lengths.
    1.26  
    1.27 -Now let's compile this simple example program.
    1.28 +Now let us compile this simple example program.
    1.29  
    1.30 -\subsection hello_lemon_system If LEMON is Installed System-Wide
    1.31 +\section hello_lemon_system If LEMON is Installed System-Wide
    1.32  
    1.33 -If your installation of LEMON into directory \c /usr/local was
    1.34 -successful, then it is very easy to compile this program with the
    1.35 +If LEMON is installed system-wide (into directory \c /usr/local),
    1.36 +then it is very easy to compile this program with the
    1.37  following command (the argument <tt>-lemon</tt> tells the compiler
    1.38  that we are using the installed LEMON):
    1.39  
    1.40  \verbatim
    1.41 -g++ hello_lemon.cc -o hello_lemon -lemon
    1.42 +g++ -lemon hello_lemon.cc -o hello_lemon
    1.43  \endverbatim
    1.44  
    1.45  As a result you will get the exacutable \c hello_lemon in the current
    1.46 @@ -72,7 +70,7 @@
    1.47  ./hello_lemon
    1.48  \endverbatim
    1.49  
    1.50 -\subsection hello_lemon_user If LEMON is Installed User-Local
    1.51 +\section hello_lemon_user If LEMON is Installed User-Local
    1.52  
    1.53  Compiling the code is a bit more difficult if you installed LEMON
    1.54  user-local into a directory (e.g. <tt>~/lemon</tt>) or if you just
    1.55 @@ -80,13 +78,9 @@
    1.56  You have to issue a command like this.
    1.57  
    1.58  \verbatim
    1.59 -g++ -I ~/lemon hello_lemon.cc -o hello_lemon -lemon -L ~/lemon/lemon/.libs
    1.60 +g++ -lemon -I ~/lemon -L ~/lemon/lemon/.libs hello_lemon.cc -o hello_lemon
    1.61  \endverbatim
    1.62  
    1.63 -\subsubsection hello_lemon_pkg_config Use pkg-config
    1.64 -
    1.65 -\todo Write this sub-subsection (\ref hello_lemon_pkg_config).
    1.66 -
    1.67  If everything has gone well, then our program prints out the followings.
    1.68  
    1.69  \verbatim
     2.1 --- a/install.dox	Fri Oct 24 13:34:04 2008 +0100
     2.2 +++ b/install.dox	Tue Oct 28 18:54:30 2008 +0100
     2.3 @@ -19,9 +19,9 @@
     2.4  /**
     2.5  \page install Installation Guide
     2.6  
     2.7 -In this page we detail how to start using LEMON, from downloading it to
     2.8 -your computer, through the steps of installation, to showing a simple
     2.9 -"Hello World" type program that already uses LEMON. We assume that you
    2.10 +In this section we detail how to start using LEMON, from downloading it
    2.11 +to your computer, through the steps of installation, to showing how to
    2.12 +compile programs that use LEMON. We assume that you
    2.13  have a basic knowledge of your operating system and C++ programming
    2.14  language. The procedure is pretty straightforward, but if you have any
    2.15  difficulties do not hesitate to
    2.16 @@ -41,10 +41,10 @@
    2.17  
    2.18  In this description we will suppose a Linux environment and GNU C++ Compiler.
    2.19  If you would like to develop under Windows and use a Windows installer,
    2.20 -you could skip the following sections and continue reading \ref hello_lemon.
    2.21 +you could skip the following sections and continue reading
    2.22 +\ref basic_concepts.
    2.23  However keep in mind that you have to make appropriate steps instead of
    2.24 -the instructions detailed here to be able to compile the example code
    2.25 -with your compiler.
    2.26 +the instructions detailed here to be able to use LEMON with your compiler.
    2.27  
    2.28  \subsection requirements_lp LP Solver Requirements
    2.29  
    2.30 @@ -97,9 +97,6 @@
    2.31  ./configure --prefix=/home/username/lemon
    2.32  \endverbatim
    2.33  
    2.34 -In what follows we will assume that you were able to install to directory
    2.35 -\c /usr/local, otherwise some extra care is to be taken to use the library.
    2.36 -
    2.37  We briefly explain these commands below.
    2.38  
    2.39  \verbatim
    2.40 @@ -144,10 +141,10 @@
    2.41  Several other configure flags can be passed to <tt>./configure</tt>.
    2.42  For more information see the <b><tt>INSTALL</tt></b> file.
    2.43  
    2.44 -\subsection install_hg Install the latest development version
    2.45 +\subsection install_hg Install the Latest Development Version
    2.46  
    2.47  You can also use the latest (developer) version of LEMON from our Mercurial
    2.48 -repository. You need a couple additional tool for that
    2.49 +repository. You need a couple additional tool for that.
    2.50  
    2.51  - <a href="http://www.selenic.com/mercurial">Mercurial</a>
    2.52    - for obtaining the latest code (and for contributing into it)
    2.53 @@ -160,7 +157,7 @@
    2.54    - for generating the documentations (optional, but recommended)
    2.55  
    2.56  Once you have all these tools installed, the process is fairly easy.
    2.57 -First, you have to get the copy of the lates version.
    2.58 +First, you have to get the copy of the latest version.
    2.59  
    2.60  \verbatim
    2.61  hg clone http://lemon.cs.elte.hu/hg/lemon-main lemon-src
    2.62 @@ -181,9 +178,55 @@
    2.63  make install
    2.64  \endverbatim
    2.65  
    2.66 -To generate the documentation, just run 
    2.67 +To generate the documentation, just run
    2.68  \verbatim
    2.69  make html
    2.70  \endverbatim
    2.71 +\todo Is <tt><b>make html</b></tt> really necessary after
    2.72 +<tt><b>make install</b></tt>?
    2.73 +
    2.74 +
    2.75 +\section install_rpm Install from rpm
    2.76 +
    2.77 +\todo Write this section (\ref install_rpm).
    2.78 +
    2.79 +
    2.80 +\section install_user Install Locally to the User
    2.81 +
    2.82 +\todo Write this section (\ref install_user).
    2.83 +
    2.84 +
    2.85 +\section compile_codes Compile Codes that Use LEMON
    2.86 +
    2.87 +Now let us see how to use the library after installing it.
    2.88 +
    2.89 +\subsection compile_system_wide If LEMON is Installed System-Wide
    2.90 +
    2.91 +If your installation of LEMON into directory \c /usr/local was
    2.92 +successful, then you have to issue a command like this to compile a
    2.93 +source file that uses LEMON.
    2.94 +
    2.95 +\verbatim
    2.96 +g++ -lemon [other options] <source file>
    2.97 +\endverbatim
    2.98 +
    2.99 +The argument <tt>-lemon</tt> tells the compiler that we are using the
   2.100 +installed library LEMON.
   2.101 +
   2.102 +\subsection compile_user_local If LEMON is Installed User-Local
   2.103 +
   2.104 +You have to give more options to the compiler if LEMON is installed
   2.105 +user-local into a directory (denoted by <tt><dir></tt>)
   2.106 +or if you just skipped the step <tt>make install</tt>.
   2.107 +In the later case <tt><dir></tt> denotes the directory in which the
   2.108 +the \c make command have been performed.
   2.109 +
   2.110 +\verbatim
   2.111 +g++ -lemon -I <dir> -L <dir>/lemon/.libs [other options] <source file>
   2.112 +\endverbatim
   2.113 +
   2.114 +\subsubsection compile_use_pkg_config Use pkg-config
   2.115 +
   2.116 +\todo Write this sub-subsection (\ref compile_use_pkg_config).
   2.117  
   2.118  */
     3.1 --- a/mainpage.dox	Fri Oct 24 13:34:04 2008 +0100
     3.2 +++ b/mainpage.dox	Tue Oct 28 18:54:30 2008 +0100
     3.3 @@ -23,9 +23,8 @@
     3.4  \section toc Table of Contents
     3.5  
     3.6   - \ref intro
     3.7 - - \ref getting_started
     3.8 + - \ref basic_concepts "Basic Concepts"
     3.9     - \ref hello_lemon
    3.10 - - \ref basic_concepts "Basic Concepts"
    3.11     - \ref digraph_build "Build and Modify a Digraph"
    3.12     - \ref digraph_iterate "Iterate Over the Elements"
    3.13     - \ref standard_maps "Maps - Assign Data to Graphs"
    3.14 @@ -59,8 +58,12 @@
    3.15       - \ref requirements_lemon
    3.16         - \ref requirements_lp
    3.17       - \ref install_from_source
    3.18 -     - \ref install_system_rpm "From rpm"
    3.19 -     - \ref install_user "Install Locally to the User"
    3.20 +       - \ref install_hg
    3.21 +     - \ref install_rpm
    3.22 +     - \ref install_user
    3.23 +     - \ref compile_codes
    3.24 +       - \ref compile_system_wide
    3.25 +       - \ref compile_user_local
    3.26  
    3.27  */
    3.28  }