OSDN Git Service

Merge remote-tracking branch 'toybox/master' into HEAD
[android-x86/external-toybox.git] / Android.mk
index 26b54ee..7d46027 100644 (file)
@@ -25,8 +25,9 @@ LOCAL_PATH := $(call my-dir)
 #  git merge toybox/master
 #  mm -j32
 #  # (Make any necessary Android.mk changes and test the new toybox.)
+#  repo upload .
+#  git push aosp HEAD:refs/for/master  # Push to gerrit for review.
 #  git push aosp HEAD:master  # Push directly, avoiding gerrit.
-#  git push aosp HEAD:refs/for/master  # Push to gerrit.
 #
 #  # Now commit any necessary Android.mk changes like normal:
 #  repo start post-sync .
@@ -53,6 +54,7 @@ LOCAL_SRC_FILES := \
     lib/help.c \
     lib/interestingtimes.c \
     lib/lib.c \
+    lib/linestack.c \
     lib/llist.c \
     lib/net.c \
     lib/portability.c \
@@ -86,6 +88,7 @@ LOCAL_SRC_FILES := \
     toys/other/clear.c \
     toys/other/dos2unix.c \
     toys/other/fallocate.c \
+    toys/other/flock.c \
     toys/other/free.c \
     toys/other/freeramdisk.c \
     toys/other/fsfreeze.c \
@@ -119,7 +122,6 @@ LOCAL_SRC_FILES := \
     toys/other/stat.c \
     toys/other/swapoff.c \
     toys/other/swapon.c \
-    toys/other/switch_root.c \
     toys/other/sysctl.c \
     toys/other/tac.c \
     toys/other/taskset.c \
@@ -136,11 +138,9 @@ LOCAL_SRC_FILES := \
     toys/pending/expr.c \
     toys/pending/lsof.c \
     toys/pending/more.c \
-    toys/pending/pgrep.c \
     toys/pending/netstat.c \
     toys/pending/route.c \
     toys/pending/tar.c \
-    toys/pending/top.c \
     toys/pending/tr.c \
     toys/pending/traceroute.c \
     toys/posix/basename.c \
@@ -178,6 +178,7 @@ LOCAL_SRC_FILES := \
     toys/posix/paste.c \
     toys/posix/patch.c \
     toys/posix/printf.c \
+    toys/posix/ps.c \
     toys/posix/pwd.c \
     toys/posix/renice.c \
     toys/posix/rm.c \
@@ -193,6 +194,7 @@ LOCAL_SRC_FILES := \
     toys/posix/touch.c \
     toys/posix/true.c \
     toys/posix/tty.c \
+    toys/posix/ulimit.c \
     toys/posix/uname.c \
     toys/posix/uniq.c \
     toys/posix/wc.c \
@@ -210,7 +212,10 @@ LOCAL_CFLAGS += \
     -ffunction-sections -fdata-sections \
     -fno-asynchronous-unwind-tables \
 
-toybox_version := $(shell git -C $(LOCAL_PATH) rev-parse --short=12 HEAD 2>/dev/null)-android
+toybox_upstream_version := $(shell awk 'match($$0, /TOYBOX_VERSION.*"(.*)"/, ary) {print ary[1]}' $(LOCAL_PATH)/main.c)
+toybox_sha := $(shell git -C $(LOCAL_PATH) rev-parse --short=12 HEAD 2>/dev/null)
+
+toybox_version := $(toybox_upstream_version)-$(toybox_sha)-android
 LOCAL_CFLAGS += -DTOYBOX_VERSION='"$(toybox_version)"'
 
 LOCAL_CLANG := true
@@ -223,9 +228,9 @@ LOCAL_CXX_STL := none
 
 LOCAL_MODULE := toybox
 
-# dupes: dd df du
+# dupes: dd
 # useless?: freeramdisk fsfreeze install makedevs mkfifo nbd-client
-#           partprobe pivot_root pwdx rev rfkill switch_root tty vconfig
+#           partprobe pivot_root pwdx rev rfkill vconfig
 # prefer BSD netcat instead?: nc netcat
 # prefer efs2progs instead?: blkid chattr lsattr
 
@@ -250,9 +255,11 @@ ALL_TOOLS := \
     cpio \
     cut \
     date \
+    df \
     dirname \
     dmesg \
     dos2unix \
+    du \
     echo \
     env \
     expand \
@@ -260,6 +267,7 @@ ALL_TOOLS := \
     fallocate \
     false \
     find \
+    flock \
     free \
     getenforce \
     getprop \
@@ -343,6 +351,7 @@ ALL_TOOLS := \
     true \
     truncate \
     tty \
+    ulimit \
     umount \
     uname \
     uniq \