A target can now be installed more than once on the image.
Fixes bug #696. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17956 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
223ff76477
commit
3d3a473670
@ -119,11 +119,21 @@ rule AddFilesToHaikuImage
|
|||||||
local targets = $(2) ;
|
local targets = $(2) ;
|
||||||
local destName = $(3) ;
|
local destName = $(3) ;
|
||||||
|
|
||||||
INSTALL_DIR on $(targets) = $(directory) ;
|
# We create a unique dummy target per target to install.
|
||||||
TARGETS_TO_INSTALL on $(directory) += $(targets) ;
|
local target ;
|
||||||
|
for target in $(targets) {
|
||||||
|
local name ;
|
||||||
|
if $(destName) {
|
||||||
|
name = $(destName) ;
|
||||||
|
} else {
|
||||||
|
name = $(target:BS) ;
|
||||||
|
}
|
||||||
|
|
||||||
if $(destName) {
|
local destTarget = $(name:G=HaikuImage__$(directory:G=)) ;
|
||||||
INSTALL_TARGET_NAME on $(targets) = $(destName) ;
|
TARGET on $(destTarget) = $(target) ;
|
||||||
|
INSTALL_DIR on $(destTarget) = $(directory) ;
|
||||||
|
INSTALL_TARGETS on $(target) += $(destTarget) ;
|
||||||
|
TARGETS_TO_INSTALL on $(directory) += $(destTarget) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,7 +190,9 @@ rule AddBootModuleSymlinks
|
|||||||
# add the symlinks
|
# add the symlinks
|
||||||
local target ;
|
local target ;
|
||||||
for target in $(targets) {
|
for target in $(targets) {
|
||||||
local installDir = [ on $(target) return $(INSTALL_DIR) ] ;
|
# Symlink to the first place where the target has been installed.
|
||||||
|
local destTarget = [ on $(target) return $(INSTALL_TARGETS[1]) ] ;
|
||||||
|
local installDir = [ on $(destTarget) return $(INSTALL_DIR) ] ;
|
||||||
|
|
||||||
if ! $(installDir) {
|
if ! $(installDir) {
|
||||||
Echo "ERROR: AddBootModuleSymlinks: Can't create a symlink to"
|
Echo "ERROR: AddBootModuleSymlinks: Can't create a symlink to"
|
||||||
@ -243,21 +255,21 @@ rule CreateHaikuImageCopyFilesScript
|
|||||||
|
|
||||||
local dir ;
|
local dir ;
|
||||||
for dir in [ on haiku-image-contents return $(INSTALL_DIRECTORIES) ] {
|
for dir in [ on haiku-image-contents return $(INSTALL_DIRECTORIES) ] {
|
||||||
local targets = [ on $(dir) return $(TARGETS_TO_INSTALL) ] ;
|
|
||||||
|
|
||||||
# filter the targets that shall be renamed; they have to be copied
|
# filter the targets that shall be renamed; they have to be copied
|
||||||
# individually
|
# individually
|
||||||
|
local destTargets = [ on $(dir) return $(TARGETS_TO_INSTALL) ] ;
|
||||||
local remainingTargets ;
|
local remainingTargets ;
|
||||||
local target ;
|
local destTarget ;
|
||||||
for target in $(targets) {
|
for destTarget in $(destTargets) {
|
||||||
local destName = [ on $(target) return $(INSTALL_TARGET_NAME) ] ;
|
local target = [ on $(destTarget) return $(TARGET) ] ;
|
||||||
if $(destName) {
|
local name = $(destTarget:BS) ;
|
||||||
|
if $(name) != $(target:BS) {
|
||||||
# use a unique dummy target for this file, on which we
|
# use a unique dummy target for this file, on which we
|
||||||
# can define the TARGET_DIR variable
|
# can define the TARGET_DIR variable
|
||||||
local dummyTarget = $(script)-dummy-$(dir:G=)-$(target) ;
|
local dummyTarget = $(script)-dummy-$(dir:G=)-$(target) ;
|
||||||
NotFile $(dummyTarget) ;
|
NotFile $(dummyTarget) ;
|
||||||
TARGET_DIR on $(dummyTarget) = $(dir:G=) ;
|
TARGET_DIR on $(dummyTarget) = $(dir:G=) ;
|
||||||
INSTALL_TARGET_NAME on $(dummyTarget) = $(destName) ;
|
INSTALL_TARGET_NAME on $(dummyTarget) = $(name) ;
|
||||||
|
|
||||||
Depends $(dummyTarget) : $(initScript) $(target) ;
|
Depends $(dummyTarget) : $(initScript) $(target) ;
|
||||||
Depends $(script) : $(dummyTarget) ;
|
Depends $(script) : $(dummyTarget) ;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user