Ignore:
Timestamp:
Sep 8, 2016, 3:28:37 PM (9 years ago)
Author:
bird
Message:

Use kObjDep more.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/tools/OPENWATCOM.kmk

    r2882 r2895  
    5454 # Resolve any fancy stuff once and for all.
    5555 PATH_TOOL_OPENWATCOM := $(PATH_TOOL_OPENWATCOM)
     56endif
     57
     58# Clear the feature indicator if not available on the current host.
     59ifdef TOOL_OPENWATCOM_USE_KSUBMIT
     60 ifneq ($(KBUILD_HOST),win)
     61  override TOOL_OPENWATCOM_USE_KSUBMIT :=
     62 endif
    5663endif
    5764
     
    149156
    150157if $(KBUILD_KMK_REVISION) >= 2747
    151  TOOL_OPENWATCOM_ENV_SETUP_BD ?= $(call TOOL_OPENWATCOM_ENV_SETUP,$1,$2 --wcc-brain-damage)
     158 TOOL_OPENWATCOM_ENV_SETUP_BD ?= $(call TOOL_OPENWATCOM_ENV_SETUP,$1, --wcc-brain-damage $2)
    152159else
    153160 TOOL_OPENWATCOM_ENV_SETUP_BD ?= $(call TOOL_OPENWATCOM_ENV_SETUP,$1,$2)
     
    208215TOOL_OPENWATCOM_COMPILE_AS_DEPEND =
    209216TOOL_OPENWATCOM_COMPILE_AS_DEPORD =
    210 TOOL_OPENWATCOM_COMPILE_AS_OUTPUT = $(obj).err
     217TOOL_OPENWATCOM_COMPILE_AS_OUTPUT_MAYBE = $(obj).err
     218ifdef TOOL_OPENWATCOM_USE_KSUBMIT
    211219define TOOL_OPENWATCOM_COMPILE_AS_CMDS
    212         $(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_AS) \
    213                 $(flags) \
    214                 $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
    215                 $(addprefix -d, $(defs)) \
    216                 -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
    217                 -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
    218                 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
    219         $(QUIET)$(APPEND) -n $(obj).err
    220 ## @todo dependencies
    221 endef
     220        $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,, -P $(DEP_OBJ_INT) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)") \
     221                $(TOOL_OPENWATCOM_AS) \
     222                $(flags) \
     223                $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
     224                $(addprefix -d, $(defs)) \
     225                -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
     226                -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
     227                $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
     228endef
     229else
     230define TOOL_OPENWATCOM_COMPILE_AS_CMDS
     231        $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_AS) \
     232                $(flags) \
     233                $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
     234                $(addprefix -d, $(defs)) \
     235                -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
     236                -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
     237                $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
     238        $(QUIET)$(DEP_OBJ) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)"
     239endef
     240endif
    222241
    223242
    224243TOOL_OPENWATCOM_COMPILE_C_DEPEND =
    225244TOOL_OPENWATCOM_COMPILE_C_DEPORD =
    226 TOOL_OPENWATCOM_COMPILE_C_OUTPUT = $(obj).err
     245TOOL_OPENWATCOM_COMPILE_C_OUTPUT_MAYBE = $(obj).err
     246ifdef TOOL_OPENWATCOM_USE_KSUBMIT
     247define TOOL_OPENWATCOM_COMPILE_C_CMDS
     248        $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,, -P $(DEP_OBJ_INT) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)") \
     249                $(TOOL_OPENWATCOM_CC) \
     250                $(flags) \
     251                $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
     252                $(addprefix -d, $(defs)) \
     253                -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
     254                -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
     255                $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
     256endef
     257else
    227258define TOOL_OPENWATCOM_COMPILE_C_CMDS
    228259        $(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_CC) \
     
    233264                -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
    234265                $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
    235         $(QUIET)$(APPEND) -n $(obj).err
    236 ## @todo dependencies
    237 endef
     266        $(QUIET)$(DEP_OBJ) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)"
     267endef
     268endif
    238269
    239270TOOL_OPENWATCOM_COMPILE_CXX_DEPEND =
    240271TOOL_OPENWATCOM_COMPILE_CXX_DEPORD =
    241 TOOL_OPENWATCOM_COMPILE_CXX_OUTPUT = $(obj).err
     272TOOL_OPENWATCOM_COMPILE_CXX_OUTPUT_MAYBE = $(obj).err
     273ifdef TOOL_OPENWATCOM_USE_KSUBMIT
    242274define TOOL_OPENWATCOM_COMPILE_CXX_CMDS
    243         $(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_CXX) \
    244                 $(flags) \
    245                 $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
    246                 $(addprefix -d, $(defs)) \
    247                 -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
    248                 -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
    249                 $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
    250         $(QUIET)$(APPEND) -n $(obj).err
    251 ## @todo dependencies
    252 endef
     275        $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD,, -P $(DEP_OBJ_INT) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)") \
     276                $(TOOL_OPENWATCOM_CXX) \
     277                $(flags) \
     278                $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
     279                $(addprefix -d, $(defs)) \
     280                -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
     281                -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
     282                $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
     283endef
     284else
     285define TOOL_OPENWATCOM_COMPILE_CXX_CMDS
     286        $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP_BD) $(TOOL_OPENWATCOM_CXX) \
     287                $(flags) \
     288                $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
     289                $(addprefix -d, $(defs)) \
     290                -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
     291                -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
     292                $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
     293        $(QUIET)$(DEP_OBJ) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)"
     294endef
     295endif
    253296
    254297TOOL_OPENWATCOM_COMPILE_RC_OUTPUT =
     
    256299TOOL_OPENWATCOM_COMPILE_RC_DEPORD =
    257300define TOOL_OPENWATCOM_COMPILE_RC_CMDS
    258         $(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP) \
     301        $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
    259302                $(TOOL_OPENWATCOM_RC) -r\
    260303                $(flags) \
Note: See TracChangeset for help on using the changeset viewer.