Ignore:
Timestamp:
Jun 29, 2004, 1:55:07 PM (21 years ago)
Author:
bird
Message:

ABSPATH and no need for CYGPATHMIXED.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/header.kmk

    r125 r129  
    144144BUILD_TARGET_CPU    := i586
    145145
    146 #
    147 # Cygwin kludge.
    148 #
    149 ifneq ($(patsubst /cygdrive/%,%,$(CURDIR)),$(CURDIR))
    150 CYGPATHMIXED = $(foreach path,$(1)\
    151    ,$(if $(patsubst /cygdrive/%,,$(path)),$(path),$(patsubst $(strip $(firstword $(subst /, ,$(patsubst /cygdrive/%,%,$(path)))))/%,$(strip $(firstword $(subst /, ,$(patsubst /cygdrive/%,%,$(path))))):/%,$(patsubst /cygdrive/%,%,$(path)))))
    152 else
    153 CYGPATHMIXED = $(1)
    154 endif
    155146
    156147#
     
    294285endif
    295286
     287## ABSPATH - makes a path absolute.
     288# This implementation is clumsy and doesn't resolve '..' and '.' components.
     289#
     290# @param        $1      The paths to make absolute.
     291ABSPATH = $(foreach path,$(1)\
     292            ,$(strip $(if $(subst <,,$(firstword $(subst /, ,<$(path)))),\
     293                      $(if $(patsubst %:,,$(firstword $(subst :,: ,$(path)))),$(PATH_CURRENT)/$(path),$(path)),\
     294                      $(path))))
     295
     296## Cygwin kludge.
     297# This converts /cygdrive/x/% to x:%.
     298#
     299# @param        $1      The paths to make native.
     300# @remark       This macro is pretty much obsolete since we don't use cygwin base make.
     301ifneq ($(patsubst /cygdrive/%,%,$(CURDIR)),$(CURDIR))
     302CYGPATHMIXED = $(foreach path,$(1)\
     303   ,$(if $(patsubst /cygdrive/%,,$(path)),$(path),$(patsubst $(strip $(firstword $(subst /, ,$(patsubst /cygdrive/%,%,$(path)))))/%,$(strip $(firstword $(subst /, ,$(patsubst /cygdrive/%,%,$(path))))):/%,$(patsubst /cygdrive/%,%,$(path)))))
     304else
     305CYGPATHMIXED = $(1)
     306endif
     307
    296308#
    297309# This is how we find the closest config.kmk.
Note: See TracChangeset for help on using the changeset viewer.