* Added new rule AddHeaderDirectoryToHaikuImage that copies header
directories. Note that you need an updated "sed" (from the Haiku repository) if you want to use that rule. * The "Development" optional package now installs the Haiku headers needed to build stuff (ie. "os", "gnu", and "posix"). It also makes a symlink "be" so that we can still use the BeOS compiler with its builtin header paths. * Fixed AddVariableToScript for older shells that do not support '+='. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24058 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -501,6 +501,14 @@ if [ IsOptionalHaikuImagePackageAdded Development ]
|
||||
|
||||
# cc and c++ wrapper scripts
|
||||
AddFilesToHaikuImage beos bin : cc c++ ;
|
||||
|
||||
# headers
|
||||
AddHeaderDirectoryToHaikuImage gnu ;
|
||||
AddHeaderDirectoryToHaikuImage os ;
|
||||
AddHeaderDirectoryToHaikuImage posix ;
|
||||
|
||||
# make be -> os symlink for now
|
||||
AddSymlinkToHaikuImage develop headers : /boot/develop/headers/os : be ;
|
||||
}
|
||||
|
||||
# Vision
|
||||
@@ -596,6 +604,8 @@ AddTargetVariableToScript $(script) : <build>unzip ;
|
||||
AddTargetVariableToScript $(script) : <build>vmdkheader ;
|
||||
AddVariableToScript $(script) : sourceDirsToCopy
|
||||
: $(HAIKU_INSTALL_SOURCE_DIRS) ;
|
||||
AddVariableToScript $(script) : headerDirsToCopy
|
||||
: $(HAIKU_INSTALL_HEADER_DIRS) ;
|
||||
|
||||
# create the other scripts
|
||||
HAIKU_IMAGE_MAKE_DIRS_SCRIPT = <HaikuImage>haiku.image-make-dirs ;
|
||||
|
||||
+12
-1
@@ -58,7 +58,7 @@ rule AddVariableToScript script : variable : value
|
||||
value = $(value[2-]) ;
|
||||
while $(value) {
|
||||
VARIABLE_DEFS on $(script)
|
||||
+= "echo $(variable)+=\\\" $(value[1])\\\" >> " ;
|
||||
+= "echo $(variable)=\\\" \\\$$(variable) $(value[1])\\\" >> " ;
|
||||
value = $(value[2-]) ;
|
||||
}
|
||||
|
||||
@@ -546,6 +546,17 @@ rule AddSourceDirectoryToHaikuImage dirTokens : alwaysUpdate
|
||||
}
|
||||
}
|
||||
|
||||
rule AddHeaderDirectoryToHaikuImage dirTokens : alwaysUpdate
|
||||
{
|
||||
# AddHeaderDirectoryToHaikuImage <dirTokens> : <alwaysUpdate> ;
|
||||
|
||||
# If the image shall only be updated, we update sources only, if explicitely
|
||||
# requested.
|
||||
if ! [ IsUpdateHaikuImageOnly ] || $(alwaysUpdate) {
|
||||
HAIKU_INSTALL_HEADER_DIRS += [ FDirName $(HAIKU_TOP) headers $(dirTokens) ] ;
|
||||
}
|
||||
}
|
||||
|
||||
rule UnzipArchiveToHaikuImage dirTokens : zipFile : alwaysUpdate
|
||||
{
|
||||
# UnzipArchiveToHaikuImage <dirTokens> : <zipFile> : <alwaysUpdate> ;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
# imageSize
|
||||
# addBuildCompatibilityLibDir
|
||||
# sourceDirsToCopy
|
||||
# headerDirsToCopy
|
||||
# updateOnly
|
||||
# dontClearImage
|
||||
# isVMwareImage
|
||||
@@ -212,7 +213,7 @@ if [ $sourcePathPrefix = "." ]; then
|
||||
fi
|
||||
|
||||
for sourcesDir in ${sourceDirsToCopy}; do
|
||||
echo " sources dir: ${sourcesDir}"
|
||||
echo " sources dir: ${sourcesDir}"
|
||||
|
||||
# create all subdirectories
|
||||
subDirs=$(find ${sourcesDir} -type d | grep -v '.svn' |
|
||||
@@ -229,6 +230,43 @@ for sourcesDir in ${sourceDirsToCopy}; do
|
||||
done
|
||||
|
||||
|
||||
# install headers
|
||||
|
||||
headersDest=${tPrefix}develop
|
||||
|
||||
# create headers directory
|
||||
if [ -n "${headerDirsToCopy}" ]; then
|
||||
echo "Installing Haiku Headers ..."
|
||||
|
||||
$mkdir -p ${headersDest}
|
||||
fi
|
||||
|
||||
# See above (sourceDirs)
|
||||
sourcePathPrefix=$sourceDir
|
||||
destPathPrefix=$headersDest
|
||||
if [ $sourcePathPrefix = "." ]; then
|
||||
sourcePathPrefix=""
|
||||
destPathPrefix="${headersDest}/"
|
||||
fi
|
||||
|
||||
for headersDir in ${headerDirsToCopy}; do
|
||||
echo " header dir: ${headersDir}"
|
||||
|
||||
# create all subdirectories
|
||||
subDirs=$(find ${headersDir} -type d | grep -v '.svn' |
|
||||
sed -e "s@^${sourcePathPrefix}@${destPathPrefix}@")
|
||||
$mkdir -p ${subDirs}
|
||||
|
||||
# get all files and copy each one individually
|
||||
headerFiles=$(find $headersDir -type f | grep -v '.svn')
|
||||
for headerFile in $headerFiles; do
|
||||
destHeaderFile=$(echo $headerFile |
|
||||
sed -e "s@^${sourcePathPrefix}@${destPathPrefix}@")
|
||||
$cp ${sPrefix}$headerFile $destHeaderFile
|
||||
done
|
||||
done
|
||||
|
||||
|
||||
# unmount
|
||||
if [ $isImage ]; then
|
||||
echo "Unmounting ..."
|
||||
|
||||
Reference in New Issue
Block a user