]> rtime.felk.cvut.cz Git - omk.git/blobdiff - doc/omk-manual.texinfo
Some tests
[omk.git] / doc / omk-manual.texinfo
index c9c7bc768db6b7f45c519ccad7a1a85a76ac60a7..7c026a7c6cc779cb1835c1cd84df0c7f06952ddc 100644 (file)
@@ -8,7 +8,7 @@
 @copying
 Manual for Ocera Make System (OMK) version $Id$
 
-Copyright @copyright{} 2007, 2008 Michal Sojka, Pavel Píša
+Copyright @copyright{} 2007, 2008 Michal Sojka, Pavel Pisa
 @end copying
 
 @titlepage
@@ -405,7 +405,7 @@ In @file{Makefile.omk}, you specify several variables, which defines how
 the libraries should be compiled. In the example below the library
 @samp{mylib} (full filename will be @file{libmylib.a}) is created from
 two sources @file{funca.c} and @file{funcb.c}. Interface of this library
-is defined in @file{myfunc.h}. Therfore, we export this header for use
+is defined in @file{myfunc.h}. Therefore, we export this header for use
 by other programs.
 
 @example
@@ -416,7 +416,7 @@ by other programs.
 
 @defvar lib_LIBRARIES
   Specifies a list of statically linked libraries to be compiled. OMK
-  automaticvally prepends @code{lib} prefix library names.
+  automatically prepends @code{lib} prefix library names.
 @end defvar
 
 @defvar shared_LIBRARIES
@@ -509,6 +509,7 @@ classic Makefiles that provides all the needed features.
 You can instruct OMK to descend to a (sub)directory by setting the
 @code{SUBDIRS} variable in @file{Makefile.omk}.
 
+@anchor{SUBDIRS}
 @defvar SUBDIRS
   This variable contains a list of directories, in which compilation
   must be also invoked. Usually, names of subdirectories are used, but
@@ -516,9 +517,12 @@ You can instruct OMK to descend to a (sub)directory by setting the
 
   Compilation is invoked in these directories before it is invoked in
   the current directory.
+
+  See also @ref{AUTOMATIC_SUBDIRS}.
 @end defvar
 @c TODO: Write tests for this.
 
+@anchor{ALL_OMK_SUBDIRS}
 @defvar ALL_OMK_SUBDIRS
   This variable is set by OMK and can be used as the value of
   @code{SUBDIRS} variable. It contains a list of all direct
@@ -533,6 +537,13 @@ You can instruct OMK to descend to a (sub)directory by setting the
   @end example
 @end defvar
 
+@anchor{AUTOMATIC_SUBDIRS}
+@defvar AUTOMATIC_SUBDIRS
+  If this variable is set to @samp{y} and @code{SUBDIRS} is not assigned
+  in @file{Makefile.omk}, then @code{SUBDIRS} is assigned a default
+  value @code{$(ALL_OMK_SUBDIRS)}.
+@end defvar
+
 @node Dependency Tracking, Configuration and Conditional Compilation, Multiple Directories, OMK User's Manual
 @section Dependency Tracking
 
@@ -729,9 +740,10 @@ 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
-settings. Here is the list of variables, which are commonly set here
-(but they can also be set elsewhere, e.g. in @file{Makefile.omk}).
+It is common practice to use @file{config.target} or @file{config.omk}
+to store project-wide settings. Here is the list of variables, which are
+commonly set here (but they can also be set elsewhere, e.g. in
+@file{Makefile.omk}).
 
 You can easily ``reconfigure'' your project by changing the
 @file{config.omk} file. It is useful to have several configurations
@@ -899,7 +911,7 @@ in some particular @file{Makefile.rules}.
 @subsection Linux
 
 This @file{Makefile.rules} is used not only for Linux as the name
-sugest, but also for other Unices and even for Windows.
+suggests, but also for other Unices and even for Windows.
 
 @defvar BUILD_OS
   The name of the operating system (OS) where make was invoked.
@@ -923,7 +935,7 @@ sugest, but also for other Unices and even for Windows.
 @node System-Less, RTEMS, Linux, Properties of Specific Makefile.rules
 @subsection System-Less
 
-This @file{Makefile.rules} is deigned for compilation of code for
+This @file{Makefile.rules} is designed for compilation of code for
 (small) micro-controllers without operating systems. See
 @uref{http://rtime.felk.cvut.cz/hw/index.php/System-Less_Framework} for
 more information about our framework, which uses this rules.
@@ -1372,7 +1384,34 @@ list for all options if Kconfig is used.
 @node OMK Development, Variable Index, Original README, Top
 @chapter OMK Development
 
+This section is far from complete. Its purpose is to document internals
+of @file{Makefile.rules} as well as other things needed only by people
+who hack OMK itself.
+
+@section Passes
 
+A pass is created by instantiation of @code{omk_pass_template} with
+@var{pass-name} as one of arguments. This defines several targets which
+are described here:
+
+@table @code
+@item @var{pass-name}
+Target used to invoke the individual pass either from command line or
+from inside of @file{Makefile.rules}.
+
+@item @var{pass-name}-submakes
+Invoked recursively from @var{pass-name}. The reason for this is the
+fact that 
+
+@item @var{pass-name}-this-dir
+This target calls make recursively once again with @var{pass-name}-local
+target, which does the real-work. Make's working directory is set to the
+corresponding directory in @file{_build} tree and the -local
+
+@item @var{pass-name}-@var{dirname}-subdir
+This target is responsible for recursive invocation of @command{make} in
+subdirectories specified in @code{@ref{SUBDIRS}} variable.
+@end table
 
 @node Variable Index,  , OMK Development, Top
 @unnumbered Variable Index