New build system feature to shorten the turn-around times when working
with image files. E.g. jam -q update-image libbe.so kernel_x86 will only build libbe.so and the kernel (if necessary) and copy them onto the already existing Haiku image. The MIME DB will not be reinstalled, and only those source directories will be copied for which the AddSourceDirectoryToHaikuImage rule is given a second argument (e.g. "1"). The image will otherwise remain unchanged. The "update-vmware-image" and "update-install" work similarly for the VMWare image and the directory installation respectively. Note that, due to the way the VMWare image is created (prepending a header to the standard image), the file itself is fully rebuilt, i.e. changes made during the emulation will be lost after updating the VMWare image. The feature requires Haiku's jam. With other jam versions a similar effect can be reached by accordingly setting the HAIKU_IMAGE_UPDATE_ONLY and HAIKU_INCLUDE_IN_IMAGE in the UserBuildConfig file. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20602 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+57
-15
@@ -95,10 +95,10 @@ actions AddTargetVariableToScript1
|
||||
}
|
||||
|
||||
|
||||
rule AddDirectoryToHaikuImage
|
||||
rule AddDirectoryToHaikuImage directoryTokens
|
||||
{
|
||||
# AddDirectoryToHaikuImage <directory>
|
||||
local directoryTokens = $(1) ;
|
||||
# AddDirectoryToHaikuImage <directoryTokens>
|
||||
|
||||
local directory = [ FDirName $(directoryTokens) ] ;
|
||||
directory = $(directory:G=HaikuImage) ;
|
||||
|
||||
@@ -120,6 +120,20 @@ rule AddDirectoryToHaikuImage
|
||||
return $(directory) ;
|
||||
}
|
||||
|
||||
rule FilterImageUpdateTargets targets
|
||||
{
|
||||
# FilterImageUpdateTargets targets
|
||||
|
||||
local filteredTargets ;
|
||||
local target ;
|
||||
for target in $(targets) {
|
||||
if [ on $(target) return $(HAIKU_INCLUDE_IN_IMAGE) ] {
|
||||
filteredTargets += $(target) ;
|
||||
}
|
||||
}
|
||||
return $(filteredTargets) ;
|
||||
}
|
||||
|
||||
rule AddFilesToHaikuImage
|
||||
{
|
||||
# AddFilesToHaikuImage <directory> : <targets> [ : dest name ]
|
||||
@@ -128,6 +142,12 @@ rule AddFilesToHaikuImage
|
||||
local targets = $(2) ;
|
||||
local destName = $(3) ;
|
||||
|
||||
# If the image shall only be updated, we filter out all targets not marked
|
||||
# accordingly.
|
||||
if $(HAIKU_IMAGE_UPDATE_ONLY) {
|
||||
targets = [ FilterImageUpdateTargets $(targets) ] ;
|
||||
}
|
||||
|
||||
# We create a unique dummy target per target to install.
|
||||
local target ;
|
||||
for target in $(targets) {
|
||||
@@ -146,13 +166,17 @@ rule AddFilesToHaikuImage
|
||||
}
|
||||
}
|
||||
|
||||
rule AddSymlinkToHaikuImage
|
||||
rule AddSymlinkToHaikuImage directoryTokens : linkTarget : linkName
|
||||
{
|
||||
# AddSymlinkToHaikuImage <directory> : <link target> [ : <link name> ] ;
|
||||
#
|
||||
local directory = [ AddDirectoryToHaikuImage $(1) ] ;
|
||||
local linkTarget = $(2) ;
|
||||
local linkName = $(3) ;
|
||||
|
||||
# If the image shall only be updated, we don't add any symlinks.
|
||||
if $(HAIKU_IMAGE_UPDATE_ONLY) {
|
||||
return ;
|
||||
}
|
||||
|
||||
local directory = [ AddDirectoryToHaikuImage $(directoryTokens) ] ;
|
||||
|
||||
if ! $(linkName) {
|
||||
local path = [ FReverse [ FSplitPath $(linkTarget) ] ] ;
|
||||
@@ -164,11 +188,15 @@ rule AddSymlinkToHaikuImage
|
||||
SYMLINKS_TO_INSTALL on $(directory) += $(link) ;
|
||||
}
|
||||
|
||||
rule AddSourceDirectoryToHaikuImage dirTokens
|
||||
rule AddSourceDirectoryToHaikuImage dirTokens : alwaysUpdate
|
||||
{
|
||||
# AddSourceDirectoryToHaikuImage <dirTokens> ;
|
||||
# AddSourceDirectoryToHaikuImage <dirTokens> : <alwaysUpdate> ;
|
||||
|
||||
HAIKU_INSTALL_SOURCE_DIRS += [ FDirName $(HAIKU_TOP) $(dirTokens) ] ;
|
||||
# If the image shall only be updated, we update sources only, if explicitely
|
||||
# requested.
|
||||
if ! $(HAIKU_IMAGE_UPDATE_ONLY) || $(alwaysUpdate) {
|
||||
HAIKU_INSTALL_SOURCE_DIRS += [ FDirName $(HAIKU_TOP) $(dirTokens) ] ;
|
||||
}
|
||||
}
|
||||
|
||||
rule AddDriversToHaikuImage
|
||||
@@ -182,6 +210,11 @@ rule AddDriversToHaikuImage
|
||||
|
||||
AddFilesToHaikuImage beos system add-ons kernel drivers bin : $(targets) ;
|
||||
|
||||
# If the image shall only be updated, we don't add any symlinks.
|
||||
if $(HAIKU_IMAGE_UPDATE_ONLY) {
|
||||
return ;
|
||||
}
|
||||
|
||||
# get the relative symlink path prefix
|
||||
local linkPrefix = ;
|
||||
for i in $(relativeDirectoryTokens) {
|
||||
@@ -204,7 +237,8 @@ rule AddDriverRegistrationToHaikuImage
|
||||
local relativeDirectoryTokens = $(1) ;
|
||||
local target = $(2) ;
|
||||
local links = $(3) ;
|
||||
local directoryTokens = beos system add-ons kernel registration $(relativeDirectoryTokens) ;
|
||||
local directoryTokens = beos system add-ons kernel registration
|
||||
$(relativeDirectoryTokens) ;
|
||||
|
||||
# get the relative symlink path prefix
|
||||
local linkPrefix = ;
|
||||
@@ -214,14 +248,19 @@ rule AddDriverRegistrationToHaikuImage
|
||||
linkPrefix += .. drivers bin ;
|
||||
|
||||
# add the symlink
|
||||
AddSymlinkToHaikuImage $(directoryTokens) : [ FDirName $(linkPrefix) $(target:BS) ] : $(links) ;
|
||||
AddSymlinkToHaikuImage $(directoryTokens)
|
||||
: [ FDirName $(linkPrefix) $(target:BS) ] : $(links) ;
|
||||
}
|
||||
|
||||
rule AddBootModuleSymlinks
|
||||
rule AddBootModuleSymlinks targets
|
||||
{
|
||||
# AddBootModuleSymlinks <targets> ;
|
||||
#
|
||||
local targets = $(1) ;
|
||||
|
||||
# If the image shall only be updated, we don't add any symlinks.
|
||||
if $(HAIKU_IMAGE_UPDATE_ONLY) {
|
||||
return ;
|
||||
}
|
||||
|
||||
# add the symlinks
|
||||
local target ;
|
||||
@@ -267,7 +306,10 @@ rule CreateHaikuImageMakeDirectoriesScript
|
||||
}
|
||||
|
||||
Depends $(scriptBody) : $(dirsToCreate) ;
|
||||
CreateHaikuImageMakeDirectoriesScript1 $(scriptBody) : $(dirsToCreate) ;
|
||||
# If the image shall only be updated, we don't create directories.
|
||||
if $(dirsToCreate) && ! $(HAIKU_IMAGE_UPDATE_ONLY) {
|
||||
CreateHaikuImageMakeDirectoriesScript1 $(scriptBody) : $(dirsToCreate) ;
|
||||
}
|
||||
}
|
||||
|
||||
actions piecemeal CreateHaikuImageMakeDirectoriesScript1
|
||||
|
||||
Reference in New Issue
Block a user