Browse Source

edify: Export the header and move to Soong.

Also make matching changes to applypatch modules which include
edify/expr.h.

Test: mmma bootable/recovery
Change-Id: Ia72be3caa010d7f56a70add2da345e631b306378
Tao Bao 4 years ago
parent
commit
e6f7f95d34
9 changed files with 50 additions and 57 deletions
  1. 1
    0
      Android.bp
  2. 0
    1
      Android.mk
  3. 1
    0
      applypatch/Android.mk
  4. 45
    0
      edify/Android.bp
  5. 0
    53
      edify/Android.mk
  6. 1
    1
      edify/expr.cpp
  7. 0
    0
      edify/include/edify/expr.h
  8. 1
    1
      edify/lexer.ll
  9. 1
    1
      edify/parser.yy

+ 1
- 0
Android.bp View File

@@ -1,5 +1,6 @@
1 1
 subdirs = [
2 2
     "bootloader_message",
3
+    "edify",
3 4
     "otafault",
4 5
     "otautil",
5 6
 ]

+ 0
- 1
Android.mk View File

@@ -261,7 +261,6 @@ include $(BUILD_STATIC_LIBRARY)
261 261
 include \
262 262
     $(LOCAL_PATH)/applypatch/Android.mk \
263 263
     $(LOCAL_PATH)/boot_control/Android.mk \
264
-    $(LOCAL_PATH)/edify/Android.mk \
265 264
     $(LOCAL_PATH)/minadbd/Android.mk \
266 265
     $(LOCAL_PATH)/minui/Android.mk \
267 266
     $(LOCAL_PATH)/tests/Android.mk \

+ 1
- 0
applypatch/Android.mk View File

@@ -29,6 +29,7 @@ LOCAL_C_INCLUDES := \
29 29
     bootable/recovery
30 30
 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
31 31
 LOCAL_STATIC_LIBRARIES := \
32
+    libedify \
32 33
     libotafault \
33 34
     libbase \
34 35
     libcrypto \

+ 45
- 0
edify/Android.bp View File

@@ -0,0 +1,45 @@
1
+// Copyright (C) 2017 The Android Open Source Project
2
+//
3
+// Licensed under the Apache License, Version 2.0 (the "License");
4
+// you may not use this file except in compliance with the License.
5
+// You may obtain a copy of the License at
6
+//
7
+//      http://www.apache.org/licenses/LICENSE-2.0
8
+//
9
+// Unless required by applicable law or agreed to in writing, software
10
+// distributed under the License is distributed on an "AS IS" BASIS,
11
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+// See the License for the specific language governing permissions and
13
+// limitations under the License.
14
+
15
+cc_library_static {
16
+    name: "libedify",
17
+
18
+    host_supported: true,
19
+
20
+    srcs: [
21
+        "expr.cpp",
22
+        "lexer.ll",
23
+        "parser.yy",
24
+    ],
25
+
26
+    cflags: [
27
+        "-Wall",
28
+        "-Werror",
29
+        "-Wno-deprecated-register",
30
+        "-Wno-unused-parameter",
31
+    ],
32
+
33
+    export_include_dirs: [
34
+        "include",
35
+    ],
36
+
37
+    local_include_dirs: [
38
+        "include",
39
+    ],
40
+
41
+    static_libs: [
42
+        "libbase",
43
+        "libotautil",
44
+    ],
45
+}

+ 0
- 53
edify/Android.mk View File

@@ -1,53 +0,0 @@
1
-# Copyright 2009 The Android Open Source Project
2
-#
3
-# Licensed under the Apache License, Version 2.0 (the "License");
4
-# you may not use this file except in compliance with the License.
5
-# You may obtain a copy of the License at
6
-#
7
-#      http://www.apache.org/licenses/LICENSE-2.0
8
-#
9
-# Unless required by applicable law or agreed to in writing, software
10
-# distributed under the License is distributed on an "AS IS" BASIS,
11
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
-# See the License for the specific language governing permissions and
13
-# limitations under the License.
14
-
15
-LOCAL_PATH := $(call my-dir)
16
-
17
-edify_src_files := \
18
-    lexer.ll \
19
-    parser.yy \
20
-    expr.cpp
21
-
22
-#
23
-# Build the device-side library (static library)
24
-#
25
-include $(CLEAR_VARS)
26
-
27
-LOCAL_SRC_FILES := $(edify_src_files)
28
-
29
-LOCAL_CFLAGS := -Wall -Werror
30
-LOCAL_CPPFLAGS := -Wno-unused-parameter
31
-LOCAL_CPPFLAGS += -Wno-deprecated-register
32
-LOCAL_MODULE := libedify
33
-LOCAL_STATIC_LIBRARIES += \
34
-    libotautil \
35
-    libbase
36
-
37
-include $(BUILD_STATIC_LIBRARY)
38
-
39
-#
40
-# Build the host-side library (static library)
41
-#
42
-include $(CLEAR_VARS)
43
-
44
-LOCAL_SRC_FILES := $(edify_src_files)
45
-
46
-LOCAL_CFLAGS := -Wall -Werror
47
-LOCAL_CPPFLAGS := -Wno-unused-parameter
48
-LOCAL_CPPFLAGS += -Wno-deprecated-register
49
-LOCAL_MODULE := libedify
50
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/..
51
-LOCAL_STATIC_LIBRARIES += libbase
52
-
53
-include $(BUILD_HOST_STATIC_LIBRARY)

+ 1
- 1
edify/expr.cpp View File

@@ -14,7 +14,7 @@
14 14
  * limitations under the License.
15 15
  */
16 16
 
17
-#include "expr.h"
17
+#include "edify/expr.h"
18 18
 
19 19
 #include <stdarg.h>
20 20
 #include <stdio.h>

edify/expr.h → edify/include/edify/expr.h View File


+ 1
- 1
edify/lexer.ll View File

@@ -18,7 +18,7 @@
18 18
 #include <string.h>
19 19
 #include <string>
20 20
 
21
-#include "expr.h"
21
+#include "edify/expr.h"
22 22
 #include "yydefs.h"
23 23
 #include "parser.h"
24 24
 

+ 1
- 1
edify/parser.yy View File

@@ -25,7 +25,7 @@
25 25
 
26 26
 #include <android-base/macros.h>
27 27
 
28
-#include "expr.h"
28
+#include "edify/expr.h"
29 29
 #include "yydefs.h"
30 30
 #include "parser.h"
31 31