Encode the hrev revision into the package versions
This commit is contained in:
parent
04d9b3e89c
commit
97d30f2cfb
@ -11,6 +11,11 @@
|
||||
# directory paths and the like.
|
||||
|
||||
|
||||
# The Haiku (base) version. For development builds the revision will be
|
||||
# attached.
|
||||
HAIKU_VERSION = r1~alpha4_pm ;
|
||||
|
||||
|
||||
#pragma mark - container settings
|
||||
|
||||
# Haiku image
|
||||
|
@ -42,7 +42,6 @@ rule PreprocessPackageInfo source : directory : architecture
|
||||
local target = $(source:BSG=package-info)-package-info ;
|
||||
local defines = HAIKU_PACKAGING_ARCH=$(architecture) ;
|
||||
local sedReplacements = %HAIKU_PACKAGING_ARCH%,$(architecture) ;
|
||||
sedReplacements += %HAIKU_VERSION%,R1~alpha4_pm-1 ;
|
||||
if $(HAIKU_BOOTSTRAP_BUILD) {
|
||||
defines += HAIKU_BOOTSTRAP_BUILD ;
|
||||
target = $(target)-bootstrap ;
|
||||
@ -58,13 +57,15 @@ rule PreprocessPackageInfo source : directory : architecture
|
||||
+= %HAIKU_SECONDARY_PACKAGING_ARCH_SUFFIX%, ;
|
||||
}
|
||||
|
||||
local revisionFile = [ DetermineHaikuRevision ] ;
|
||||
|
||||
MakeLocate $(target) : $(directory) ;
|
||||
Depends $(target) : $(source) ;
|
||||
Depends $(target) : $(source) $(revisionFile) ;
|
||||
|
||||
CCDEFS on $(target) = [ FDefines $(defines) ] ;
|
||||
HAIKU_SED_REPLACEMENTS on $(target) = "-e s,$(sedReplacements),g" ;
|
||||
|
||||
PreprocessPackageInfo1 $(target) : $(source) ;
|
||||
PreprocessPackageInfo1 $(target) : $(source) $(revisionFile) ;
|
||||
|
||||
return $(target) ;
|
||||
}
|
||||
@ -72,7 +73,10 @@ rule PreprocessPackageInfo source : directory : architecture
|
||||
|
||||
actions PreprocessPackageInfo1
|
||||
{
|
||||
sed $(HAIKU_SED_REPLACEMENTS) < $(2) | $(HOST_CC) -E -w $(CCDEFS) - -o $(1)
|
||||
revision=`sed -n 's,^\(hrev[0-9]*\).*,\1,p' $(2[2])`
|
||||
sed $(HAIKU_SED_REPLACEMENTS) \
|
||||
-e s,%HAIKU_VERSION%,$(HAIKU_VERSION)_${revision:-0}-1, < $(2[1]) \
|
||||
| $(HOST_CC) -E -w $(CCDEFS) - -o $(1)
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user