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 [Sat, 17 Jan 2009 22:07:02 +0000 (23:07 +0100)]
Pass definition simplified by not using -local target
Instead, pass targets are declared as double-colon rules meaning that there
can be multiple definition of the pass target and all commands from these
definitions are concatenated and executed together.
The previous solution used dependencies as a way to specify multiple
commands to be executed. This leaded to higher memory consumption and
probably even to a problem with ordering of executed commands. Because
processing of both SUBDIRS and -local commands was implemented as
dependencies, in case of parallel make (-j) some commands in the current
directory could be executed before the commands from subdirectories. (Note
that this behavior was not observed. I only guess from manual that this
could happen.)
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 [Mon, 8 Dec 2008 23:49:32 +0000 (00:49 +0100)]
Started attempt to make a simple rules for testing new approach
These rules should only compile C programs. This simplification allows me
to throw most of the OMK complexity and test only what is the easiest way
to implement prepare/build approach.
Michal Sojka [Wed, 29 Oct 2008 17:18:43 +0000 (18:18 +0100)]
Removed binary-pass and converted to link-pseudo-pass - it doesn't work
The problem is that link target depends on library-pass and if there are any
compile errors, compilation stops and nothing is linked. The solution is to
convert OMK to non-recursive behavior, i.e. during include-pass (renamed to
prepare-pass) .omkvar and .cmd files would be created and then included to the
top-level make. The top-level make then correctly evaluates dependencies and
compiles everything.
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).