OSDN Git Service

libext2fs: export the library include path
authorAlex Deymo <deymo@google.com>
Thu, 3 Sep 2015 02:07:46 +0000 (19:07 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 14 Mar 2016 22:39:48 +0000 (18:39 -0400)
When adding 'libext2fs' as a library dependency from any other binary,
the binary needs to find the library headers. Users of this library
should not hard-code the include path themselves. This patch exports the
library headers on all three version of the libext2fs library and
removes the redundant include path from executables in e2fsprogs.

Addresses-Google-Bug: #23084776
TEST=mma

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/Android.mk
lib/ext2fs/Android.mk
misc/Android.mk

index 30f2d55..6a1b604 100644 (file)
@@ -52,7 +52,7 @@ e2fsck_static_libraries := \
 
 e2fsck_system_static_libraries := libc
 
-e2fsck_c_includes := external/e2fsprogs/lib
+e2fsck_c_includes :=
 
 e2fsck_cflags := -O2 -g -W -Wall -fno-strict-aliasing
 
index dc197a1..6d9e041 100644 (file)
@@ -110,6 +110,7 @@ LOCAL_SRC_FILES := $(libext2fs_src_files)
 LOCAL_SYSTEM_SHARED_LIBRARIES := $(libext2fs_system_shared_libraries)
 LOCAL_SHARED_LIBRARIES := $(libext2fs_shared_libraries)
 LOCAL_C_INCLUDES := $(libext2fs_c_includes)
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(libext2fs_c_includes)
 LOCAL_CFLAGS := $(libext2fs_cflags)
 LOCAL_MODULE := libext2fs
 LOCAL_MODULE_TAGS := optional
@@ -121,6 +122,7 @@ include $(CLEAR_VARS)
 LOCAL_SRC_FILES := $(libext2fs_src_files)
 LOCAL_STATIC_LIBRARIES := $(libext2fs_static_libraries) $(libext2fs_system_static_libraries)
 LOCAL_C_INCLUDES := $(libext2fs_c_includes)
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(libext2fs_c_includes)
 LOCAL_CFLAGS := $(libext2fs_cflags) $(libext2fs_cflags_linux)
 LOCAL_MODULE := libext2fs
 LOCAL_MODULE_TAGS := optional
@@ -132,6 +134,7 @@ include $(CLEAR_VARS)
 LOCAL_SRC_FILES := $(libext2fs_src_files)
 LOCAL_SHARED_LIBRARIES := $(addsuffix _host, $(libext2fs_shared_libraries))
 LOCAL_C_INCLUDES := $(libext2fs_c_includes)
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(libext2fs_c_includes)
 LOCAL_CFLAGS := $(libext2fs_cflags)
 LOCAL_MODULE := libext2fs_host
 LOCAL_MODULE_TAGS := optional
index 5ab5141..19344ff 100644 (file)
@@ -10,7 +10,6 @@ mke2fs_src_files := \
        create_inode.c
 
 mke2fs_c_includes := \
-       external/e2fsprogs/lib \
        external/e2fsprogs/e2fsck
 
 mke2fs_cflags := -O2 -g -W -Wall
@@ -56,7 +55,6 @@ tune2fs_src_files := \
        util.c
 
 tune2fs_c_includes := \
-       external/e2fsprogs/lib \
        external/e2fsprogs/e2fsck
 
 tune2fs_cflags := -O2 -g -W -Wall
@@ -137,8 +135,7 @@ include $(CLEAR_VARS)
 badblocks_src_files := \
        badblocks.c
 
-badblocks_c_includes := \
-       external/e2fsprogs/lib
+badblocks_c_includes :=
 
 badblocks_cflags := -O2 -g -W -Wall
 
@@ -287,8 +284,7 @@ include $(CLEAR_VARS)
 blkid_src_files := \
     blkid.c
 
-blkid_c_includes := \
-    external/e2fsprogs/lib
+blkid_c_includes :=
 
 blkid_cflags := -O2 -g -W -Wall