summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYifan Hong2017-05-22 20:08:02 -0500
committerYifan Hong2017-05-22 20:08:02 -0500
commit49641ba865074a574436ac44201eca3a8afc2757 (patch)
treef2af7e70e21987bda79c4bcaeb54efa534b412be /toolbox
parent7d213d08e78073d9f217271c1aaeb6d6f20c8eb4 (diff)
downloadplatform-system-core-49641ba865074a574436ac44201eca3a8afc2757.tar.gz
platform-system-core-49641ba865074a574436ac44201eca3a8afc2757.tar.xz
platform-system-core-49641ba865074a574436ac44201eca3a8afc2757.zip
libtoolbox_dd / grep: Android.mk -> bp
Bug: 37512442 Test: links Change-Id: I98b2b463a69b065eff2bea562ce6be50f8a12341
Diffstat (limited to 'toolbox')
-rw-r--r--toolbox/Android.bp44
-rw-r--r--toolbox/Android.mk36
2 files changed, 44 insertions, 36 deletions
diff --git a/toolbox/Android.bp b/toolbox/Android.bp
new file mode 100644
index 000000000..1c9fb2095
--- /dev/null
+++ b/toolbox/Android.bp
@@ -0,0 +1,44 @@
1common_cflags = [
2 "-Werror",
3 "-Wno-unused-parameter",
4 "-Wno-unused-const-variable",
5 "-include bsd-compatibility.h"
6]
7
8cc_library_static {
9 srcs: [
10 "upstream-netbsd/bin/dd/args.c",
11 "upstream-netbsd/bin/dd/conv.c",
12 "upstream-netbsd/bin/dd/dd.c",
13 "upstream-netbsd/bin/dd/dd_hostops.c",
14 "upstream-netbsd/bin/dd/misc.c",
15 "upstream-netbsd/bin/dd/position.c",
16 "upstream-netbsd/lib/libc/gen/getbsize.c",
17 "upstream-netbsd/lib/libc/gen/humanize_number.c",
18 "upstream-netbsd/lib/libc/stdlib/strsuftoll.c",
19 "upstream-netbsd/lib/libc/string/swab.c",
20 "upstream-netbsd/lib/libutil/raise_default_signal.c",
21 ],
22 cflags: common_cflags + [
23 "-Dmain=dd_main",
24 "-DNO_CONV",
25 ],
26 local_include_dirs: ["upstream-netbsd/include/"],
27 name: "libtoolbox_dd",
28}
29
30// We build BSD grep separately, so it can provide egrep and fgrep too.
31cc_binary {
32 name: "grep",
33 srcs: [
34 "upstream-netbsd/usr.bin/grep/fastgrep.c",
35 "upstream-netbsd/usr.bin/grep/file.c",
36 "upstream-netbsd/usr.bin/grep/grep.c",
37 "upstream-netbsd/usr.bin/grep/queue.c",
38 "upstream-netbsd/usr.bin/grep/util.c",
39 ],
40 cflags: common_cflags,
41 local_include_dirs: ["upstream-netbsd/include/"],
42 symlinks: ["egrep", "fgrep"],
43
44}
diff --git a/toolbox/Android.mk b/toolbox/Android.mk
index d6ead1a09..94029d8d2 100644
--- a/toolbox/Android.mk
+++ b/toolbox/Android.mk
@@ -1,30 +1,9 @@
1LOCAL_PATH:= $(call my-dir) 1LOCAL_PATH:= $(call my-dir)
2 2
3
4common_cflags := \ 3common_cflags := \
5 -Werror -Wno-unused-parameter -Wno-unused-const-variable \ 4 -Werror -Wno-unused-parameter -Wno-unused-const-variable \
6 -include bsd-compatibility.h \ 5 -include bsd-compatibility.h \
7 6
8
9include $(CLEAR_VARS)
10LOCAL_SRC_FILES := \
11 upstream-netbsd/bin/dd/args.c \
12 upstream-netbsd/bin/dd/conv.c \
13 upstream-netbsd/bin/dd/dd.c \
14 upstream-netbsd/bin/dd/dd_hostops.c \
15 upstream-netbsd/bin/dd/misc.c \
16 upstream-netbsd/bin/dd/position.c \
17 upstream-netbsd/lib/libc/gen/getbsize.c \
18 upstream-netbsd/lib/libc/gen/humanize_number.c \
19 upstream-netbsd/lib/libc/stdlib/strsuftoll.c \
20 upstream-netbsd/lib/libc/string/swab.c \
21 upstream-netbsd/lib/libutil/raise_default_signal.c
22LOCAL_CFLAGS += $(common_cflags) -Dmain=dd_main -DNO_CONV
23LOCAL_C_INCLUDES += $(LOCAL_PATH)/upstream-netbsd/include/
24LOCAL_MODULE := libtoolbox_dd
25include $(BUILD_STATIC_LIBRARY)
26
27
28include $(CLEAR_VARS) 7include $(CLEAR_VARS)
29 8
30BSD_TOOLS := \ 9BSD_TOOLS := \
@@ -80,18 +59,3 @@ $(INPUT_H_LABELS_H): PRIVATE_CUSTOM_TOOL = $(PRIVATE_LOCAL_PATH)/generate-input.
80$(INPUT_H_LABELS_H): $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/generate-input.h-labels.py $(UAPI_INPUT_EVENT_CODES_H) 59$(INPUT_H_LABELS_H): $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/generate-input.h-labels.py $(UAPI_INPUT_EVENT_CODES_H)
81$(INPUT_H_LABELS_H): 60$(INPUT_H_LABELS_H):
82 $(transform-generated-source) 61 $(transform-generated-source)
83
84
85# We build BSD grep separately, so it can provide egrep and fgrep too.
86include $(CLEAR_VARS)
87LOCAL_SRC_FILES := \
88 upstream-netbsd/usr.bin/grep/fastgrep.c \
89 upstream-netbsd/usr.bin/grep/file.c \
90 upstream-netbsd/usr.bin/grep/grep.c \
91 upstream-netbsd/usr.bin/grep/queue.c \
92 upstream-netbsd/usr.bin/grep/util.c
93LOCAL_CFLAGS += $(common_cflags)
94LOCAL_C_INCLUDES += $(LOCAL_PATH)/upstream-netbsd/include/
95LOCAL_MODULE := grep
96LOCAL_POST_INSTALL_CMD := $(hide) $(foreach t,egrep fgrep,ln -sf grep $(TARGET_OUT)/bin/$(t);)
97include $(BUILD_EXECUTABLE)