Android-x86
Fork

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-toybox: コミット

external/toybox


コミットメタ情報

リビジョン2f848f6b9b75dfd99133c7003f88e60dbee5de5b (tree)
日時2017-04-14 13:10:26
作者Chih-Wei Huang <cwhuang@linu...>
コミッターChih-Wei Huang

ログメッセージ

Fix phony dependency

It's wrong to let the toybox executable depend on a phony target
toybox_links. It makes "Nothing to be done" not work.

Rewrite the rules by LOCAL_POST_INSTALL_CMD like the toolbox does.

変更サマリ

差分

--- a/Android.mk
+++ b/Android.mk
@@ -268,7 +268,7 @@ LOCAL_MODULE := toybox
268268
269269 # for dumping the list of toys
270270 TOYBOX_INSTLIST := $(HOST_OUT_EXECUTABLES)/toybox-instlist
271-LOCAL_ADDITIONAL_DEPENDENCIES := toybox_links
271+LOCAL_ADDITIONAL_DEPENDENCIES := $(TOYBOX_INSTLIST)
272272
273273 # we still want a link for ls/ps, but the toolbox version needs to
274274 # stick around for compatibility reasons, for now.
@@ -279,18 +279,11 @@ TOYS_FOR_XBIN := ls ps
279279 # image though.
280280 TOYS_WITHOUT_LINKS := blkid traceroute6
281281
282-include $(BUILD_EXECUTABLE)
283-
284-toybox_links: $(TOYBOX_INSTLIST) toybox
285-toybox_links: TOY_LIST=$(shell $(TOYBOX_INSTLIST))
286-toybox_links: TOYBOX_BINARY := $(TARGET_OUT)/bin/toybox
287-toybox_links:
288- @echo -e ${CL_CYN}"Generate Toybox links:"${CL_RST} $(TOY_LIST)
289- @mkdir -p $(TARGET_OUT)/bin
290- @mkdir -p $(TARGET_OUT)/xbin
291- $(hide) $(foreach t,$(filter-out $(TOYS_FOR_XBIN) $(TOYS_WITHOUT_LINKS),$(TOY_LIST)),ln -sf toybox $(TARGET_OUT_EXECUTABLES)/$(t);)
292- $(hide) $(foreach t,$(TOYS_FOR_XBIN),ln -sf /system/bin/toybox $(TARGET_OUT_OPTIONAL_EXECUTABLES)/$(t);)
282+LOCAL_POST_INSTALL_CMD := $(hide) \
283+ echo "Generate Toybox links:" $$($(TOYBOX_INSTLIST)); \
284+ $(TOYBOX_INSTLIST) | grep -vFx -f <(tr ' ' '\n' <<< '$(TOYS_FOR_XBIN) $(TOYS_WITHOUT_LINKS)') | xargs -I'{}' ln -sf toybox '$(TARGET_OUT_EXECUTABLES)/{}'
293285
286+include $(BUILD_EXECUTABLE)
294287
295288 # This is used by the recovery system
296289 include $(CLEAR_VARS)
旧リポジトリブラウザで表示