VirtualBox

Changeset 70 in kBuild for trunk


Ignore:
Timestamp:
May 29, 2004 8:53:13 AM (21 years ago)
Author:
bird
Message:

Full PATH_ROOT and correct PATH_TARGET.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/header.kmk

    r69 r70  
    5151
    5252#
     53# .
     54#
     55PATH_ROOT := $(CURDIR)
     56define def_root_dir
     57PATH_ROOT := $(dir $(PATH_ROOT))
     58endef
     59PATH_ROOT
     60
     61#
    5362# Common definitions.
    5463#
    5564PATH_CURRENT        := $(CURDIR)
    56 PATH_ROOT           := $(DEPTH)
    57 ifndef PATH_KBUILD
    58 PATH_KBUILD         := $(PATH_ROOT)/kBuild
     65# Get the real root path.
     66PATH_ROOT           := $(CURDIR)
     67ifneq ($(DEPTH),.)
     68$(foreach d,$(subst /, ,$(DEPTH)), $(eval PATH_ROOT := $(patsubst %/,%,$(dir $(PATH_ROOT)))) )
    5969endif
    60 
     70# Subdirectory relative to the root.
     71DIR_DEPTH           := $(patsubst $(PATH_ROOT)/%,%,$(CURDIR))
     72# Output directories.
    6173PATH_OUT            := $(PATH_ROOT)/out/$(BUILD_TARGET)/$(BUILD_TYPE)
    6274PATH_OBJ            := $(PATH_OUT)/obj
     
    6476PATH_LIB            := $(PATH_OUT)/lib
    6577PATH_DOC            := $(PATH_ROOT)/out/doc
     78PATH_TARGET          = $(PATH_OUT)/$(DIR_DEPTH)
     79
     80# Usually kBuild is external to the source tree.
     81ifndef PATH_KBUILD
     82PATH_KBUILD         := $(PATH_ROOT)/kBuild
     83endif
     84# kBuild tools
    6685PATH_TOOLS_W32      := $(PATH_KBUILD)/bin/x86.win32
    6786PATH_TOOLS_LNX      := $(PATH_KBUILD)/bin/x86.linux
    6887PATH_TOOLS_OS2      := $(PATH_KBUILD)/bin/x86.os2
    69 # fixme
    70 PATH_TARGET          = $(PATH_OUT)
    71 
    7288# kBuild files which might be of interest.
    7389FILE_KBUILD_HEADER  := $(PATH_KBUILD)/header.kmk
     
    107123HOSTSUFF_EXE        :=
    108124endif
    109        
     125
    110126# Win32
    111127ifeq ($(BUILD_PLATFORM),WIN32)
     
    145161# This is how we find the closest config.kmk.
    146162# It's a little hacky but I think it works fine.
    147 #               
    148 _CFGDIR         := .
    149 _CFGFILES       :=
     163#
     164_CFGDIR     := .
     165_CFGFILES   :=
    150166define def_include_config
    151 _CFGDIR         := $(_CFGDIR)/$(1)
    152 _CFGFILES       += $(wildcard $(_CFGDIR)/config.kmk $(_CFGDIR)/config.kMk)
     167_CFGDIR     := $(_CFGDIR)/$(1)
     168_CFGFILES   += $(wildcard $(_CFGDIR)/config.kmk $(_CFGDIR)/config.kMk)
    153169endef
    154170# walk down the _RELATIVE_ path specified by DEPTH.
    155171$(foreach d,$(subst /, ,$(DEPTH)), $(eval $(call def_include_config,$(d))) )
    156172# add the default config file.
    157 _CFGFILE        := $(firstword $(_CFGFILES) $(FILE_KBUILD_CONFIG))
     173_CFGFILE    := $(firstword $(_CFGFILES) $(FILE_KBUILD_CONFIG))
    158174_CFGFILES   :=
    159175_CFGDIR     :=
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