* We do now have a special "_haiku_revision" section in our libroot,
containing the Haiku SVN revision number which is used by uname(). The value is 0 when built, but updated by the build system before copying libroot to the image (new rule CopySetHaikuRevision). * For AboutHaiku we no longer write the SVN revision number into a resource. Instead we use the uname() info. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20082 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -217,3 +217,35 @@ rule ObjectReferences
|
||||
}
|
||||
}
|
||||
|
||||
rule CopySetHaikuRevision target : source
|
||||
{
|
||||
# CopySetHaikuRevision <target> : <source>
|
||||
#
|
||||
# Copy <source> to <target>, writing the SVN revision of the working root
|
||||
# directory into the haiku revision section of <target>.
|
||||
#
|
||||
# <target> - Output file target. Gristed and located target.
|
||||
# <source> - ELF object to be copied. Gristed and located target.
|
||||
|
||||
# If existent, make the target depend on the .svn/entries file in the
|
||||
# root directory, so it gets updated when the revision changes due to
|
||||
# "svn up".
|
||||
if [ Glob [ FDirName $(HAIKU_TOP) .svn ] : entries ] {
|
||||
local svnEntries = <haiku-rootdir-svn>entries ;
|
||||
SEARCH on $(svnEntries) = [ FDirName $(HAIKU_TOP) .svn ] ;
|
||||
Depends $(target) : $(svnEntries) ;
|
||||
}
|
||||
|
||||
Depends $(target) : <build>copyattr <build>set_haiku_revision $(source) ;
|
||||
CopySetHaikuRevision1 $(target)
|
||||
: <build>copyattr <build>set_haiku_revision $(source) ;
|
||||
}
|
||||
|
||||
actions CopySetHaikuRevision1
|
||||
{
|
||||
$(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR)
|
||||
revision=`(svn info $(HAIKU_TOP) 2> /dev/null || echo Revision: 0) |
|
||||
grep Revision | awk '{printf $2}'`
|
||||
$(2[1]) --data $(2[3]) $(1) &&
|
||||
$(2[2]) $(1) ${revision}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user