PreprocessPackageInfo: define macro for secondary architecture

This commit is contained in:
Ingo Weinhold 2013-08-05 23:23:48 +02:00
parent e9a0ad7c4d
commit 779b940a74

View File

@ -30,6 +30,7 @@ rule HaikuPackage package
rule PreprocessPackageInfo source : directory : architecture rule PreprocessPackageInfo source : directory : architecture
: secondaryArchitecture
{ {
source = $(source:G=package-info-source) ; source = $(source:G=package-info-source) ;
SEARCH on $(source) += SEARCH on $(source) +=
@ -44,6 +45,9 @@ rule PreprocessPackageInfo source : directory : architecture
defines += HAIKU_BOOTSTRAP_BUILD ; defines += HAIKU_BOOTSTRAP_BUILD ;
target = $(target)-bootstrap ; target = $(target)-bootstrap ;
} }
if $(secondaryArchitecture) {
defines += HAIKU_SECONDARY_PACKAGING_ARCH=$(secondaryArchitecture) ;
}
MakeLocate $(target) : $(directory) ; MakeLocate $(target) : $(directory) ;
Depends $(target) : $(source) ; Depends $(target) : $(source) ;
@ -65,6 +69,11 @@ actions PreprocessPackageInfo1
rule BuildHaikuPackage package : packageInfo rule BuildHaikuPackage package : packageInfo
{ {
local architecture = $(HAIKU_PACKAGING_ARCH) ; local architecture = $(HAIKU_PACKAGING_ARCH) ;
local secondaryArchitecture ;
if $(TARGET_PACKAGING_ARCH) != $(architecture) {
secondaryArchitecture = $(TARGET_PACKAGING_ARCH) ;
}
local grist = [ FHaikuPackageGrist $(package) ] ; local grist = [ FHaikuPackageGrist $(package) ] ;
local tempDir local tempDir
@ -73,7 +82,7 @@ rule BuildHaikuPackage package : packageInfo
# build the package info and locate the package # build the package info and locate the package
packageInfo = [ PreprocessPackageInfo $(packageInfo) : $(tempDir) packageInfo = [ PreprocessPackageInfo $(packageInfo) : $(tempDir)
: $(architecture) ] ; : $(architecture) : $(secondaryArchitecture) ] ;
MakeLocate $(package) : $(HAIKU_PACKAGES_DIR_$(architecture)) ; MakeLocate $(package) : $(HAIKU_PACKAGES_DIR_$(architecture)) ;
Depends $(package) : $(packageInfo) ; Depends $(package) : $(packageInfo) ;