* Modified AddVariableToScript to support multi-element arrays.

* Added rule AddSourceDirectoryToHaikuImage to copy source directories
  onto the image. They will be placed in /boot/home/HaikuSource/...
  according to their relative path. This should make it a bit more
  comfortable to use gdb as a source level debugger. Alas, the
  directories have to be made known to gdb individually (with the
  "directory" command). I guess we should update to 6.6...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20415 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2007-03-24 23:34:28 +00:00
parent af9825c29c
commit 4477befef2
4 changed files with 58 additions and 6 deletions
+22 -6
View File
@@ -41,17 +41,26 @@ actions InitScript1
echo -n > $(1)
}
rule AddVariableToScript
rule AddVariableToScript script : variable : value
{
# AddVariableToScript <script> : <variable> : <value> ;
#
local script = $(1) ;
local variable = $(2) ;
local value = $(3) ;
# interpret an empty variable value as empty string
if ! $(value) {
value = "" ;
}
InitScript $(script) ;
VARIABLE_DEFS on $(script) += "echo $(variable)=\\\"$(value)\\\" >> " ;
VARIABLE_DEFS on $(script) += "echo $(variable)=\\\"$(value[1])\\\" >> " ;
# if the value is an array, add the other array elements
value = $(value[2-]) ;
while $(value) {
VARIABLE_DEFS on $(script)
+= "echo $(variable)+=\\\" $(value[1])\\\" >> " ;
value = $(value[2-]) ;
}
AddVariableToScript1 $(script) ;
}
@@ -155,6 +164,13 @@ rule AddSymlinkToHaikuImage
SYMLINKS_TO_INSTALL on $(directory) += $(link) ;
}
rule AddSourceDirectoryToHaikuImage dirTokens
{
# AddSourceDirectoryToHaikuImage <dirTokens> ;
HAIKU_INSTALL_SOURCE_DIRS += [ FDirName $(HAIKU_TOP) $(dirTokens) ] ;
}
rule AddDriversToHaikuImage
{
# AddDriversToHaikuImage <relative directory> : <targets> ;