VirtualBox

Changeset 984 in kBuild


Ignore:
Timestamp:
May 28, 2007 7:41:38 PM (18 years ago)
Author:
bird
Message:

enabled the multi target rules. added some PORTME hints.

Location:
trunk/kBuild
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/footer.kmk

    r983 r984  
    3434
    3535# all targets.
    36 ALL_TARGETS += \
     36_ALL_TARGETS := \
    3737        $(FETCHES)     $(FETCHES.$(BUILD_TARGET))       $(FETCHES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
    3838        $(PATCHES)     $(PATCHES.$(BUILD_TARGET))       $(PATCHES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
     
    4747
    4848# all $(BUILD_TARGET) targets.
    49 _ALL_BUILD_TARGET_TARGETS += \
     49_ALL_BUILD_TARGET_TARGETS := \
    5050        $(FETCHES)     $(FETCHES.$(BUILD_TARGET))       $(FETCHES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
    5151        $(PATCHES)     $(PATCHES.$(BUILD_TARGET))       $(PATCHES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
     
    5959
    6060# all $(BUILD_TARGET) targets.
    61 _ALL_BUILD_PLATFORM_TARGETS += \
     61_ALL_BUILD_PLATFORM_TARGETS := \
    6262        $(BLDPROGS)    $(BLDPROGS.$(BUILD_PLATFORM))    $(BLDPROGS.$(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH))
    6363
     64## all linkable targets.
     65#_ALL_LINKABLE_TARGETS := \
     66#       $(BLDPROGS)    $(BLDPROGS.$(BUILD_PLATFORM))    $(BLDPROGS.$(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH)) \
     67#       $(DLLS)        $(DLLS.$(BUILD_TARGET))          $(DLLS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
     68#       $(PROGRAMS)    $(PROGRAMS.$(BUILD_TARGET))      $(PROGRAMS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
     69#       $(SYSMODS)     $(SYSMODS.$(BUILD_TARGET))       $(SYSMODS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))
     70#
     71## all library targets.
     72#_ALL_LIBRARY_TARGETS := \
     73#       $(LIBRARIES)   $(LIBRARIES.$(BUILD_TARGET))     $(LIBRARIES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
     74#       $(IMPORT_LIBS) $(IMPORT_LIBS.$(BUILD_TARGET))   $(IMPORT_LIBS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
     75
    6476# all targets making use of srcname.
    65 _ALL_SRCNAME_TARGETS += \
     77_ALL_SRCNAME_TARGETS := \
    6678        $(FETCHES)     $(FETCHES.$(BUILD_TARGET))       $(FETCHES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
    6779        $(PATCHES)     $(PATCHES.$(BUILD_TARGET))       $(PATCHES.$(BUILD_TARGET).$(BUILD_TARGET_ARCH))
     
    106118
    107119
    108 #
    109 # Basic macros
     120
     121#
     122# Footer macros
    110123#
    111124
     
    138151
    139152
    140 #
    141 # Include the additional footer macros when bootstrapping kBuild.
    142 #
    143 ifndef KMK_VERSION
    144  include $(PATH_KBUILD)/gnumake-footer.kmk
    145 endif
    146 
    147 
    148153
    149154#
     
    158163endif
    159164endef
    160 $(foreach target, $(ALL_TARGETS),$(eval $(def_check_target)))
     165$(foreach target, $(_ALL_TARGETS),$(eval $(def_check_target)))
     166
     167
     168#
     169# Target inheritance.
     170#
     171# $ (foreach ...
    161172
    162173
     
    170181endif
    171182endef
    172 $(foreach target, $(ALL_TARGETS), $(eval $(def_templates)))
     183$(foreach target, $(_ALL_TARGETS), $(eval $(def_templates)))
    173184_TEMPLATES := $(sort $(_TEMPLATES))
    174185# $ (warning dbg: _TEMPLATES=$(_TEMPLATES))
     
    11391150endif
    11401151
    1141 ## Temporary macro for testing the new multi target rules.
    1142 ifdef USE_MULTI_TARGET
    1143  _M_PLUSS=+
    1144 else
    1145  _M_PLUSS=
    1146 endif
    1147 
    11481152## Generates the rules for building a specific object, and the aliases
    11491153# for building a source file.
    11501154# @param    $(obj)    The object file.
    11511155define def_target_source_rule
    1152 $(obj) $(_M_PLUSS) $($(target)_$(source)_OUTPUT_): \
     1156$(obj) + $($(target)_$(source)_OUTPUT_) : \
    11531157                $($(target)_$(source)_DEPEND_) \
    11541158                $(_DEP_COMPILE_CMDS) \
     
    11941198# @param    $($(target)_CMDS_PREV_) The link commands from the previous run.
    11951199define def_link_rule
    1196 $(out) $(_M_PLUSS) $($(target)_OUTPUT_): \
     1200$(out) + $($(target)_OUTPUT_) : \
    11971201                $($(target)_DEPEND_) \
    11981202                $(_DEP_LINK_CMDS) \
     
    24562460#
    24572461show_targets:
    2458         @$(foreach target, $(ALL_TARGETS),\
     2462        @$(foreach target, $(_ALL_TARGETS),\
    24592463        @$(ECHO) "target: $(target)" $(NLTAB)\
    24602464        @$(ECHO) "  PATH_$(target)=$(PATH_$(target))" $(NLTAB)\
  • trunk/kBuild/header.kmk

    r980 r984  
    3333#
    3434ifndef KMK_VERSION
    35  $(error kBuild: The kmk default variable KMK_VERSION isn't defined! Make sure you are using 'kmk' and not 'make', 'gmake', 'kmk_gmake', 'dmake' or any other make program.)
     35 $(error kBuild: The kmk default variable KMK_VERSION isn't defined! Make sure you are using 'kmk' and not 'make', 'gmake', 'kmk_gmake', 'dmake' or any other make program)
    3636endif
    3737ifneq ($(KBUILD_VERSION_MAJOR).$(KBUILD_VERSION_MINOR),0.1)
     
    129129# to be assigned to it and added here. This strictness is required because
    130130# this keyword namespace is shared between OSes, architectures, cpus and
    131 # build types.
     131# build types. (PORTME)
    132132#
    133133KBUILD_OSES   = darwin freebsd l4 linux netbsd nt openbsd os2 solaris win
     
    304304#
    305305# Build platform setup.
    306 #
     306# (PORTME)
     307#
     308
    307309# OS/2
    308310ifeq ($(BUILD_PLATFORM),os2)
     
    344346#
    345347# Build target setup.
     348# (PORTME)
    346349#
    347350SUFF_DEP            := .dep
     
    469472# @param        $1      The paths to make absolute.
    470473# @obsolete Use the GNU make function $(abspath) directly now.
    471 ABSPATH = $(abspath $(1))
     474ABSPATH = $(abspath $(1))$(warning ABSPATH is deprecated, use abspath directly!)
    472475
    473476## DIRDEP - make create directory dependencies.
     
    510513# others can add stuff to if they like for processing in the footer.
    511514#
    512 
    513 ## ALL_TARGET
    514 # This is the list of all targets.
    515 ALL_TARGETS :=
    516515
    517516## TEMPLATE_PATHS
     
    709708
    710709#
     710# Check for --pretty-command-printing before including the Config.kmk
     711# so that anyone overriding the message macros can take the implied
     712# verbosity level change into account.
     713#
     714ifndef KBUILD_VERBOSE
     715 ifndef KBUILD_QUIET
     716  ifneq ($(filter --pretty-command-printing,$(MAKEFLAGS)),)
     717   export KBUILD_VERBOSE := 2
     718  endif
     719 endif
     720endif
     721
     722
     723#
    711724# This is how we find the closest config.kmk.
    712725# It's a little hacky but I think it works fine.
     
    727740$(error kBuild: no Config.kmk file found! Check the DEPTH: DEPTH='$(DEPTH)' PATH_CURRENT='$(PATH_CURRENT)')
    728741endif
    729 
    730 
    731 #
    732 # Check for --pretty-command-printing before including the Config.kmk
    733 # so that anyone overriding the message macros can take the implied
    734 # verbosity level change into account.
    735 #
    736 ifndef KBUILD_VERBOSE
    737  ifndef KBUILD_QUIET
    738   ifneq ($(filter --pretty-command-printing,$(MAKEFLAGS)),)
    739    export KBUILD_VERBOSE := 2
    740   endif
    741  endif
    742 endif
    743 
    744742
    745743# Include the config.kmk we found file (or the default one).
Note: See TracChangeset for help on using the changeset viewer.

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