VirtualBox

Changeset 2242 in kBuild


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

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

Location:
trunk/kBuild
Files:
2 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
  • trunk/kBuild/subheader.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.
     
    5353 # Set the default path and makefile for all new targets.
    5454 #
    55  ## @todo use $(evalval ) instead of doubly expanded $(eval )?
    5655 define def_subfooter
    5756  ifndef $(target)_PATH
    5857   ifdef $(target)_DEFPATH
    59     $(target)_PATH := $$($(target)_DEFPATH)
     58    $(target)_PATH := $($(target)_DEFPATH)
    6059   else
    61     $(target)_PATH := $$(PATH_SUB_CURRENT)
    62     $(target)_DEFPATH := $$(PATH_SUB_CURRENT)
     60    $(target)_PATH := $(PATH_SUB_CURRENT)
     61    $(target)_DEFPATH := $(PATH_SUB_CURRENT)
    6362   endif
    6463  else ifndef $(target)_DEFPATH
    65    $(target)_DEFPATH := $$($(target)_PATH)
     64   $(target)_DEFPATH := $($(target)_PATH)
    6665  endif
    6766  ifndef $(target)_MAKEFILE
     
    6968  endif
    7069  ifndef $(target)_0_OUTDIR
    71    $(target)_0_OUTDIR := $$(call TARGET_PATH,$(target))
    72    PATH_$(target) := $$($(target)_0_OUTDIR)
     70   $(target)_0_OUTDIR := $(call TARGET_PATH,$(target))
     71   PATH_$(target) := $($(target)_0_OUTDIR)
    7372  endif
    7473 endef
     
    8786        $(INSTALLS)    $(INSTALLS.$(KBUILD_TARGET))     $(INSTALLS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))    $(INSTALLS.$(KBUILD_TARGET_ARCH))    $(INSTALLS.$(KBUILD_TARGET_CPU))    $(INSTALLS.$(KBUILD_TYPE))    \
    8887        $(OTHERS)      $(OTHERS.$(KBUILD_TARGET))       $(OTHERS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))      $(OTHERS.$(KBUILD_TARGET_ARCH))      $(OTHERS.$(KBUILD_TARGET_CPU))      $(OTHERS.$(KBUILD_TYPE))      \
    89  ,$(eval $(def_subfooter)))
     88 ,$(evalval def_subfooter))
    9089
    9190
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