Commit 22e9c5c8 authored by David 'Digit' Turner's avatar David 'Digit' Turner Committed by android code review
Browse files

Merge "Make LOCAL_SHORT_COMMANDS work on Darwin."

parents f9c49812 22c5065b
......@@ -290,21 +290,21 @@ index-word-list = $(wordlist $(call bump-0-to-1,$1),$2,$3)
# $2: word list
#
define list-file-start-gen-10
$$(hide) $$(HOST_ECHO) -n "$(call index-word-list,$10,$19,$2) " >> $$@
$$(hide) $$(HOST_ECHO_N) "$(call index-word-list,$10,$19,$2) " >> $$@
endef
# Used to generate a slice of always 10 items starting from index $1
# $1: start (tenth) index. CANNOT BE 0
# $2: word list
define list-file-always-gen-10
$$(hide) $$(HOST_ECHO) -n "$(wordlist $10,$19,$2) " >> $$@
$$(hide) $$(HOST_ECHO_N) "$(wordlist $10,$19,$2) " >> $$@
endef
# Same as list-file-always-gen-10, except that the word list might be
# empty at position $10 (i.e. $(1)0)
define list-file-maybe-gen-10
ifneq ($(word $10,$2),)
$$(hide) $$(HOST_ECHO) -n "$(wordlist $10,$19,$2) " >> $$@
$$(hide) $$(HOST_ECHO_N) "$(wordlist $10,$19,$2) " >> $$@
endif
endef
......@@ -414,7 +414,7 @@ __list_file := $2
$$(__list_file).tmp:
@$$(call host-mkdir,$$(dir $$@))
$$(hide) $$(HOST_ECHO) -n "" > $$@
$$(hide) $$(HOST_ECHO_N) "" > $$@
$(call list-file-maybe-gen-1000,0,$1)
$(call list-file-maybe-gen-1000,1,$1)
$(call list-file-maybe-gen-1000,2,$1)
......
......@@ -255,7 +255,7 @@ ifdef HOST_PREBUILT
HOST_MAKE := $(wildcard $(HOST_PREBUILT)/make$(HOST_EXEEXT))
endif
else
$(call ndk_log,Host tols prebuilt directory not found, using system tools)
$(call ndk_log,Host tools prebuilt directory not found, using system tools)
endif
HOST_ECHO := $(strip $(HOST_ECHO))
......@@ -271,6 +271,16 @@ ifndef HOST_ECHO
endif
$(call ndk_log,Host 'echo' tool: $(HOST_ECHO))
# Define HOST_ECHO_N to perform the equivalent of 'echo -n' on all platforms.
ifeq ($(HOST_OS),windows)
# Our custom toolbox echo binary supports -n.
HOST_ECHO_N := $(HOST_ECHO) -n
else
# On Posix, just use bare printf.
HOST_ECHO_N := printf %s
endif
$(call ndk_log,Host 'echo -n' tool: $(HOST_ECHO_N))
HOST_CMP := $(strip $(HOST_CMP))
ifndef HOST_CMP
HOST_CMP := $(strip $(wildcard $(NDK_ROOT)/prebuilt/$(HOST_TAG)/bin/cmp$(HOST_EXEEXT)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment