summaryrefslogtreecommitdiff
path: root/kBuild/tools/YASM.kmk
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-03-26 19:21:20 +0000
committer <>2014-05-08 15:03:54 +0000
commitfb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch)
treec2103d76aec5f1f10892cd1d3a38e24f665ae5db /kBuild/tools/YASM.kmk
parent58ed4748338f9466599adfc8a9171280ed99e23f (diff)
downloadVirtualBox-master.tar.gz
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'kBuild/tools/YASM.kmk')
-rw-r--r--kBuild/tools/YASM.kmk28
1 files changed, 23 insertions, 5 deletions
diff --git a/kBuild/tools/YASM.kmk b/kBuild/tools/YASM.kmk
index 8f958f0c..8963f143 100644
--- a/kBuild/tools/YASM.kmk
+++ b/kBuild/tools/YASM.kmk
@@ -1,10 +1,10 @@
-# $Id: YASM.kmk 2413 2010-09-11 17:43:04Z bird $
+# $Id: YASM.kmk 2694 2013-07-22 13:39:36Z bird $
## @file
# kBuild Tool Config - YASM 0.4.0 or later.
#
#
-# Copyright (c) 2006-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
+# Copyright (c) 2006-2013 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
#
# This file is part of kBuild.
#
@@ -67,18 +67,36 @@ TOOL_YASM_ASFLAGS ?=
# @param $(objsuff) Object suffix.
#
TOOL_YASM_COMPILE_AS_OUTPUT = $(outbase).lst
+TOOL_YASM_COMPILE_AS_OUTPUT_MAYBE = $(obj).map
TOOL_YASM_COMPILE_AS_DEPEND =
TOOL_YASM_COMPILE_AS_DEPORD =
define TOOL_YASM_COMPILE_AS_CMDS
$(QUIET)$(TOOL_YASM_AS)\
- $(flags) $(addsuffix /,$(addprefix -I, $(incs))) $(addprefix -D, $(defs))\
+ $(patsubst --mapfile%,--mapfile=$(obj).map,$(flags))\
+ $(addsuffix /,$(addprefix -I, $(incs))) $(addprefix -D, $(defs))\
-l $(outbase).lst\
-o $(obj)\
$(abspath $(source))
- $(QUIET)$(REDIRECT) -wo $(dep) -- $(TOOL_YASM_AS)\
- $(flags) $(addsuffix /,$(addprefix -I, $(incs))) $(addprefix -D, $(defs))\
+ $(QUIET)$(REDIRECT) -wo $(dep) -- $(TOOL_YASM_AS) -DKBUILD_GENERATING_MAKEFILE_DEPENDENCIES\
+ $(patsubst --mapfile%,--mapfile=$(obj).map,$(flags))\
+ $(addsuffix /,$(addprefix -I, $(incs))) $(addprefix -D, $(defs))\
-o $(obj) \
$(abspath $(source)) \
-M
+ if1of ($(KBUILD_HOST), win nt os2)
+ $(QUIET)$(SED) -e 's/\\\(.\)/\/\1/g' --output "$(dep).tmp" "$(dep)"
+ else
+ $(QUIET)$(CP) -f -- "$(dep)" "$(dep).tmp"
+ endif
+ $(QUIET)$(APPEND) -n "$(dep).tmp" "" ""
+ $(QUIET)$(SED) $(if $(intersects $(KBUILD_HOST), win nt os2), -e 's/\\\(.\)/\/\1/g',)\
+ -e 's/^[^ ]*: / /'\
+ -e 's/ *\\$$(DOLLAR)//'\
+ -e 's/^ *//'\
+ -e 's/ */\n/g'\
+ -e 's/ *\([^ \n][^ \n]*\)/\1:\n/g'\
+ --append "$(dep).tmp"\
+ "$(dep)"
+ $(QUIET)$(MV) -f -- "$(dep).tmp" "$(dep)"
endef