Move creating the Haiku repo info to jam
* PreprocessPackageInfo rule: Pull out new rule PreprocessPackageOrRepositoryInfo which does the sed substituation and optionally the filtering through the C preprocessor. * HaikuRepository rule: Generate the repository info file (from the given template). No longer do that in the build_haiku_repository script.
This commit is contained in:
@@ -677,12 +677,30 @@ actions BuildRemoteHaikuPortsRepository1
|
||||
}
|
||||
|
||||
|
||||
rule HaikuRepository repository : repoInfo : packages
|
||||
rule HaikuRepository repository : repoInfoTemplate : packages
|
||||
{
|
||||
# HaikuRepository <repository> : <repoInfoTemplate> : <packages> ;
|
||||
# Builds the Haiku repository from the given packages and repository info
|
||||
# template. <repository> must already be located.
|
||||
|
||||
local architecture = $(HAIKU_PACKAGING_ARCH) ;
|
||||
local secondaryArchitecture ;
|
||||
if $(TARGET_PACKAGING_ARCH) != $(architecture) {
|
||||
secondaryArchitecture = $(TARGET_PACKAGING_ARCH) ;
|
||||
}
|
||||
|
||||
local repositoriesDir = $(HAIKU_PACKAGE_REPOSITORIES_DIR_$(architecture)) ;
|
||||
|
||||
# build the repository info
|
||||
local repoInfo = $(repository:G=repository-info)-info ;
|
||||
MakeLocate $(repoInfo) : $(repositoriesDir) ;
|
||||
PreprocessPackageOrRepositoryInfo $(repoInfo) : $(repoInfoTemplate)
|
||||
: $(architecture) : $(secondaryArchitecture) ;
|
||||
|
||||
# prepare the script that initializes the shell variables
|
||||
local initVariablesScript = $(repository)-repository-init-vars ;
|
||||
MakeLocate $(initVariablesScript)
|
||||
: $(HAIKU_PACKAGE_REPOSITORIES_DIR_$(HAIKU_PACKAGING_ARCH)) ;
|
||||
: $(HAIKU_PACKAGE_REPOSITORIES_DIR_$(architecture)) ;
|
||||
Always $(initVariablesScript) ;
|
||||
|
||||
local script = $(initVariablesScript) ;
|
||||
|
||||
Reference in New Issue
Block a user