Ignore:
Timestamp:
Apr 27, 2012, 3:19:55 PM (13 years ago)
Author:
bird
Message:

tools/OPENWATCOM*: Assembler fix. Only windows and os/2 needs the slashes switched.

File:
1 edited

Legend:

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

    r2413 r2572  
    121121endif
    122122
     123if1of ($(KBUILD_HOST), os2 win)
     124 TOOL_OPENWATCOM_FIX_SLASHES = $(subst /,\\,$1)
     125else
     126 TOOL_OPENWATCOM_FIX_SLASHES = $1
     127endif
     128
    123129# General Properties used by kBuild
    124130TOOL_OPENWATCOM_ASOBJSUFF        ?= .obj
     
    169175        $(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_AS) \
    170176                $(flags) \
    171                 $(addsuffix , $(addprefix -i=, $(subst /,\\,$(incs)))) \
     177                $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
    172178                $(addprefix -d, $(defs)) \
    173                 -fo=$(subst /,\\,$(obj)) \
    174                 -fr=$(subst /,\\,$(obj)).err \
    175                 $(subst /,\\,$(abspath $(source)))
     179                -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
     180                -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
     181                $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
    176182        $(QUIET)$(APPEND) -n $(obj).err
    177183## @todo dependencies
     
    185191        $(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_CC) \
    186192                $(flags) \
    187                 $(addsuffix , $(addprefix -i=, $(subst /,\\,$(incs)))) \
     193                $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
    188194                $(addprefix -d, $(defs)) \
    189                 -fo=$(subst /,\\,$(obj)) \
    190                 -fr=$(subst /,\\,$(obj)).err \
    191                 $(subst /,\\,$(abspath $(source)))
     195                -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
     196                -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
     197                $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
    192198        $(QUIET)$(APPEND) -n $(obj).err
    193199## @todo dependencies
     
    200206        $(QUIET) $(call TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_CXX) \
    201207                $(flags) \
    202                 $(addsuffix , $(addprefix -i=, $(subst /,\\,$(incs)))) \
     208                $(addsuffix , $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs)))) \
    203209                $(addprefix -d, $(defs)) \
    204                 -fo=$(subst /,\\,$(obj)) \
    205                 -fr=$(subst /,\\,$(obj)).err \
    206                 $(subst /,\\,$(abspath $(source)))
     210                -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
     211                -fr=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)).err \
     212                $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
    207213        $(QUIET)$(APPEND) -n $(obj).err
    208214## @todo dependencies
     
    216222                $(TOOL_OPENWATCOM_RC) -r\
    217223                $(flags) \
    218                 $(addprefix -i=, $(subst /,\\,$(incs))) \
     224                $(addprefix -i=, $(call TOOL_OPENWATCOM_FIX_SLASHES,$(incs))) \
    219225                $(addprefix -d, $(defs))\
    220                 -fo=$(subst /,\\,$(obj)) \
    221                 $(subst /,\\,$(abspath $(source)))
     226                -fo=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \
     227                $(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source)))
    222228endef
    223229
     
    226232TOOL_OPENWATCOM_LINK_LIBRARY_DEPORD =
    227233define TOOL_OPENWATCOM_LINK_LIBRARY_CMDS
    228         $(QUIET)$(APPEND) -tn $(outbase).rsp $(foreach obj,$(subst /,\,$(objs) $(othersrc)),'+"$(obj)"')
    229         $(QUIET)$(TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_AR) $(flags) $(subst /,\\,$(out)) @$(outbase).rsp
     234        $(QUIET)$(APPEND) -tn $(outbase).rsp $(foreach obj,$(call TOOL_OPENWATCOM_FIX_SLASHES,$(objs) $(othersrc)),'+"$(obj)"')
     235        $(QUIET)$(TOOL_OPENWATCOM_ENV_SETUP) $(TOOL_OPENWATCOM_AR) $(flags) $(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) @$(outbase).rsp
    230236endef
    231237
     
    237243                $(TOOL_OPENWATCOM_LD) \
    238244                $(flags) \
    239                 -fe=$(subst /,\\,$(out)) \
    240                 -fm=$(subst /,\\,$(outbase).map) \
    241                 $(subst /,\\,$(filter-out %.res,$(objs))) \
    242                 $(subst /,\\,$(libs)) \
    243                 $(subst /,\\,$(othersrc))
     245                -fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
     246                -fm=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase).map) \
     247                $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs))) \
     248                $(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)) \
     249                $(call TOOL_OPENWATCOM_FIX_SLASHES,$(othersrc))
    244250        $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
    245251                $(TOOL_OPENWATCOM_RC) \
    246252                        $(filter -bt=%,$(flags)) \
    247                         /fe=$(subst /,\\,$(out)) \
    248                         $(subst /,\\,$(filter %.res,$(objs))))
     253                        /fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
     254                        $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
    249255endef
    250256
     
    256262                $(TOOL_OPENWATCOM_LD) \
    257263                $(flags) \
    258                 -fe=$(subst /,\\,$(out)) \
    259                 -fm=$(subst /,\\,$(outbase).map) \
    260                 $(subst /,\\,$(filter-out %.res,$(objs))) \
    261                 $(subst /,\\,$(libs)) \
    262                 $(subst /,\\,$(othersrc))
     264                -fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
     265                -fm=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase).map) \
     266                $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs))) \
     267                $(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)) \
     268                $(call TOOL_OPENWATCOM_FIX_SLASHES,$(othersrc))
    263269        $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
    264270                $(TOOL_OPENWATCOM_RC) \
    265271                        $(filter -bt=%,$(flags)) \
    266                         /fe=$(subst /,\\,$(out)) \
    267                         $(subst /,\\,$(filter %.res,$(objs))))
     272                        /fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
     273                        $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
    268274endef
    269275
     
    275281                $(TOOL_OPENWATCOM_LD) \
    276282                $(flags) \
    277                 -fe=$(subst /,\\,$(out)) \
    278                 -fm=$(subst /,\\,$(outbase).map) \
    279                 $(subst /,\\,$(filter-out %.res,$(objs))) \
    280                 $(subst /,\\,$(libs)) \
    281                 $(subst /,\\,$(othersrc))
     283                -fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
     284                -fm=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(outbase).map) \
     285                $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter-out %.res,$(objs))) \
     286                $(call TOOL_OPENWATCOM_FIX_SLASHES,$(libs)) \
     287                $(call TOOL_OPENWATCOM_FIX_SLASHES,$(othersrc))
    282288        $(if $(filter %.res,$(objs)), $(QUIET)$(call TOOL_OPENWATCOM_ENV_SETUP) \
    283289                $(TOOL_OPENWATCOM_RC) \
    284290                        $(filter -bt=%,$(flags)) \
    285                         /fe=$(subst /,\\,$(out)) \
    286                         $(subst /,\\,$(filter %.res,$(objs))))
    287 endef
    288 
     291                        /fe=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(out)) \
     292                        $(call TOOL_OPENWATCOM_FIX_SLASHES,$(filter %.res,$(objs))))
     293endef
     294
Note: See TracChangeset for help on using the changeset viewer.