From e394fc5f5f254fd9b7a16306a84c19d9d9ae886f Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Mon, 25 Mar 2024 10:07:07 +0100 Subject: [PATCH] mk->bp Change-Id: Ife6542c6d3329b4f2797601a4bc2e50469a89dec --- Android.bp | 168 ++++++++++++++++++++++++++++++++++++++++ Android.mk | 119 ---------------------------- builtins/Android.mk | 89 --------------------- lib/Android.mk | 2 - lib/glob/Android.mk | 37 --------- lib/readline/Android.mk | 112 --------------------------- lib/sh/Android.mk | 107 ------------------------- lib/tilde/Android.mk | 29 ------- 8 files changed, 168 insertions(+), 495 deletions(-) create mode 100644 Android.bp delete mode 100644 Android.mk delete mode 100644 builtins/Android.mk delete mode 100644 lib/Android.mk delete mode 100644 lib/glob/Android.mk delete mode 100644 lib/readline/Android.mk delete mode 100644 lib/sh/Android.mk delete mode 100644 lib/tilde/Android.mk diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..d307e28 --- /dev/null +++ b/Android.bp @@ -0,0 +1,168 @@ +prebuilt_etc { + name: "bash-etc", + srcs: ["etc/*"], + sub_dir: "bash", + system_ext_specific: true, +} + +cc_binary { + name: "bash", + srcs: [ + "builtins/alias.c", + "builtins/bashgetopt.c", + "builtins/bind.c", + "builtins/break.c", + "builtins/builtin.c", + "builtins/builtins.c", + "builtins/caller.c", + "builtins/cd.c", + "builtins/colon.c", + "builtins/command.c", + "builtins/common.c", + "builtins/complete.c", + "builtins/declare.c", + "builtins/echo.c", + "builtins/enable.c", + "builtins/eval.c", + "builtins/evalfile.c", + "builtins/evalstring.c", + "builtins/exec.c", + "builtins/exit.c", + "builtins/fc.c", + "builtins/fg_bg.c", + "builtins/getopt.c", + "builtins/getopts.c", + "builtins/hash.c", + "builtins/help.c", + "builtins/history.c", + "builtins/inlib.c", + "builtins/jobs.c", + "builtins/kill.c", + "builtins/let.c", + "builtins/mapfile.c", + "builtins/printf.c", + "builtins/pushd.c", + "builtins/read.c", + "builtins/return.c", + "builtins/set.c", + "builtins/setattr.c", + "builtins/shift.c", + "builtins/shopt.c", + "builtins/source.c", + "builtins/suspend.c", + "builtins/test.c", + "builtins/times.c", + "builtins/trap.c", + "builtins/type.c", + "builtins/ulimit.c", + "builtins/umask.c", + "builtins/wait.c", + "lib/glob/glob.c", + "lib/glob/gmisc.c", + "lib/glob/smatch.c", + "lib/glob/strmatch.c", + "lib/glob/xmbsrtowcs.c", + "lib/readline/bind.c", + "lib/readline/callback.c", + "lib/readline/colors.c", + "lib/readline/compat.c", + "lib/readline/complete.c", + "lib/readline/display.c", + "lib/readline/funmap.c", + "lib/readline/histexpand.c", + "lib/readline/histfile.c", + "lib/readline/history.c", + "lib/readline/histsearch.c", + "lib/readline/input.c", + "lib/readline/isearch.c", + "lib/readline/keymaps.c", + "lib/readline/kill.c", + "lib/readline/macro.c", + "lib/readline/mbutil.c", + "lib/readline/misc.c", + "lib/readline/nls.c", + "lib/readline/parens.c", + "lib/readline/parse-colors.c", + "lib/readline/readline.c", + "lib/readline/rltty.c", + "lib/readline/savestring.c", + "lib/readline/search.c", + "lib/readline/signals.c", + "lib/readline/terminal.c", + "lib/readline/text.c", + "lib/readline/undo.c", + "lib/readline/util.c", + "lib/readline/vi_mode.c", + "lib/sh/*.c", + "lib/tilde/*.c", + "alias.c", + "array.c", + "arrayfunc.c", + "assoc.c", + "bashhist.c", + "bashline.c", + "bracecomp.c", + "braces.c", + "copy_cmd.c", + "dispose_cmd.c", + "error.c", + "eval.c", + "execute_cmd.c", + "expr.c", + "findcmd.c", + "flags.c", + "general.c", + "hashcmd.c", + "hashlib.c", + "input.c", + "jobs.c", + "list.c", + "locale.c", + "mailcheck.c", + "make_cmd.c", + "pathexp.c", + "pcomplete.c", + "pcomplib.c", + "print_cmd.c", + "redir.c", + "shell.c", + "sig.c", + "siglist.c", + "stringlib.c", + "subst.c", + "syntax.c", + "test.c", + "trap.c", + "unwind_prot.c", + "variables.c", + "version.c", + "xmalloc.c", + "y.tab.c", + ], + cflags: [ + "-DHAVE_CONFIG_H", + "-DPROGRAM=\"bash\"", + "-DPACKAGE=\"bash\"", + "-DCONF_HOSTTYPE=\"arm\"", + "-DCONF_OSTYPE=\"android-eabi\"", + "-DCONF_MACHTYPE=\"arm-android-eabi\"", + "-DCONF_VENDOR=\"unknown\"", + "-DLOCALEDIR=\"/data/locale\"", + "-DSHELL", + "-Wno-error", + "-Wno-implicit-function-declaration", + "-Wno-int-conversion", + "-Wno-missing-field-initializers", + ], + local_include_dirs: [ + "include", + "lib", + ], + shared_libs: [ + "libncurses", + ], + required: [ + "bash-etc", + ], + system_ext_specific: true, +} diff --git a/Android.mk b/Android.mk deleted file mode 100644 index ffab6a0..0000000 --- a/Android.mk +++ /dev/null @@ -1,119 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -# ======================================================== -# bash -# ======================================================== -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - alias.c \ - array.c \ - arrayfunc.c \ - assoc.c \ - bashhist.c \ - bashline.c \ - bracecomp.c \ - braces.c \ - copy_cmd.c \ - dispose_cmd.c \ - error.c \ - eval.c \ - execute_cmd.c \ - expr.c \ - findcmd.c \ - flags.c \ - general.c \ - hashcmd.c \ - hashlib.c \ - input.c \ - jobs.c \ - list.c \ - locale.c \ - mailcheck.c \ - make_cmd.c \ - pathexp.c \ - pcomplete.c \ - pcomplib.c \ - print_cmd.c \ - redir.c \ - shell.c \ - sig.c \ - siglist.c \ - stringlib.c \ - subst.c \ - syntax.c \ - test.c \ - trap.c \ - unwind_prot.c \ - variables.c \ - version.c \ - xmalloc.c \ - y.tab.c - -LOCAL_C_INCLUDES += \ - $(LOCAL_PATH) \ - $(LOCAL_PATH)/include \ - $(LOCAL_PATH)/lib -LOCAL_CFLAGS += \ - -DHAVE_CONFIG_H \ - -DPROGRAM=\"bash\" \ - -DPACKAGE=\"bash\" \ - -DCONF_HOSTTYPE=\"arm\" \ - -DCONF_OSTYPE=\"android-eabi\" \ - -DCONF_MACHTYPE=\"arm-android-eabi\" \ - -DCONF_VENDOR=\"unknown\" \ - -DLOCALEDIR=\"/data/locale\" \ - -DSHELL -LOCAL_SHARED_LIBRARIES += \ - libncurses -LOCAL_STATIC_LIBRARIES += \ - libbuiltins \ - libglob \ - libsh \ - libtilde \ - libhistory \ - libreadline -LOCAL_CFLAGS += \ - -Wno-char-subscripts \ - -Wno-format \ - -Wno-implicit-function-declaration \ - -Wno-incompatible-pointer-types \ - -Wno-incompatible-pointer-types-discards-qualifiers \ - -Wno-missing-field-initializers \ - -Wno-non-literal-null-conversion \ - -Wno-parentheses \ - -Wno-sign-compare \ - -Wno-sometimes-uninitialized \ - -Wno-switch \ - -Wno-unused-function \ - -Wno-unused-label \ - -Wno-unused-parameter \ - -Wno-unused-variable \ - -Wno-user-defined-warnings - -LOCAL_MODULE := bash -LOCAL_MODULE_TAGS := optional - -LOCAL_SYSTEM_EXT_MODULE := true - -include $(BUILD_EXECUTABLE) - -# ======================================================== -# bash configs -# ======================================================== -etc_files := $(wildcard $(LOCAL_PATH)/etc/*) - -BASH_ETC := $(TARGET_OUT_SYSTEM_EXT_ETC)/$(LOCAL_MODULE) -BASH_CONFIGS := $(addprefix $(BASH_ETC)/,$(notdir $(etc_files))) -$(BASH_CONFIGS): $(BASH_ETC)/%: $(LOCAL_PATH)/etc/% | $(LOCAL_BUILT_MODULE) - @echo "Install: $@ -> $(BASH_ETC)" - @mkdir -p $(dir $@) - $(hide) cp $< $@ - -ALL_DEFAULT_INSTALLED_MODULES += $(BASH_CONFIGS) - -ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \ - $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(BASH_CONFIGS) - -# ======================================================== -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/builtins/Android.mk b/builtins/Android.mk deleted file mode 100644 index c7345eb..0000000 --- a/builtins/Android.mk +++ /dev/null @@ -1,89 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -# ======================================================== -# libbuiltins.a -# ======================================================== -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - alias.c \ - bashgetopt.c \ - bind.c \ - break.c \ - builtin.c \ - builtins.c \ - caller.c \ - cd.c \ - colon.c \ - command.c \ - common.c \ - complete.c \ - declare.c \ - echo.c \ - enable.c \ - eval.c \ - evalfile.c \ - evalstring.c \ - exec.c \ - exit.c \ - fc.c \ - fg_bg.c \ - gen-helpfiles.c \ - getopt.c \ - getopts.c \ - hash.c \ - help.c \ - history.c \ - inlib.c \ - jobs.c \ - kill.c \ - let.c \ - mapfile.c \ - printf.c \ - psize.c \ - pushd.c \ - read.c \ - return.c \ - setattr.c \ - set.c \ - shift.c \ - shopt.c \ - source.c \ - suspend.c \ - test.c \ - times.c \ - tmpbuiltins.c \ - trap.c \ - type.c \ - ulimit.c \ - umask.c \ - wait.c - -LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/../ \ - $(LOCAL_PATH)/../include \ - $(LOCAL_PATH)/../lib -LOCAL_CFLAGS += \ - -DHAVE_CONFIG_H \ - -DPROGRAM=\"bash\" \ - -DCONF_HOSTTYPE=\"arm\" \ - -DCONF_OSTYPE=\"android-eabi\" \ - -DCONF_MACHTYPE=\"arm-android-eabi\" \ - -DCONF_VENDOR=\"unknown\" -LOCAL_CFLAGS += \ - -Wno-implicit-function-declaration \ - -Wno-incompatible-pointer-types-discards-qualifiers \ - -Wno-knr-promoted-parameter \ - -Wno-parentheses \ - -Wno-sign-compare \ - -Wno-sometimes-uninitialized \ - -Wno-unused-function \ - -Wno-unused-parameter \ - -Wno-unused-variable - -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE := libbuiltins -include $(BUILD_STATIC_LIBRARY) - -# ======================================================== -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/lib/Android.mk b/lib/Android.mk deleted file mode 100644 index 6361f9b..0000000 --- a/lib/Android.mk +++ /dev/null @@ -1,2 +0,0 @@ -LOCAL_PATH := $(call my-dir) -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/lib/glob/Android.mk b/lib/glob/Android.mk deleted file mode 100644 index 02dabe8..0000000 --- a/lib/glob/Android.mk +++ /dev/null @@ -1,37 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -# ======================================================== -# libglob.a -# ======================================================== -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - glob.c \ - smatch.c \ - strmatch.c \ - xmbsrtowcs.c \ - gmisc.c - -LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/../.. \ - $(LOCAL_PATH)/../../include \ - $(LOCAL_PATH)/../../lib - -LOCAL_CFLAGS += \ - -DHAVE_CONFIG_H - -LOCAL_CFLAGS += \ - -Wno-parentheses \ - -Wno-sign-compare \ - -Wno-unused-label \ - -Wno-unused-parameter \ - -Wno-unused-variable - -LOCAL_MODULE_TAGS := optional - -LOCAL_MODULE := libglob - -include $(BUILD_STATIC_LIBRARY) - -# ======================================================== -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/lib/readline/Android.mk b/lib/readline/Android.mk deleted file mode 100644 index 28882ac..0000000 --- a/lib/readline/Android.mk +++ /dev/null @@ -1,112 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -# ======================================================== -# libhistory.a -# ======================================================== -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - history.c \ - histexpand.c \ - histfile.c \ - histsearch.c \ - shell.c \ - savestring.c \ - mbutil.c \ - xmalloc.c - -LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/../.. \ - $(LOCAL_PATH)/../../include \ - $(LOCAL_PATH)/../../lib - -LOCAL_CFLAGS += \ - -DHAVE_CONFIG_H - -LOCAL_CFLAGS += \ - -Wno-incompatible-pointer-types-discards-qualifiers \ - -Wno-missing-braces \ - -Wno-parentheses \ - -Wno-sometimes-uninitialized \ - -Wno-sign-compare \ - -Wno-unused-function \ - -Wno-unused-parameter \ - -Wno-unused-variable \ - -Wno-user-defined-warnings - -LOCAL_MODULE := libhistory - -LOCAL_MODULE_TAGS := optional - -include $(BUILD_STATIC_LIBRARY) - -# ======================================================== -# libreadline.a -# ======================================================== -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - readline.c \ - vi_mode.c \ - funmap.c \ - keymaps.c \ - parens.c \ - search.c \ - rltty.c \ - colors.c \ - parse-colors.c \ - complete.c \ - bind.c \ - isearch.c \ - display.c \ - signals.c \ - util.c \ - kill.c \ - undo.c \ - macro.c \ - input.c \ - callback.c \ - terminal.c \ - text.c \ - nls.c \ - misc.c \ - history.c \ - histexpand.c \ - histfile.c \ - histsearch.c \ - shell.c \ - savestring.c \ - mbutil.c \ - tilde.c \ - xmalloc.c \ - compat.c - -LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/../.. \ - $(LOCAL_PATH)/../../include \ - $(LOCAL_PATH)/../../lib - -LOCAL_CFLAGS += \ - -DHAVE_CONFIG_H - -LOCAL_CFLAGS += \ - -Wno-incompatible-pointer-types-discards-qualifiers \ - -Wno-missing-braces \ - -Wno-parentheses \ - -Wno-sometimes-uninitialized \ - -Wno-sign-compare \ - -Wno-uninitialized \ - -Wno-unused-function \ - -Wno-unused-label \ - -Wno-unused-parameter \ - -Wno-unused-variable \ - -Wno-user-defined-warnings - -LOCAL_MODULE := libreadline - -LOCAL_MODULE_TAGS := optional - -include $(BUILD_STATIC_LIBRARY) - -# ======================================================== -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/lib/sh/Android.mk b/lib/sh/Android.mk deleted file mode 100644 index 63887b6..0000000 --- a/lib/sh/Android.mk +++ /dev/null @@ -1,107 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -# ======================================================== -# libsh.a -# ======================================================== -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - casemod.c \ - clktck.c \ - clock.c \ - dprintf.c \ - eaccess.c \ - fmtullong.c \ - fmtulong.c \ - fmtumax.c \ - fnxform.c \ - fpurge.c \ - getcwd.c \ - getenv.c \ - gettimeofday.c \ - inet_aton.c \ - input_avail.c \ - itos.c \ - mailstat.c \ - makepath.c \ - mbscasecmp.c \ - mbschr.c \ - mbscmp.c \ - mktime.c \ - netconn.c \ - netopen.c \ - oslib.c \ - pathcanon.c \ - pathphys.c \ - random.c \ - rename.c \ - setlinebuf.c \ - shmatch.c \ - shmbchar.c \ - shquote.c \ - shtty.c \ - snprintf.c \ - spell.c \ - strcasecmp.c \ - strcasestr.c \ - strchrnul.c \ - strdup.c \ - strerror.c \ - strftime.c \ - stringlist.c \ - stringvec.c \ - strnlen.c \ - strpbrk.c \ - strstr.c \ - strtod.c \ - strtoimax.c \ - strtol.c \ - strtoll.c \ - strtoul.c \ - strtoull.c \ - strtoumax.c \ - strtrans.c \ - times.c \ - timeval.c \ - tmpfile.c \ - uconvert.c \ - ufuncs.c \ - unicode.c \ - utf8.c \ - vprint.c \ - wcsdup.c \ - wcsnwidth.c \ - wcswidth.c \ - winsize.c \ - zcatfd.c \ - zgetline.c \ - zmapfd.c \ - zread.c \ - zwrite.c - -LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/../.. \ - $(LOCAL_PATH)/../../include \ - $(LOCAL_PATH)/../../lib \ - external/clearsilver \ - external/clearsilver/util/regex - -LOCAL_CFLAGS += \ - -DHAVE_CONFIG_H - -LOCAL_CFLAGS += \ - -Wno-missing-braces \ - -Wno-parentheses \ - -Wno-sign-compare \ - -Wno-unused-function \ - -Wno-unused-parameter \ - -Wno-unused-variable - -LOCAL_MODULE := libsh - -LOCAL_MODULE_TAGS := optional - -include $(BUILD_STATIC_LIBRARY) - -# ======================================================== -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/lib/tilde/Android.mk b/lib/tilde/Android.mk deleted file mode 100644 index c322aba..0000000 --- a/lib/tilde/Android.mk +++ /dev/null @@ -1,29 +0,0 @@ -LOCAL_PATH:= $(call my-dir) - -# ======================================================== -# libtilde.a -# ======================================================== -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - tilde.c - -LOCAL_C_INCLUDES += \ - $(LOCAL_PATH)/../.. \ - $(LOCAL_PATH)/../../include \ - $(LOCAL_PATH)/../../lib - -LOCAL_CFLAGS += \ - -DHAVE_CONFIG_H - -LOCAL_CFLAGS += \ - -Wno-parentheses - -LOCAL_MODULE := libtilde - -LOCAL_MODULE_TAGS := optional - -include $(BUILD_STATIC_LIBRARY) - -# ======================================================== -include $(call all-makefiles-under,$(LOCAL_PATH))