Loading core/config.mk +10 −2 Original line number Diff line number Diff line Loading @@ -113,6 +113,16 @@ BUILD_HOST_DALVIK_STATIC_JAVA_LIBRARY := $(BUILD_SYSTEM)/host_dalvik_static_java SHOW_COMMANDS:= $(filter showcommands,$(MAKECMDGOALS)) hide := $(if $(SHOW_COMMANDS),,@) ################################################################ # Tools needed in product configuration makefiles. ################################################################ NORMALIZE_PATH := build/tools/normalize_path.py # $(1): the paths to be normalized define normalize-paths $(if $(1),$(shell $(NORMALIZE_PATH) $(1))) endef # ############################################################### # Set common values # ############################################################### Loading Loading @@ -550,8 +560,6 @@ else MD5SUM:=md5sum endif NORMALIZE_PATH := build/tools/normalize_path.py APICHECK_CLASSPATH := $(HOST_JDK_TOOLS_JAR) APICHECK_CLASSPATH := $(APICHECK_CLASSPATH):$(HOST_OUT_JAVA_LIBRARIES)/doclava$(COMMON_JAVA_PACKAGE_SUFFIX) APICHECK_CLASSPATH := $(APICHECK_CLASSPATH):$(HOST_OUT_JAVA_LIBRARIES)/jsilver$(COMMON_JAVA_PACKAGE_SUFFIX) Loading core/product.mk +5 −2 Original line number Diff line number Diff line Loading @@ -133,11 +133,14 @@ endef # 3. Records that we've visited this node, in ALL_PRODUCTS # define inherit-product $(if $(findstring ../,$(1)),\ $(eval np := $(call normalize-paths,$(1))),\ $(eval np := $(strip $(1))))\ $(foreach v,$(_product_var_list), \ $(eval $(v) := $($(v)) $(INHERIT_TAG)$(strip $(1)))) \ $(eval $(v) := $($(v)) $(INHERIT_TAG)$(np))) \ $(eval inherit_var := \ PRODUCTS.$(strip $(word 1,$(_include_stack))).INHERITS_FROM) \ $(eval $(inherit_var) := $(sort $($(inherit_var)) $(strip $(1)))) \ $(eval $(inherit_var) := $(sort $($(inherit_var)) $(np))) \ $(eval inherit_var:=) \ $(eval ALL_PRODUCTS := $(sort $(ALL_PRODUCTS) $(word 1,$(_include_stack)))) endef Loading tools/normalize_path.py +6 −1 Original line number Diff line number Diff line Loading @@ -14,11 +14,16 @@ # See the License for the specific language governing permissions and # limitations under the License. """ Normalize and output paths read from stdin. Normalize and output paths from arguments, or stdin if no arguments provided. """ import os.path import sys if len(sys.argv) > 1: for p in sys.argv[1:]: print os.path.normpath(p) sys.exit(0) for line in sys.stdin: print os.path.normpath(line.strip()) Loading
core/config.mk +10 −2 Original line number Diff line number Diff line Loading @@ -113,6 +113,16 @@ BUILD_HOST_DALVIK_STATIC_JAVA_LIBRARY := $(BUILD_SYSTEM)/host_dalvik_static_java SHOW_COMMANDS:= $(filter showcommands,$(MAKECMDGOALS)) hide := $(if $(SHOW_COMMANDS),,@) ################################################################ # Tools needed in product configuration makefiles. ################################################################ NORMALIZE_PATH := build/tools/normalize_path.py # $(1): the paths to be normalized define normalize-paths $(if $(1),$(shell $(NORMALIZE_PATH) $(1))) endef # ############################################################### # Set common values # ############################################################### Loading Loading @@ -550,8 +560,6 @@ else MD5SUM:=md5sum endif NORMALIZE_PATH := build/tools/normalize_path.py APICHECK_CLASSPATH := $(HOST_JDK_TOOLS_JAR) APICHECK_CLASSPATH := $(APICHECK_CLASSPATH):$(HOST_OUT_JAVA_LIBRARIES)/doclava$(COMMON_JAVA_PACKAGE_SUFFIX) APICHECK_CLASSPATH := $(APICHECK_CLASSPATH):$(HOST_OUT_JAVA_LIBRARIES)/jsilver$(COMMON_JAVA_PACKAGE_SUFFIX) Loading
core/product.mk +5 −2 Original line number Diff line number Diff line Loading @@ -133,11 +133,14 @@ endef # 3. Records that we've visited this node, in ALL_PRODUCTS # define inherit-product $(if $(findstring ../,$(1)),\ $(eval np := $(call normalize-paths,$(1))),\ $(eval np := $(strip $(1))))\ $(foreach v,$(_product_var_list), \ $(eval $(v) := $($(v)) $(INHERIT_TAG)$(strip $(1)))) \ $(eval $(v) := $($(v)) $(INHERIT_TAG)$(np))) \ $(eval inherit_var := \ PRODUCTS.$(strip $(word 1,$(_include_stack))).INHERITS_FROM) \ $(eval $(inherit_var) := $(sort $($(inherit_var)) $(strip $(1)))) \ $(eval $(inherit_var) := $(sort $($(inherit_var)) $(np))) \ $(eval inherit_var:=) \ $(eval ALL_PRODUCTS := $(sort $(ALL_PRODUCTS) $(word 1,$(_include_stack)))) endef Loading
tools/normalize_path.py +6 −1 Original line number Diff line number Diff line Loading @@ -14,11 +14,16 @@ # See the License for the specific language governing permissions and # limitations under the License. """ Normalize and output paths read from stdin. Normalize and output paths from arguments, or stdin if no arguments provided. """ import os.path import sys if len(sys.argv) > 1: for p in sys.argv[1:]: print os.path.normpath(p) sys.exit(0) for line in sys.stdin: print os.path.normpath(line.strip())