Ignore:
Timestamp:
Jan 10, 2009, 3:16:34 AM (17 years ago)
Author:
bird
Message:

subheader.kmk,subfooter.kmk: removed unnecessary doulbe expansion and made use of $(evalval ) (more efficient and understandable).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/subfooter.kmk

    r2240 r2242  
    55
    66#
    7 # Copyright (c) 2006-2008 knut st. osmundsen <bird-kBuild-spam@anduin.net>
     7# Copyright (c) 2006-2009 knut st. osmundsen <bird-kBuild-spamix@anduin.net>
    88#
    99# This file is part of kBuild.
     
    4242# Set the default path for all new targets.
    4343#
    44 ## @todo use $(evalval ) instead of doubly expanded $(eval )?
    4544define def_subheader
    4645 ifndef $(target)_PATH
    4746  ifdef $(target)_DEFPATH
    48    $(target)_PATH := $$($(target)_DEFPATH)
     47   $(target)_PATH := $($(target)_DEFPATH)
    4948  else
    50    $(target)_PATH := $$(PATH_SUB_CURRENT)
    51    $(target)_DEFPATH := $$(PATH_SUB_CURRENT)
     49   $(target)_PATH := $(PATH_SUB_CURRENT)
     50   $(target)_DEFPATH := $(PATH_SUB_CURRENT)
    5251  endif
    5352 else ifndef $(target)_DEFPATH
    54   $(target)_DEFPATH := $$($(target)_PATH)
     53  $(target)_DEFPATH := $($(target)_PATH)
    5554 endif
    5655 ifndef $(target)_MAKEFILE
    57   $(target)_MAKEFILE := $$(MAKEFILE_CURRENT)
     56  $(target)_MAKEFILE := $(MAKEFILE_CURRENT)
    5857 endif
    5958 ifndef $(target)_0_OUTDIR
    60   $(target)_0_OUTDIR := $$(call TARGET_PATH,$(target))
    61   PATH_$(target) := $$($(target)_0_OUTDIR)
     59  $(target)_0_OUTDIR := $(call TARGET_PATH,$(target))
     60  PATH_$(target) := $($(target)_0_OUTDIR)
    6261 endif
    6362endef
     
    7675        $(INSTALLS)    $(INSTALLS.$(KBUILD_TARGET))     $(INSTALLS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))    $(INSTALLS.$(KBUILD_TARGET_ARCH))    $(INSTALLS.$(KBUILD_TARGET_CPU))    $(INSTALLS.$(KBUILD_TYPE))    \
    7776        $(OTHERS)      $(OTHERS.$(KBUILD_TARGET))       $(OTHERS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))      $(OTHERS.$(KBUILD_TARGET_ARCH))      $(OTHERS.$(KBUILD_TARGET_CPU))      $(OTHERS.$(KBUILD_TYPE))      \
    78 ,$(eval $(def_subheader)))
     77,$(evalval def_subheader))
    7978
    8079
Note: See TracChangeset for help on using the changeset viewer.