Michal Sojka [Mon, 29 Dec 2008 19:31:15 +0000 (20:31 +0100)]
omkbuild.py: Makefile.rules are constructed by replacing include directives in snippets
This allows for better structured rules and increases readability of
snippets. It is also possible to test rules without "compiling" them
by omkbuild.py as include directive is interpreted by make in the same way.
Michal Sojka [Tue, 17 Feb 2009 13:36:23 +0000 (14:36 +0100)]
QT: Added QT_PROJECT variable
This variable could be used as replacement for QT_SUBDIRS. Its purpose is
to specify QT .pro files in the current directory to compile. Therefore,
running make in a directory with QT application calls OMK, which in turn
calls qmake with correct parameters and compiles QT application under
_build tree.
Michal Sojka [Tue, 17 Feb 2009 12:50:15 +0000 (13:50 +0100)]
Updated QT rules
All temporary files are automatically put under _build and binaries under
_compiled. Also LDFLAGS are propagated to qmake-generated Makefile. Clean
target works correctly and no special target for distclean is needed as
everything is put under _build.
This behavior is problematic during development of QT application since it
cannot be compiled by running make in sources directory.
Michal Sojka [Wed, 29 Oct 2008 23:42:43 +0000 (00:42 +0100)]
Added LD_RUN_PATH when linking shared libraries
This LD_RUN_PATH "hack" is the only way how I was able to link a program, which
depends in a shared library, which depends on another shared library. The
$ORIGIN didn't work here. The problem with this solution is that the absolute
path is compiled in the library.
Michal Sojka [Wed, 29 Oct 2008 09:17:00 +0000 (09:17 +0000)]
Added experimental support for shared library dependencies
In fact, I'm not sure, whether dependency of shared libraries is the
real problem. Currently, the problem appears if a shared library depends
on a static library. Then this static library must be created before the
shared one.
This change adds a new link-pseudo-pass, which is called after
library-pass and before binary-pass. This "pseudo" pass doesn't traverse
directories recursively, but instead it processes *.omkvar files
prepared during library-pass. Since the shared libraries are linked
after the static ones, we have no problems with dependencies described
in the previous paragraph.
In future, we will extend this approach to linking of libraries,
binaries and maybe even kernel modules. This allows to save at least
binary-pass and the compilation will be faster.
Pavel Pisa [Tue, 14 Oct 2008 08:09:00 +0000 (08:09 +0000)]
Removed Linux variables which could not be obtained from kernelcfg2mk probe.
These variables are only local for Makefile.modpost.
The modpost option -I has been introduced for 2.6.17 kernel.
The test used enables it only for 2.6.25+ kernels.
Michal Sojka [Fri, 5 Sep 2008 16:24:00 +0000 (16:24 +0000)]
Fix for EXTRA_RULES_SUBDIRS
EXTRA_RULES_SUBDIRS was sometimes processed after other include
directories, which was bad, when the include-pass in the subdirectory
needed some tool compiled in EXTRA_RULES_SUBDIRS. Now, all
subdirectories have the extra subdir target as dependency, so it is
built always first.
Michal Sojka [Thu, 28 Aug 2008 07:13:00 +0000 (07:13 +0000)]
Fixed generation of sources-list
Formerly, the sources in the toplevel directory started with '/' by
mistake. Also there was some problematic place with
renamed_include_HEADERS. All this is now fixed.
Michal Sojka [Tue, 26 Aug 2008 13:21:00 +0000 (13:21 +0000)]
Added support for renamed_include_GEN_HEADERS
The support for include files was reworked. Now, all *_GEN_HEADERS and
renamed_*_GEN_HEADERS targets are supported automatically by
instantiation of include-pass-template macro.
Michal Sojka [Mon, 25 Aug 2008 09:32:00 +0000 (09:32 +0000)]
Added support for exporting IDL-genrated headers
For this to work, IDL compilation must be triggered before include-pass.
Therefore, we cannot optimize include pass by not defining
USER_RULE_TEMPLATES.
This solution is a little hack. Bigger reorganization of OMK rules is
needed for proper solution.
Michal Sojka [Wed, 25 Jun 2008 12:35:00 +0000 (12:35 +0000)]
Added EXTRA_RULES_SUBDIRS feature
By setting this variable in Makefile.omk, it is possible to compile some
part of the source tree using different rules. It is useful for
compilation of host tools which are needed to compile the rest of
project (e.g. IDL compilers).
Michal Sojka [Fri, 18 Apr 2008 15:47:00 +0000 (15:47 +0000)]
Fixed problem with parallel make (-j) caused by the previous change
If compilation was invoked as make -j, pass serialization didn't work.
In other words, it was possible that, for example, some library-pass
targets was made before all include-pass targets was finished. This
meant all include files were not available for compilation of libraries.
This behavior was caused the fact that recently introduced <pass>-XXX-subdir
targets was direct dependencies of <pass>. Since pass serialization is
done by putting one pass as dependency of another pass, this
serialization dependencies was on the "same level" as -subdir
dependencies and make -j executed them in parallel.
This was fixed by adding another target called <pass>-submakes which is
called recursively from <pass> target after all "serialization
dependencies" are processed. All -subdir targets are dependencies of
only -submakes target and hence are not intermixed with serialization
dependencies.
To avoid overhead caused by this additional recursive make invocation,
all recursive makes are invoked directly with the new -submakes target
as their goal. Hence, the original pass target is called only in the
top-level make.
This change can influence some "nonstandard" constructs used sometimes
in Makefile.omk that count upon invocation of the original pass in every
directory. This issue will be solved by upcoming patches.
Michal Sojka [Thu, 17 Apr 2008 06:25:00 +0000 (06:25 +0000)]
Fixed behaviour of make -k if there is an error in a subdirectory
The previous implementation of recursive invocation of make in
subdirectories didn't obey the -k flag. If there was an error in some
subdirectory, the other directories were not made.
This patch creates a separate targets for each subdirectory and pass and
add them as a dependencies to the main pass target. This way the
compilation errors are handled correctly with the -k flag.
Michal Sojka [Thu, 3 Apr 2008 10:54:00 +0000 (10:54 +0000)]
Added OMK_RULES_TYPE variable
This variable is automatically generated by the omkbuild.py on top of
the Makefile.rules. Its value is the name of rules target. It can be
used for example in config.target to distinguish between targets.
Pavel Pisa [Sun, 2 Mar 2008 00:06:00 +0000 (00:06 +0000)]
Return back "srcdir" variable. The VPATH cleanup has been too intrusive.
The "srcdir" variable notation is compatible with automake tools
and it is already used by some projects in Makefile.omk files.
Removal breaks build of ORTE library code for example.