emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/android 5b9d6738d11: Update Android port


From: Po Lu
Subject: feature/android 5b9d6738d11: Update Android port
Date: Wed, 15 Mar 2023 03:07:54 -0400 (EDT)

branch: feature/android
commit 5b9d6738d119d2c450dd8f060793aebe3f64fc72
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Update Android port
    
    * configure.ac (XCONFIGURE): Disable NS.
    * cross/Makefile.in (lib-src/config.h):
    
    (lib/libgnu.a):
    (src/android-emacs): Port sed invocation to Mac OS without GNU
    sed.
---
 configure.ac      |  1 +
 cross/Makefile.in | 82 ++++++++++++++++++++++---------------------------------
 2 files changed, 33 insertions(+), 50 deletions(-)

diff --git a/configure.ac b/configure.ac
index a8b1f297bc4..cc3ae1af82f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1266,6 +1266,7 @@ if test "$ANDROID" = "yes"; then
   with_dbus=no
   with_gsettings=no
   with_threads=no
+  with_ns=no
 
   # zlib is available in android.
 fi
diff --git a/cross/Makefile.in b/cross/Makefile.in
index 2b287816a55..bceb761d769 100644
--- a/cross/Makefile.in
+++ b/cross/Makefile.in
@@ -97,22 +97,16 @@ lib-src/config.h: $(top_builddir)/src/config.h.android
          lib-src/config.h
 
 lib/gnulib.mk: $(top_builddir)/lib/gnulib.mk.android
-       $(AM_V_GEN) cp -f -p $(top_builddir)/lib/gnulib.mk.android      \
-         lib/gnulib.mk
-       $(AM_V_SILENT) \
-       sed -i 's/srcdir =.*$$/srcdir = $(subst /,\/,$(LIB_SRCDIR))/g'  \
-         lib/gnulib.mk
+       $(AM_V_GEN) \
+         sed -e 's/^srcdir =.*$$/srcdir = $(subst /,\/,$(LIB_SRCDIR))/g' \
+           < $(top_builddir)/lib/gnulib.mk.android > $@
 
 lib/Makefile: $(top_builddir)/lib/Makefile.android
-       $(AM_V_GEN) cp -f -p $(top_builddir)/lib/Makefile.android       \
-            lib/Makefile
-       $(AM_V_SILENT) \
-       sed -i 's/top_srcdir =.*$$/top_srcdir = $(subst 
/,\/,$(LIB_TOP_SRCDIR))/g' \
-         lib/Makefile \
-        && sed -i 's/^srcdir =.*$$/srcdir = $(subst /,\/,$(LIB_SRCDIR))/g' \
-         lib/Makefile                                                    \
-       && sed -i 's/VPATH =.*$$/VPATH = $(subst /,\/,$(LIB_SRCDIR))/g' \
-         lib/Makefile
+       $(AM_V_GEN) \
+         sed -e 's/^top_srcdir =.*$$/top_srcdir = $(subst 
/,\/,$(LIB_TOP_SRCDIR))/g' \
+             -e 's/^srcdir =.*$$/srcdir = $(subst /,\/,$(LIB_SRCDIR))/g' \
+             -e 's/^VPATH =.*$$/VPATH = $(subst /,\/,$(LIB_SRCDIR))/g' \
+               < $(top_builddir)/lib/Makefile.android > $@
 
 # What is needed to build gnulib.
 LIB_DEPS = lib/config.h lib/gnulib.mk lib/Makefile
@@ -121,34 +115,27 @@ LIB_DEPS = lib/config.h lib/gnulib.mk lib/Makefile
 lib/libgnu.a: src/verbose.mk config.status $(LIB_DEPS) $(PRE_BUILD_DEPS)
        $(MAKE) -C lib libgnu.a
 
-src/Makefile src/config.h &: $(top_builddir)/src/config.h.android      \
-  $(top_builddir)/src/Makefile.android
-# Copy config.h to src/
-       $(AM_V_GEN) \
-       cp -f -p $(top_builddir)/src/config.h.android src/config.h
-# And the Makefile.
-       $(AM_V_SILENT) \
-       cp -f -p $(top_builddir)/src/Makefile.android src/Makefile
-# Next, edit srcdir and top_srcdir to the right location.
-       $(AM_V_SILENT) \
-       sed -i 's/srcdir =.*$$/srcdir = $(subst /,\/,$(SRC_SRCDIR))/g' 
src/Makefile
-       $(AM_V_SILENT) \
-       sed -i 's/top_srcdir =.*$$/top_srcdir = $(subst 
/,\/,$(LIB_TOP_SRCDIR))/g' \
-         src/Makefile
+# Edit srcdir and top_srcdir to the right locations.
 # Edit references to ../admin/unidata to read ../../admin/unidata.
-       $(AM_V_SILENT) \
-       sed -i 's/\.\.\/admin\/unidata/..\/..\/admin\/unidata/g' src/Makefile
-       $(AM_V_SILENT) \
-       sed -i 's/\.\.\/admin\/charsets/..\/..\/admin\/charsets/g' src/Makefile
 # Next, edit libsrc to the location at top_srcdir! It is important
 # that src/Makefile uses the binaries there, instead of any
 # cross-compiled binaries at ./lib-src.
-       $(AM_V_SILENT) \
-       sed -i 's/libsrc =.*$$/libsrc = \.\.\/\.\.\/lib-src/g' src/Makefile
 # Edit out anything saying -I($(top_srcdir)/lib) into
 # -I$../(srcdir)/lib; that should be covered by -I$(lib)
-       $(AM_V_SILENT) \
-       sed -i 's/-I\$$(top_srcdir)\/lib/-I..\/$(subst /,\/,$(srcdir))\/lib/g' 
src/Makefile
+
+src/Makefile: $(top_builddir)/src/Makefile.android
+       $(AM_V_GEN) \
+       sed -e 's/^srcdir =.*$$/srcdir = $(subst /,\/,$(SRC_SRCDIR))/g' \
+           -e 's/^top_srcdir =.*$$/top_srcdir = $(subst 
/,\/,$(LIB_TOP_SRCDIR))/g' \
+           -e 's/\.\.\/admin\/unidata/..\/..\/admin\/unidata/g' \
+           -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' \
+           < $(top_builddir)/src/Makefile.android > $@
+
+src/config.h: $(top_builddir)/src/config.h.android
+       $(AM_V_GEN) cp -f -p $< $@
 
 .PHONY: src/android-emacs src/libemacs.so
 
@@ -160,22 +147,17 @@ src/android-emacs: src/Makefile src/config.h lib/libgnu.a 
\
   $(PRE_BUILD_DEPS)
        $(MAKE) -C src android-emacs
 
-lib-src/Makefile: $(top_builddir)/lib-src/Makefile.android
-       $(AM_V_GEN) cp -f -p $< $@
-       $(AM_V_SILENT) sed -i 's/-I\$${srcdir}\/\.\.\/lib//g' lib-src/Makefile
-# Next, edit srcdir and top_srcdir to the right location.
-       $(AM_V_SILENT) \
-       sed -i 's/srcdir=.*$$/srcdir = $(subst /,\/,$(LIB_SRC_SRCDIR))/g' \
-         lib-src/Makefile
-       $(AM_V_SILENT) \
-       sed -i 's/top_srcdir=.*$$/top_srcdir = $(subst 
/,\/,$(LIB_SRC_TOP_SRCDIR))/g' \
-         lib-src/Makefile
 # Edit out SCRIPTS, it interferes with the build.
-       $(AM_V_SILENT) \
-       sed -i 's/^SCRIPTS=.*$$/SCRIPTS=/g' lib-src/Makefile
 # Make BASE_CFLAGS also include cross/lib as well as ../lib.
-       $(AM_V_SILENT) \
-       sed -i 's/-I\.\.\/lib/-I..\/lib -I..\/$(subst /,\/,$(srcdir))\/lib/g' 
lib-src/Makefile
+
+lib-src/Makefile: $(top_builddir)/lib-src/Makefile.android
+       $(AM_V_GEN) \
+       sed -e 's/-I\$${srcdir}\/\.\.\/lib//g' \
+           -e 's/^srcdir=.*$$/srcdir = $(subst /,\/,$(LIB_SRC_SRCDIR))/g' \
+           -e 's/^top_srcdir=.*$$/top_srcdir = $(subst 
/,\/,$(LIB_SRC_TOP_SRCDIR))/g' \
+           -e 's/^SCRIPTS=.*$$/SCRIPTS=/g' \
+           -e 's/-I\.\.\/lib/-I..\/lib -I..\/$(subst /,\/,$(srcdir))\/lib/g' \
+         < $(top_builddir)/lib-src/Makefile.android > $@
 
 .PHONY: $(LIBSRC_BINARIES)
 $(LIBSRC_BINARIES) &: src/verbose.mk $(top_builddir)/$@ lib/libgnu.a \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]