Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-mksh: Commit

external/mksh


Commit MetaInfo

Révisione3e35101c0d9ec0bb6d62f6d658a053113bf3904 (tree)
l'heure2017-08-02 19:03:12
AuteurJaap Jan Meijer <jjmeijer88@gmai...>
CommiterJaap Jan Meijer

Message de Log

Merge remote-tracking branch 'los/cm-14.1' into nougat-x86

Change Summary

Modification

--- a/Android.mk
+++ b/Android.mk
@@ -4,52 +4,15 @@
44
55 LOCAL_PATH := $(call my-dir)
66
7-
8-# /system/etc/mkshrc
9-
10-include $(CLEAR_VARS)
11-
12-LOCAL_MODULE := mkshrc
13-LOCAL_MODULE_CLASS := ETC
14-LOCAL_MODULE_PATH := $(TARGET_OUT)/etc
15-LOCAL_SRC_FILES := $(LOCAL_MODULE)
16-include $(BUILD_PREBUILT)
17-
18-
19-# /system/bin/sh
20-
21-include $(CLEAR_VARS)
22-
23-LOCAL_MODULE := sh
24-LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
25-
26-# mksh source files
27-LOCAL_SRC_FILES := \
28- src/lalloc.c src/edit.c src/eval.c src/exec.c \
29- src/expr.c src/funcs.c src/histrap.c src/jobs.c \
30- src/lex.c src/main.c src/misc.c src/shf.c \
31- src/syn.c src/tree.c src/var.c
32-
33-LOCAL_SYSTEM_SHARED_LIBRARIES := libc
34-
35-LOCAL_C_INCLUDES := $(LOCAL_PATH)/src
36-
37-# Additional flags first...
38-LOCAL_CFLAGS += \
39- -DMKSH_DEFAULT_PROFILEDIR=\"/system/etc\" \
40- -DMKSHRC_PATH=\"/system/etc/mkshrc\" \
41- -DMKSH_DEFAULT_EXECSHELL=\"/system/bin/sh\" \
42- -DMKSH_DEFAULT_TMPDIR=\"/data/local\" \
43-
447 # ...then from Makefrag.inc: CFLAGS...
45-LOCAL_CFLAGS += \
8+common_cflags += \
469 -Wno-deprecated-declarations \
4710 -fno-asynchronous-unwind-tables \
4811 -fno-strict-aliasing \
4912 -fstack-protector -fwrapv \
5013
5114 # ...and CPPFLAGS.
52-LOCAL_CFLAGS += \
15+common_cflags += \
5316 -DDEBUG_LEAKS -DMKSH_ASSUME_UTF8 -DMKSH_CONSERVATIVE_FDS \
5417 -DMKSH_DONT_EMIT_IDSTRING -DMKSH_NOPWNAM -DMKSH_BUILDSH \
5518 -D_GNU_SOURCE -DSETUID_CAN_FAIL_WITH_EAGAIN \
@@ -82,4 +45,49 @@ LOCAL_CFLAGS += \
8245 -DHAVE_SYS_ERRLIST_DECL=0 -DHAVE_SYS_SIGLIST_DECL=1 \
8346 -DHAVE_PERSISTENT_HISTORY=0 -DMKSH_BUILD_R=521
8447
48+common_src_files := \
49+ src/lalloc.c src/edit.c src/eval.c src/exec.c \
50+ src/expr.c src/funcs.c src/histrap.c src/jobs.c \
51+ src/lex.c src/misc.c src/shf.c \
52+ src/syn.c src/tree.c src/var.c
53+
54+
55+# /system/etc/mkshrc
56+include $(CLEAR_VARS)
57+LOCAL_MODULE := mkshrc
58+LOCAL_MODULE_CLASS := ETC
59+LOCAL_MODULE_PATH := $(TARGET_OUT)/etc
60+LOCAL_SRC_FILES := $(LOCAL_MODULE)
61+include $(BUILD_PREBUILT)
62+
63+
64+# /system/bin/sh
65+include $(CLEAR_VARS)
66+LOCAL_MODULE := sh
67+LOCAL_MODULE_TAGS := optional
68+LOCAL_SRC_FILES := $(common_src_files) src/main.c
69+LOCAL_SYSTEM_SHARED_LIBRARIES := libc
70+LOCAL_CFLAGS := $(common_cflags)
71+LOCAL_CFLAGS += \
72+ -DMKSH_DEFAULT_PROFILEDIR=\"/system/etc\" \
73+ -DMKSHRC_PATH=\"/system/etc/mkshrc\" \
74+ -DMKSH_DEFAULT_EXECSHELL=\"/system/bin/sh\" \
75+ -DMKSH_DEFAULT_TMPDIR=\"/data/local\"
76+LOCAL_CLANG := true
8577 include $(BUILD_EXECUTABLE)
78+
79+# recovery shell: /sbin/sh
80+# this is built into a single-call binary
81+include $(CLEAR_VARS)
82+LOCAL_MODULE := libmksh_static
83+LOCAL_MODULE_TAGS := optional
84+LOCAL_SRC_FILES := $(common_src_files) src/main.c
85+LOCAL_CFLAGS := $(common_cflags)
86+LOCAL_CFLAGS += -Dmain=mksh_main
87+LOCAL_CFLAGS += \
88+ -DMKSH_DEFAULT_PROFILEDIR=\"/etc\" \
89+ -DMKSHRC_PATH=\"/etc/mkshrc\" \
90+ -DMKSH_DEFAULT_EXECSHELL=\"/sbin/sh\" \
91+ -DMKSH_DEFAULT_TMPDIR=\"/tmp\"
92+LOCAL_CLANG := true
93+include $(BUILD_STATIC_LIBRARY)
--- a/mkshrc
+++ b/mkshrc
@@ -6,6 +6,7 @@
66 #
77 # Support: https://launchpad.net/mksh
88
9+: ${HOSTNAME:=$(getprop ro.cm.device)}
910 : ${HOSTNAME:=$(getprop ro.product.device)}
1011 : ${HOSTNAME:=android}
1112 : ${TMPDIR:=/data/local/tmp}
@@ -24,3 +25,7 @@ PS4='[$EPOCHREALTIME] '; PS1='${|
2425
2526 return $e
2627 }$HOSTNAME:${PWD:-?} '"$PS1 "
28+
29+if [ "z$ANDROID_SOCKET_adbd" != "z" ]; then
30+ resize
31+fi
--- a/src/dot.mkshrc
+++ b/src/dot.mkshrc
@@ -28,7 +28,7 @@ case ${KSH_VERSION:-} in
2828 *) return 0 ;;
2929 esac
3030
31-PS1='#'; (( USER_ID )) && PS1='$'; \: "${TERM:=vt100}${HOSTNAME:=$(\ulimit -c \
31+PS1='#'; (( USER_ID )) && PS1='$'; \: "${TERM:=linux}${HOSTNAME:=$(\ulimit -c \
3232 0; hostname 2>/dev/null)}${EDITOR:=/bin/ed}${USER:=$(\ulimit -c 0; id -un \
3333 2>/dev/null || \echo \?)}${MKSH:=$(\builtin whence -p mksh)}"
3434 HOSTNAME=${HOSTNAME%%*([ ]).*}; HOSTNAME=${HOSTNAME##*([ ])}
Afficher sur ancien navigateur de dépôt.