From 3bcdf010a9f2576bac0d7f23af70fa9dff81ef95 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 22 Apr 2024 16:27:30 +0800 Subject: Generate Android shared library list automatically * .gitignore: Ignore new generated files. * cross/Makefile.in (src/Makefile): Remove leftover specification of the source Gnulib directory. * cross/ndk-build/ndk-build.mk.in (NDK_BUILD_READELF): New variable. * java/Makefile.in (CONFIG_FILE, ALL_DEPENDENCIES, READELF) (cf-stamp-1, cf-stamp): New variables and rules; compute the set of library files in the order of loading and generate a file with this information. (ALL_CLASS_FILES): New variable; if builddir is not srcdir, $($(CONFIG_FILE), $(CLASS_FILES)): Depend on EmacsConfig.java. add generated files in the build directory. (classes.dex): Adjust to match. * java/org/gnu/emacs/EmacsNative.java (EmacsNative) : Load shared libraries from EMACS_SHARED_LIBRARIES rather than a hard-coded list. * m4/ndk-build.m4 (ndk_INIT): Search for readelf... (ndk_CHECK_MODULES): ...and substitute its path as NDK_BUILD_READELF. --- cross/Makefile.in | 2 +- cross/ndk-build/ndk-build.mk.in | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'cross') diff --git a/cross/Makefile.in b/cross/Makefile.in index 1e8daea6f91..575c6c4cb29 100644 --- a/cross/Makefile.in +++ b/cross/Makefile.in @@ -140,7 +140,7 @@ src/Makefile: $(top_builddir)/src/Makefile.android -e 's/\.\.\/admin\/charsets/..\/..\/admin\/charsets/g' \ -e 's/^libsrc =.*$$/libsrc = \.\.\/\.\.\/lib-src/g' \ -e 's/libsrc =.*$$/libsrc = \.\.\/\.\.\/lib-src/g' \ - -e 's/-I\$$(top_srcdir)\/lib/-I..\/$(subst /,\/,$(srcdir))\/lib/g' \ + -e 's/-I\$$(top_srcdir)\/lib//g' \ < $(top_builddir)/src/Makefile.android > $@ src/epaths.h: $(top_builddir)/src/epaths.h diff --git a/cross/ndk-build/ndk-build.mk.in b/cross/ndk-build/ndk-build.mk.in index ea1be5af6f1..9948e019e3b 100644 --- a/cross/ndk-build/ndk-build.mk.in +++ b/cross/ndk-build/ndk-build.mk.in @@ -27,6 +27,7 @@ NDK_BUILD_CXX_LDFLAGS = @NDK_BUILD_CXX_LDFLAGS@ NDK_BUILD_ANY_CXX_MODULE = @NDK_BUILD_ANY_CXX_MODULE@ NDK_BUILD_SHARED = NDK_BUILD_STATIC = +NDK_BUILD_READELF = @NDK_BUILD_READELF@ define uniqify $(if $1,$(firstword $1) $(call uniqify,$(filter-out $(firstword $1),$1))) -- cgit v1.3