summaryrefslogtreecommitdiff
path: root/build-aux/ndk-module-extract.awk
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2023-01-26 15:37:04 +0800
committerPo Lu <luangruo@yahoo.com>2023-01-26 15:37:04 +0800
commit4255d7f0514c5fa1badded6b0bc445ec2d2764c0 (patch)
tree93efa03d4ba0c1987eab16645f9ebcc405ab9e19 /build-aux/ndk-module-extract.awk
parent8125e26a323cb8906a14005519b0fa5693718c90 (diff)
downloademacs-4255d7f0514c5fa1badded6b0bc445ec2d2764c0.tar.gz
Update Android port
* .gitignore: Ignore lib/math.h. * INSTALL.android: Update accordingly. * build-aux/ndk-build-helper-1.mk: * build-aux/ndk-build-helper-2.mk: * build-aux/ndk-build-helper.mk: * build-aux/ndk-module-extract.awk: Handle C++ modules. * configure.ac: Enable libxml2 on Android. * cross/ndk-build/Makefile.in: * cross/ndk-build/ndk-build-shared-library.mk: * cross/ndk-build/ndk-build-static-library.mk: * cross/ndk-build/ndk-build.mk.in: * cross/ndk-build/ndk-resolve.mk: Fix dependency resolution of includes. * java/org/gnu/emacs/EmacsView.java (popupMenu): Fix minimum SDK version for actual popup menus. * lib/math.h: Delete file. * m4/ndk-build.m4 (ndk_SEARCH_MODULE, ndk_CHECK_MODULES): Look for nasm and C++ libraries. * src/android.c (faccessat): Rename to `android_faccessat'. * src/android.h: Update prototypes. * src/dired.c (file_name_completion_dirp): * src/fileio.c (file_access_p, Faccess_file, file_directory_p): * src/lisp.h: * src/lread.c (openp): * src/process.c (allocate_pty): Use sys_faccessat. * src/sysdep.c (sys_faccessat): New function.
Diffstat (limited to 'build-aux/ndk-module-extract.awk')
-rw-r--r--build-aux/ndk-module-extract.awk30
1 files changed, 27 insertions, 3 deletions
diff --git a/build-aux/ndk-module-extract.awk b/build-aux/ndk-module-extract.awk
index eaea3e96dd8..681f20237fa 100644
--- a/build-aux/ndk-module-extract.awk
+++ b/build-aux/ndk-module-extract.awk
@@ -2,13 +2,27 @@
kind = $2
}
+/^Start Imports$/ {
+ imports = 1
+}
+
// {
- if (!match ($0, /^End$/) && !match ($0, /^Building.+$/))
+ if (imports && ++imports > 2)
+ {
+ if (!match ($0, /^End Imports$/))
+ makefile_imports = makefile_imports " " $1
+ }
+ else if (!match ($0, /^End$/) && !match ($0, /^Building.+$/))
{
if (kind)
{
- if (ldflags_found)
- target = $0
+ if (target_found)
+ cxx_deps = $0
+ else if (ldflags_found)
+ {
+ target = $0
+ target_found = 1
+ }
else if (cflags_found)
{
ldflags = $0
@@ -48,6 +62,7 @@
printf "module_cflags=\"%s\"\n", cflags
printf "module_ldflags=\"%s\"\n", ldflags
printf "module_target=\"%s\"\n", target
+ printf "module_cxx_deps=\"%s\"\n", cxx_deps
}
src = ""
@@ -61,4 +76,13 @@
includes_found = ""
cflags_found = ""
ldflags_found = ""
+ target_found = ""
+}
+
+/^End Imports$/ {
+ imports = ""
+ # Strip off leading whitespace.
+ gsub (/^[ \t]+/, "", makefile_imports)
+ printf "module_imports=\"%s\"\n", makefile_imports
+ makefile_imports = ""
}