Loading core/definitions.mk +13 −0 Original line number Diff line number Diff line Loading @@ -1470,6 +1470,13 @@ define copy-file-to-target-with-cp $(hide) cp -fp $< $@ endef # The same as copy-file-to-target, but strip out "# comment"-style # comments (for config files and such). define copy-file-to-target-strip-comments @mkdir -p $(dir $@) $(hide) sed -e 's/#.*$$//' -e 's/[ \t]*$$//' -e '/^$$/d' < $< > $@ endef # The same as copy-file-to-target, but don't preserve # the old modification time. define copy-file-to-new-target Loading @@ -1490,6 +1497,12 @@ define transform-prebuilt-to-target $(copy-file-to-target) endef # Copy a prebuilt file to a target location, stripping "# comment" comments. define transform-prebuilt-to-target-strip-comments @echo "$(if $(PRIVATE_IS_HOST_MODULE),host,target) Prebuilt: $(PRIVATE_MODULE) ($@)" $(copy-file-to-target-strip-comments) endef ########################################################### ## On some platforms (MacOS), after copying a static Loading core/prebuilt.mk +7 −1 Original line number Diff line number Diff line Loading @@ -26,8 +26,14 @@ else prebuilt_module_is_a_library := endif ifneq ($(LOCAL_PREBUILT_STRIP_COMMENTS),) $(LOCAL_BUILT_MODULE) : $(LOCAL_PATH)/$(LOCAL_SRC_FILES) $(transform-prebuilt-to-target-strip-comments) else $(LOCAL_BUILT_MODULE) : $(LOCAL_PATH)/$(LOCAL_SRC_FILES) | $(ACP) $(transform-prebuilt-to-target) endif ifneq ($(prebuilt_module_is_a_library),) ifneq ($(LOCAL_IS_HOST_MODULE),) $(transform-host-ranlib-copy-hack) Loading Loading
core/definitions.mk +13 −0 Original line number Diff line number Diff line Loading @@ -1470,6 +1470,13 @@ define copy-file-to-target-with-cp $(hide) cp -fp $< $@ endef # The same as copy-file-to-target, but strip out "# comment"-style # comments (for config files and such). define copy-file-to-target-strip-comments @mkdir -p $(dir $@) $(hide) sed -e 's/#.*$$//' -e 's/[ \t]*$$//' -e '/^$$/d' < $< > $@ endef # The same as copy-file-to-target, but don't preserve # the old modification time. define copy-file-to-new-target Loading @@ -1490,6 +1497,12 @@ define transform-prebuilt-to-target $(copy-file-to-target) endef # Copy a prebuilt file to a target location, stripping "# comment" comments. define transform-prebuilt-to-target-strip-comments @echo "$(if $(PRIVATE_IS_HOST_MODULE),host,target) Prebuilt: $(PRIVATE_MODULE) ($@)" $(copy-file-to-target-strip-comments) endef ########################################################### ## On some platforms (MacOS), after copying a static Loading
core/prebuilt.mk +7 −1 Original line number Diff line number Diff line Loading @@ -26,8 +26,14 @@ else prebuilt_module_is_a_library := endif ifneq ($(LOCAL_PREBUILT_STRIP_COMMENTS),) $(LOCAL_BUILT_MODULE) : $(LOCAL_PATH)/$(LOCAL_SRC_FILES) $(transform-prebuilt-to-target-strip-comments) else $(LOCAL_BUILT_MODULE) : $(LOCAL_PATH)/$(LOCAL_SRC_FILES) | $(ACP) $(transform-prebuilt-to-target) endif ifneq ($(prebuilt_module_is_a_library),) ifneq ($(LOCAL_IS_HOST_MODULE),) $(transform-host-ranlib-copy-hack) Loading