VirtualBox

Changeset 109228 in vbox


Ignore:
Timestamp:
May 12, 2025 4:43:20 PM (11 days ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
168812
Message:

Config.kmk,configure: Attempt at getting the svn revision from a git commit log in case the source code is from a git repository, bugref:10900

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r109178 r109228  
    94029402#
    94039403SVN                    ?= svn$(HOSTSUFF_EXE)
     9404GIT                    ?= git$(HOSTSUFF_EXE)
    94049405VBOX_SVN_REV_KMK        = $(PATH_OUT)/revision.kmk
    94059406ifndef VBOX_SVN_REV
     
    94079408 VBOX_SVN_REV_FALLBACK := $(if-expr $(VBOX_SVN_REV_CONFIG_FALLBACK) > $(VBOX_SVN_REV_VERSION_FALLBACK),$(VBOX_SVN_REV_CONFIG_FALLBACK),$(VBOX_SVN_REV_VERSION_FALLBACK))
    94089409 VBOX_SVN_DEP          := $(firstword $(wildcard $(PATH_ROOT)/.svn/wc.db $(abspath $(PATH_ROOT)/../.svn/wc.db) $(abspath $(PATH_ROOT)/../../.svn/wc.db) $(PATH_ROOT)/.svn/entries))
     9410 VBOX_GIT_DEP          := $(firstword $(wildcard $(PATH_ROOT)/.git/config $(abspath $(PATH_ROOT)/../.git/config) $(abspath $(PATH_ROOT)/../../.git/config)))
    94099411 ifeq ($(which $(SVN)),)
    94109412  VBOX_SVN_DEP         :=
    94119413 endif
     9414 ifeq ($(which $(GIT)),)
     9415  VBOX_GIT_DEP         :=
     9416 endif
     9417
     9418 ifneq ($(VBOX_GIT_DEP),)
     9419  #
     9420  # VBOX_SVN_REV_CONFIG_FALLBACK is not properly populated for a git checkout,
     9421  # as the $Rev$ is not expanded, so we have to set it based on the information in the repo.
     9422  #
     9423  VBOX_SVN_REV_FALLBACK := $(shell $(GIT) log -1 $(PATH_ROOT)/Config.kmk | $(SED) -e 's/^[ \t]*//' -e '/svn:sync-xref-src-repo-rev\: r/!d' -e 's/svn:sync-xref-src-repo-rev\: r*//; t a; :a q')
     9424 endif
    94129425
    94139426 # Rule for generating a timestamp and updating the real thing on change.
    9414  $(VBOX_SVN_REV_KMK).ts +| $(VBOX_SVN_REV_KMK): $(if $(VBOX_SVN_DEP), $(VBOX_SVN_DEP), $(PATH_ROOT)/Config.kmk)
     9427 $(VBOX_SVN_REV_KMK).ts +| $(VBOX_SVN_REV_KMK): $(if $(VBOX_SVN_DEP), $(VBOX_SVN_DEP), $(if $(VBOX_GIT_DEP), $(VBOX_GIT_DEP), $(PATH_ROOT)/Config.kmk))
    94159428        $(call MSG_GENERATE,,$(VBOX_SVN_REV_KMK))
    94169429        $(QUIET)$(RM) -f $@ [email protected]
     
    94239436        $(QUIET)$(RM) -f [email protected]
    94249437 else
    9425         $(QUIET)$(APPEND) $@ 'export VBOX_SVN_REV=$(VBOX_SVN_REV_FALLBACK)'
     9438  ifneq ($(VBOX_GIT_DEP),)
     9439        -$(REDIRECT) -E 'LC_ALL=C' -wo [email protected] -- $(GIT) log -1 $(PATH_ROOT)
     9440        $(SED) -e 's/^[ \t]*//' -e '/svn:sync-xref-src-repo-rev\: r/!d' -e 's/svn:sync-xref-src-repo-rev\: r*/export VBOX_SVN_REV=/; t a; :a q' --output $@ [email protected]
     9441        $(QUIET)$(RM) -f [email protected]
     9442  else
     9443        $(QUIET)$(APPEND) $@ 'export VBOX_SVN_REV=$(VBOX_SVN_REV_FALLBACK)'
     9444  endif
    94269445 endif
    94279446        $(QUIET)$(CP) --changed -fv $@ $(VBOX_SVN_REV_KMK)
  • trunk/configure

    r109227 r109228  
    175175QT6MAJ=6
    176176QT6MIN=6
    177 KBUILDDIR="`cd \`dirname $0\`; pwd`/kBuild"
     177#
     178# Git submodules can only mirror whole repositories, not sub directories,
     179# meaning that kBuild is residing a level deeper than with svn externals.
     180#
     181if [ -d "`cd \`dirname $0\`; pwd`/kBuild/kBuild" ]; then
     182  KBUILDDIR="`cd \`dirname $0\`; pwd`/kBuild/kBuild"
     183else
     184  KBUILDDIR="`cd \`dirname $0\`; pwd`/kBuild"
     185fi
    178186DEVDIR="`cd \`dirname $0\`; pwd`/tools"
    179187if [ -d "/lib/modules/`uname -r`/build" ]; then
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette