VirtualBox

Changeset 3659 in vbox


Ignore:
Timestamp:
Jul 16, 2007 9:33:57 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
22933
Message:

VBOX_SVN_REV now contains the best guess for the tree revision. Can be set in LocalConfig.kmk or AutoConfig.kmk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    • Property svn:keywords changed from Id to Id Revision
    r3629 r3659  
    24402440# directory. If you don't run it there, you get a consistent sub-tree only.
    24412441#
    2442 VBOX_VERSION_STAMP = $(PATH_OUT)/version-stamp-$(VBOX_VERSION_STRING)
     2442VBOX_VERSION_STAMP  = $(PATH_OUT)/version-stamp-$(VBOX_VERSION_STRING)
    24432443VBOX_VERSION_HEADER = $(PATH_OUT)/version-generated.h
    24442444VBOX_VERSION_MK     = $(PATH_OUT)/version-generated.mk
     
    24702470$(VBOX_VERSION_MK): $(VBOX_VERSION_STAMP)
    24712471        $(call MSG_GENERATE,,$@)
     2472        $(QUIET)$(RM) -f $@ [email protected]
    24722473        $(QUIET)$(MKDIR) -p $(@D)
    2473         $(QUIET)$(RM) -f $@ [email protected]
    24742474        $(QUIET)$(APPEND) [email protected] "VBOX_VERSION_MAJOR = $(VBOX_VERSION_MAJOR)"
    24752475        $(QUIET)$(APPEND) [email protected] "VBOX_VERSION_MINOR = $(VBOX_VERSION_MINOR)"
     
    24872487
    24882488#
     2489# Subversion tree revision.
     2490#
     2491# The VBOX_SVN_REV contains our best guess. Use svn info on the
     2492# root of the treeto determin this it if .svn/entries is found,
     2493# otherwise fall back on the Config.kmk revision.
     2494#
     2495ifndef VBOX_SVN_REV
     2496 VBOX_SVN_REV_KMK       = $(PATH_OUT)/revision.kmk
     2497 VBOX_SVN_REV_FALLBACK := $(patsubst %:,,  $Rev$  )
     2498 VBOX_SVN_DEP          := $(wildcard $(PATH_ROOT)/.svn/entries)
     2499
     2500# Rule for generating a timestamp and updating the real thing on change.
     2501 ifneq ($(VBOX_SVN_DEP),)
     2502$(VBOX_SVN_REV_KMK).ts: $(VBOX_SVN_DEP)
     2503 else
     2504$(VBOX_SVN_REV_KMK).ts: $(PATH_ROOT)/Config.kmk
     2505 endif
     2506        $(call MSG_GENERATE,,$(VBOX_SVN_REV_KMK))
     2507        $(QUIET)$(RM) -f $@
     2508        $(QUIET)$(MKDIR) -p $(@D)
     2509 ifneq ($(VBOX_SVN_DEP),)
     2510        $(QUIET)$(APPEND) $@ "export VBOX_SVN_REV=$(shell svn info $(PATH_ROOT) | $(SED) -e '/^Revision/!d'  -e "s/Revision\: *//")"
     2511 else
     2512        $(QUIET)$(APPEND) $@ "export VBOX_SVN_REV=$(VBOX_SVN_REV_FALLBACK)"
     2513 endif
     2514        $(QUIET)if test ! -f $(VBOX_SVN_REV_KMK) \
     2515        || test ! "`$(CAT_EXT) $@`" = "`$(CAT_EXT) $(VBOX_SVN_REV_KMK)`"; \
     2516        then \
     2517                $(RM_EXT) -f $(VBOX_SVN_REV_KMK); \
     2518                $(CP_EXT) -f $@ $(VBOX_SVN_REV_KMK) || exit 1; \
     2519                echo '* $(VBOX_SVN_REV_KMK) was updated:'; \
     2520        else \
     2521                echo '* $(VBOX_SVN_REV_KMK) was not changed:'; \
     2522        fi
     2523        $(QUIET)$(CAT_EXT) $(VBOX_SVN_REV_KMK)
     2524
     2525# Dependency on timestamp without any commands, so we
     2526# won't be bother if nothing changed.
     2527$(VBOX_SVN_REV_KMK): $(VBOX_SVN_REV_KMK).ts
     2528
     2529## @todo kBuild: Fix problem with using '$(VBOX_SVN_REV_KMK).ts +| $(VBOX_SVN_REV_KMK)' so the
     2530# problem with missing $(VBOX_SVN_REV_KMK) and not $(VBOX_SVN_REV_KMK).ts can be addressed
     2531
     2532## @todo kbuild: Need $(CMP)!
     2533
     2534 include $(VBOX_SVN_REV_KMK)
     2535endif
     2536
     2537
     2538#
    24892539# Legacy.
    24902540#
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