]> rtime.felk.cvut.cz Git - omk.git/blobdiff - doc/omk-manual.texinfo
Added some menus to texinfo documentation
[omk.git] / doc / omk-manual.texinfo
index db8e9e85b3673bfadde054f425f2c4b6b0afa0bf..f55389d8af1c96e0efe287a8f284f71bd79e1449 100644 (file)
@@ -195,7 +195,8 @@ it. This search is performed only once at the beginning of compilation.
 
 @c TODO: Pavel's note about qmake.
 
-The compilation process itself is comprised of several passes. Every
+@anchor{passes}
+The compilation process itself is comprised of several @emph{passes}. Every
 pass traverses the whole directory structure@footnote{In future, we are
 planning some optimization that allows OMK to traverse the directories
 only once and thus decrease compilation time.} and does a particular
@@ -592,6 +593,13 @@ parameters either locally for your build in @file{config.omk} or
 globally for all people working with the project in
 @file{config.target}.
 
+@menu
+* Specifying Configuration Parameters::  
+* Using Configuration Parameters::  
+* Common Variables::            
+@end menu
+
+@node Specifying Configuration Parameters, Using Configuration Parameters, Configuration and Conditional Compilation, Configuration and Conditional Compilation
 @subsection Specifying Configuration Parameters
 
 To specify names and default values of configuration parameters use the
@@ -644,6 +652,7 @@ To specify names and default values of configuration parameters use the
 @verbatiminclude ../tests/config/default/config.omk-correct
 @end example
 
+@node Using Configuration Parameters, Common Variables, Specifying Configuration Parameters, Configuration and Conditional Compilation
 @subsection Using Configuration Parameters
 
 Configuration parameters can be used in two ways:
@@ -711,6 +720,7 @@ parameters defined in the current @file{Makefile.omk}. It is also
 possible to include configuration parameters defined in a different
 directory.
 
+@node Common Variables,  , Using Configuration Parameters, Configuration and Conditional Compilation
 @subsection Common Variables
 
 It is common practice to use @file{config.omk} to store project-wide
@@ -740,6 +750,14 @@ to the desired configuration.
 In this section we list several OMK features, which are more complicated
 or rarely used so they were omitted in previous sections.
 
+@menu
+* Unsorted Advanced Features::  
+* Adding Hooks to Passes::      
+@end menu
+
+@node  Unsorted Advanced Features, Adding Hooks to Passes, Advanced OMK Features, Advanced OMK Features
+@subsection Unsorted Advanced Features
+
 @itemize
 @item
   The @file{_compiled} directory can be shared between multiple projects
@@ -815,6 +833,44 @@ path to the directory containing @file{Makefile.rules} currently used
 during compilation.
 @end defvar
 
+@defvar{OMK_RULES_TYPE}
+Identification the type of @file{Makefile.rules} used for
+compilation. Values are like @samp{linux}, @samp{rtems}, @samp{sysless},
+... This variable is automatically generated during creation of
+@file{Makefile.rules} and can be used in configuration files (see
+@ref{Configuration and Conditional Compilation}) or in
+@file{Makefile.omk} to tweak compilation for specific targets.
+@end defvar
+
+@node Adding Hooks to Passes,  , Unsorted Advanced Features, Advanced OMK Features
+@subsection Adding Hooks to Passes
+
+Sometimes it is necessary to run some special commands as a part of
+compilation. Typical example might be a tool which generates source
+files on the fly. OMK supports calling additional commands during
+compilation by so called @emph{pass hooks}. A pass hook is an ordinary
+make target which is invoked as part of compilation during a particular
+pass (see @ref{passes}). Pass hooks can be defined by assigning their
+names to @code{xxx_HOOKS} variable.
+
+@defvar{xxx_HOOKS}
+Specifies one or more hooks (make targets) which are invoked during pass
+@var{xxx}. The working directory of commands or this target is under the
+@file{_build} tree.
+
+In the example bellow header file @file{generated_header.h} is created
+during @samp{include-pass} by @file{convert_data} program. The program
+takes @file{data_file.txt} in the source directory as the input and
+creates the header file in the in the correct directory under the
+@file{_build} tree.
+
+@example
+include-pass_HOOKS = generated_header.h
+
+generated_header.h: $(SOURCES_DIR)/data_file.txt
+            convert_data < $^ > $@@
+@end example
+@end defvar
 
 @node Properties of Specific Makefile.rules, Running OMK under Windows OS, Advanced OMK Features, OMK User's Manual
 @section Properties of Specific Makefile.rules
@@ -844,6 +900,14 @@ sugest, but also for other Unices and even for Windows.
   used. If not specified manually, it equals to BUILD_OS. 
 @end defvar
 
+@defvar QT_SUBDIRS
+  Lists subdirectories with QT project (.pro) file. OMK will generate
+  there @file{Makefile} by calling @command{qmake} with correct
+  parameters to interface QT application to the rest of the compilation
+  tree.  Then @command{make} is called there to compile QT
+  application. Variable @samp{QTDIR} must be set to the directory with
+  QT instalation (e.g. /usr/share/qt4 on Debian).
+@end defvar
 
 
 @node System-Less, RTEMS, Linux, Properties of Specific Makefile.rules
@@ -859,6 +923,13 @@ sugest, but also for other Unices and even for Windows.
 @node Interfacing OMK to popular IDEs, Troubleshooting, Running OMK under Windows OS, OMK User's Manual
 @section Interfacing OMK to popular IDEs
 
+@menu
+* KDevelop::                    
+* Eclipse/CDT::                 
+* Emacs/Vim/etc.::              
+@end menu
+
+@node KDevelop, Eclipse/CDT, Interfacing OMK to popular IDEs, Interfacing OMK to popular IDEs
 @subsection KDevelop
 
 KDevelop has support for custom build systems. To use KDevelop to
@@ -912,9 +983,10 @@ much.
 @end example
 @end enumerate
 
-
-@subsection Eclipse
-
+@node Eclipse/CDT, Emacs/Vim/etc., KDevelop, Interfacing OMK to popular IDEs
+@subsection Eclipse/CDT
+TODO
+@node Emacs/Vim/etc.,  , Eclipse/CDT, Interfacing OMK to popular IDEs
 @subsection Emacs, VIM, etc.
 
 Since OMK compilation is started by executing @command{make} command,