VirtualBox

Changeset 306 in kBuild for trunk


Ignore:
Timestamp:
Aug 11, 2005 8:24:19 PM (19 years ago)
Author:
bird
Message:

Use $(abspath ) when possible.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/header.kmk

    r299 r306  
    184184# Common definitions.
    185185#
     186ifeq ($(filter abspath,$(KMK_FEATURES)),abspath)
     187PATH_CURRENT        := $(abspath $(CURDIR))
     188PATH_ROOT           := $(abspath $(PATH_CURRENT)/$(DEPTH))
     189
     190else
     191
    186192PATH_CURRENT        := $(CURDIR)
    187193# Get the real root path.
     
    190196$(foreach d,$(subst /, ,$(DEPTH)), $(eval PATH_ROOT := $(patsubst %/,%,$(dir $(PATH_ROOT)))) )
    191197endif
     198
     199endif
    192200# Subdirectory relative to the root.
    193 ifneq ($(DEPTH),.)
    194 CURSUBDIR           := $(patsubst $(PATH_ROOT)/%,%,$(CURDIR))
     201ifneq ($(PATH_ROOT),$(PATH_CURRENT))
     202CURSUBDIR           := $(patsubst $(PATH_ROOT)/%,%,$(PATH_CURRENT))
    195203else
    196204CURSUBDIR           := .
    197205endif
     206
    198207# Output directories.
    199208ifndef PATH_OUT_BASE
     
    224233ifndef PATH_KBUILD
    225234PATH_KBUILD         := $(PATH_ROOT)/kBuild
     235endif
     236ifeq ($(filter abspath,$(KMK_FEATURES)),abspath)
     237PATH_KBUILD         := $(abspath $(PATH_KBUILD))
    226238endif
    227239# kBuild tools
     
    377389#
    378390# @param        $1      The paths to make absolute.
     391ifeq ($(filter abspath,$(KMK_FEATURES)),abspath)
     392ABSPATH = $(abspath $(1))
     393else
    379394ABSPATH = $(foreach path,$(1)\
    380395            ,$(strip $(if $(subst <,,$(firstword $(subst /, ,<$(path)))),\
    381396                      $(if $(patsubst %:,,$(firstword $(subst :,: ,$(path)))),$(PATH_CURRENT)/$(path),$(path)),\
    382397                      $(path))))
     398endif
     399                                         
    383400## DIRDEP - make create directory dependencies.
    384401#
Note: See TracChangeset for help on using the changeset viewer.

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