Blame doc/external.doc

Packit 1c1d7e
/******************************************************************************
Packit 1c1d7e
 *
Packit 1c1d7e
 * 
Packit 1c1d7e
 *
Packit 1c1d7e
 * Copyright (C) 1997-2015 by Dimitri van Heesch.
Packit 1c1d7e
 *
Packit 1c1d7e
 * Permission to use, copy, modify, and distribute this software and its
Packit 1c1d7e
 * documentation under the terms of the GNU General Public License is hereby 
Packit 1c1d7e
 * granted. No representations are made about the suitability of this software 
Packit 1c1d7e
 * for any purpose. It is provided "as is" without express or implied warranty.
Packit 1c1d7e
 * See the GNU General Public License for more details.
Packit 1c1d7e
 *
Packit 1c1d7e
 * Documents produced by Doxygen are derivative works derived from the
Packit 1c1d7e
 * input used in their production; they are not affected by this license.
Packit 1c1d7e
 *
Packit 1c1d7e
 */
Packit 1c1d7e
/*! \page external Linking to external documentation
Packit 1c1d7e
Packit 1c1d7e
If your project depends on external libraries or tools, there are several 
Packit 1c1d7e
reasons to not include all sources for these with every run of doxygen:
Packit 1c1d7e
Packit 1c1d7e
Packit 1c1d7e
Disk space:
Some documentation may be available outside of the output
Packit 1c1d7e
    directory of doxygen already, for instance somewhere on the web. 
Packit 1c1d7e
    You may want to link to these pages instead of generating the documentation 
Packit 1c1d7e
    in your local output directory.
Packit 1c1d7e
Compilation speed:
External projects typically have a different update
Packit 1c1d7e
    frequency from your own project. It does not make much sense to let doxygen 
Packit 1c1d7e
    parse the sources for these external project over and over again, even if 
Packit 1c1d7e
    nothing has changed.
Packit 1c1d7e
Memory:
For very large source trees, letting doxygen parse all sources
Packit 1c1d7e
    may simply take too much of your system's memory. By dividing the sources 
Packit 1c1d7e
    into several "packages", the sources of one package can be parsed by 
Packit 1c1d7e
    doxygen, while all other packages that this package depends on, are 
Packit 1c1d7e
    linked in externally. This saves a lot of memory.
Packit 1c1d7e
Availability:
For some projects that are documented with doxygen,
Packit 1c1d7e
    the sources may just not be available.
Packit 1c1d7e
Copyright issues:
If the external
Packit 1c1d7e
    package and its documentation are copyright someone else, it may be
Packit 1c1d7e
    better - or even necessary - to reference it rather than include a
Packit 1c1d7e
    copy of it with your project's documentation.  When the author forbids
Packit 1c1d7e
    redistribution, this is necessary.  If the author requires compliance
Packit 1c1d7e
    with some license condition as a precondition of redistribution, and
Packit 1c1d7e
    you do not want to be bound by those conditions, referring to their
Packit 1c1d7e
    copy of their documentation is preferable to including a copy.
Packit 1c1d7e
Packit 1c1d7e
Packit 1c1d7e
Packit 1c1d7e
If any of the above apply, you can use doxygen's tag file mechanism.
Packit 1c1d7e
A tag file is basically a compact representation of the entities found in the
Packit 1c1d7e
external sources. Doxygen can both generate and read tag files.
Packit 1c1d7e
Packit 1c1d7e
To generate a tag file for your project, simply put the name of the
Packit 1c1d7e
tag file after the \ref cfg_generate_tagfile "GENERATE_TAGFILE" option in 
Packit 1c1d7e
the configuration file. 
Packit 1c1d7e
Packit 1c1d7e
To combine the output of one or more external projects with your own project 
Packit 1c1d7e
you should specify the name of the tag files after 
Packit 1c1d7e
the \ref cfg_tagfiles "TAGFILES" option in the configuration file.
Packit 1c1d7e
Packit 1c1d7e
A tag file typically only contains a relative location of the documentation from the
Packit 1c1d7e
point where doxygen was run. So when you include a tag file in other project 
Packit 1c1d7e
you have to specify where the external documentation is located in relation this project.
Packit 1c1d7e
You can do this in the configuration file by assigning the (relative) location to the
Packit 1c1d7e
tag files specified after the \ref cfg_tagfiles "TAGFILES" configuration
Packit 1c1d7e
option. If you use a relative path it should be relative with respect to 
Packit 1c1d7e
the directory where the HTML output of your project is generated; so a relative path
Packit 1c1d7e
from the HTML output directory of a project to the HTML output of the other project that 
Packit 1c1d7e
is linked to.
Packit 1c1d7e
Packit 1c1d7e
\par Example: 
Packit 1c1d7e
Suppose you have a project \c proj that uses two external 
Packit 1c1d7e
projects called \c ext1 and \c ext2.
Packit 1c1d7e
The directory structure looks as follows:
Packit 1c1d7e
Packit 1c1d7e
\par
Packit 1c1d7e
\verbatim
Packit 1c1d7e
<root>
Packit 1c1d7e
  +- proj
Packit 1c1d7e
  |   +- html               HTML output directory for proj
Packit 1c1d7e
  |   +- src                sources for proj
Packit 1c1d7e
  |   |- proj.cpp
Packit 1c1d7e
  +- ext1
Packit 1c1d7e
  |   +- html               HTML output directory for ext1
Packit 1c1d7e
  |   |- ext1.tag           tag file for ext1
Packit 1c1d7e
  +- ext2
Packit 1c1d7e
  |   +- html               HTML output directory for ext2
Packit 1c1d7e
  |   |- ext2.tag           tag file for ext2
Packit 1c1d7e
  |- proj.cfg               doxygen configuration file for proj
Packit 1c1d7e
  |- ext1.cfg               doxygen configuration file for ext1
Packit 1c1d7e
  |- ext2.cfg               doxygen configuration file for ext2
Packit 1c1d7e
\endverbatim
Packit 1c1d7e
Packit 1c1d7e
\par
Packit 1c1d7e
Then the relevant parts of the configuration files look as follows:
Packit 1c1d7e
\par
Packit 1c1d7e
proj.cfg:
Packit 1c1d7e
\verbatim
Packit 1c1d7e
OUTPUT_DIRECTORY  = proj
Packit 1c1d7e
INPUT             = proj/src
Packit 1c1d7e
TAGFILES          = ext1/ext1.tag=../../ext1/html \
Packit 1c1d7e
                    ext2/ext2.tag=../../ext2/html 
Packit 1c1d7e
\endverbatim 
Packit 1c1d7e
ext1.cfg:
Packit 1c1d7e
\verbatim
Packit 1c1d7e
OUTPUT_DIRECTORY  = ext1
Packit 1c1d7e
GENERATE_TAGFILE  = ext1/ext1.tag 
Packit 1c1d7e
\endverbatim 
Packit 1c1d7e
ext2.cfg:
Packit 1c1d7e
\verbatim
Packit 1c1d7e
OUTPUT_DIRECTORY  = ext2
Packit 1c1d7e
GENERATE_TAGFILE  = ext2/ext2.tag
Packit 1c1d7e
\endverbatim
Packit 1c1d7e
Packit 1c1d7e
\htmlonly
Packit 1c1d7e
Go to the next section or return to the
Packit 1c1d7e
 index.
Packit 1c1d7e
\endhtmlonly
Packit 1c1d7e
Packit 1c1d7e
*/