AddDriversToContainer: Handle duplicate invocations

Since the same driver can be added in more than one category, in a few
cases AddDriversToContainer was invoked twice for the same target. Avoid
adding the driver twice to add-ons/kernel/drivers/bin in such a case.
Didn't really cause any problem, but no need to copy the file twice.
This commit is contained in:
Ingo Weinhold 2013-05-09 03:29:53 +02:00
parent 0c61965f2b
commit fa4511f61b

View File

@ -429,9 +429,23 @@ rule AddDriversToContainer container : relativeDirectoryTokens : targets
targets = [ FFilterByBuildFeatures $(targets) ] ;
# A driver can be in multiple categories. Avoid adding it to the bin/
# directory more than once.
local binTargets ;
local target ;
for target in $(targets) {
local containers
= [ on $(target) return $(HAIKU_DRIVER_IN_CONTAINERS) ] ;
if ! $(container) in $(containers) {
HAIKU_DRIVER_IN_CONTAINERS on $(target)
= $(containers) $(container) ;
binTargets += $(target) ;
}
}
AddFilesToContainer $(container)
: $(systemDirTokens) add-ons kernel drivers bin
: $(targets) ;
: $(binTargets) ;
# If the image shall only be updated, we don't add any symlinks.
if [ on $(container) return $(HAIKU_CONTAINER_UPDATE_ONLY) ]