New handy build system feature: It is now possible to pass a command

line to jam that contains build targets and that will be executed by
the build system after building the targets and replacing their
occurrences in the command line by their paths. The keyword indicating
such a command line is "run", targets are marked by a leading ":".
E.g.:

  jam -q run ':<build>xres' -l :libtracker.so

This builds the xres tool for the host platform and libtracker.so for
Haiku, and afterwards lists the resources libtracker.so contains. Note,
that this feature requires using Haiku's jam version.

The functionality is implemented by the new RunCommandLine rule, which
can, of course, also be used in the UserBuildConfig.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20598 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2007-04-06 03:14:58 +00:00
parent f51c147043
commit 2c24a1a9f6
2 changed files with 73 additions and 6 deletions
+15 -6
View File
@@ -11,13 +11,22 @@
# directory paths and the like.
# If the target to be built is "all" (i.e. the default) and we're in the output
# directory, the root directory of the build system, or in "src/", we change the
# target to be built to "haiku-image".
# analyze an optionally replace jam's target parameters
HAIKU_ORIGINAL_JAM_TARGETS = $(JAM_TARGETS) ;
if $(JAM_TARGETS) = all {
if ! $(INVOCATION_SUBDIR) || $(INVOCATION_SUBDIR) = src {
JAM_TARGETS = haiku-image ;
if $(JAM_TARGETS) {
# If the target to be built is "all" (i.e. the default) and we're in the
# output directory, the root directory of the build system, or in "src/", we
# change the target to be built to "haiku-image".
if $(JAM_TARGETS) = all {
if ! $(INVOCATION_SUBDIR) || $(INVOCATION_SUBDIR) = src {
JAM_TARGETS = haiku-image ;
}
# The "run" target allows for running arbitrary command lines containing
# build system targets, which are built and replaced accordingly.
} else if $(JAM_TARGETS[1]) = run && $(JAM_TARGETS[2]) {
local run = [ RunCommandLine $(JAM_TARGETS[2-]) ] ;
JAM_TARGETS = $(run) ;
}
}