Fix doc file generation on Android

* .gitignore: Ignore cross/etc/DOC.
* configure.ac: Make the directory `cross/etc'.
* cross/Makefile.in (CLEAN_SUBDIRS): Clean files inside `etc' as
well.
* java/Makefile.in (install_temp): Copy cross/etc/DOC to the
package if it is available.
* src/Makefile.in (SOME_MACHINE_OBJECTS): Add androidselect.c,
sfntfont-android.c and sfntfont.c.
(libemacs.so): Depend on $(etc)/DOC.
This commit is contained in:
Po Lu 2023-07-11 16:47:13 +08:00
parent f2c4643890
commit fcf53bf9f5
6 changed files with 21 additions and 9 deletions

1
.gitignore vendored
View file

@ -107,6 +107,7 @@ cross/lib-src/*
cross/sys/*
cross/config.status
cross/*.bak
cross/etc/DOC
cross/ndk-build/Makefile
cross/ndk-build/ndk-build.mk

View file

@ -7828,6 +7828,12 @@ if test "$XCONFIGURE" != "android"; then
AS_MKDIR_P([cross/lib/sys])
AS_MKDIR_P([cross/lib-src])
dnl Make cross/etc; this directory will hold the documentation file
dnl holding doc strings for Android specific C files that aren't
dnl built during the initial compilation of Emacs for the build
dnl machine.
AS_MKDIR_P([cross/etc])
dnl Link gnulib files to cross/lib as well.
dnl af_alg.h and lib/save-cwd.h are copied manually from
dnl gnulib, and as such aren't specified in gl_FILE_LIST.

View file

@ -51,7 +51,7 @@ LIB_SRC_TOP_SRCDIR = $(realpath $(top_src))
LIBSRC_BINARIES = lib-src/etags lib-src/ctags lib-src/emacsclient \
lib-src/ebrowse lib-src/hexl lib-src/movemail
CLEAN_SUBDIRS=src lib-src lib
CLEAN_SUBDIRS = src lib-src lib etc
.PHONY: all
all: lib/libgnu.a src/libemacs.so src/android-emacs $(LIBSRC_BINARIES)

View file

@ -45,7 +45,7 @@ have_working_info = $(filter notintermediate,$(value .FEATURES))
# since the bug is not annoying elsewhere.
AM_V_AR = @$(info $ AR $@)
AM_V_at = @
AM_V_at = @
AM_V_CC = @$(info $ CC $@)
AM_V_CXX = @$(info $ CXX $@)
AM_V_CCLD = @$(info $ CCLD $@)

View file

@ -191,6 +191,11 @@ install_temp: $(CROSS_BINS) $(CROSS_LIBS) $(RESOURCE_FILES)
$(AM_V_SILENT) cp -r $(top_srcdir)/lisp install_temp/assets
$(AM_V_SILENT) cp -r $(top_srcdir)/etc install_temp/assets
$(AM_V_SILENT) cp -r $(top_srcdir)/info install_temp/assets
# Replace etc/DOC generated by compiling Emacs for the build machine
# with etc/DOC from the cross-compiled Emacs.
$(AM_V_SILENT) test -f $(top_builddir)/cross/etc/DOC \
&& cp -r $(top_builddir)/cross/etc/DOC \
install_temp/assets/etc
# Remove undesirable files from those directories.
$(AM_V_SILENT) \
for subdir in `find install_temp -type d -print`; do \

View file

@ -494,7 +494,7 @@ SOME_MACHINE_OBJECTS = dosfns.o msdos.o \
w16select.o widget.o xfont.o ftfont.o xftfont.o gtkutil.o \
xsettings.o xgselect.o termcap.o hbfont.o \
haikuterm.o haikufns.o haikumenu.o haikufont.o androidterm.o androidfns.o \
androidfont.o
androidfont.o androidselect.c sfntfont-android.c sfntfont.c
## gmalloc.o if !SYSTEM_MALLOC && !DOUG_LEA_MALLOC, else empty.
GMALLOC_OBJ=@GMALLOC_OBJ@
@ -749,11 +749,11 @@ ifeq ($(DUMPING),unexec)
endif
ifeq ($(XCONFIGURE),android)
## The Android package internally links to and communicates with a
## shared library named `libemacs.so' at startup. This is built
## almost the same way temacs is. But it is position independent. It
## is not dumped here. Instead, it dumps itself the first time it
## starts on the user's device.
## The Android package internally links to a shared library named
## `libemacs.so' at startup. It is built almost the same way temacs
## is. But it is position independent, and is not dumped here.
## Instead, it dumps itself the first time it starts on the user's
## device.
# Include ndk-build.mk in order to build Emacs dependencies.
old_top_builddir := $(top_builddir)
@ -763,7 +763,7 @@ top_builddir := $(old_top_builddir)
libemacs.so: $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(EMACSRES) \
$(MAKE_PDUMPER_FINGERPRINT) $(NDK_BUILD_SHARED) \
$(NDK_BUILD_STATIC)
$(NDK_BUILD_STATIC) $(etc)/DOC
$(AM_V_CCLD)$(CC) -o $@ $(ALL_CFLAGS) $(TEMACS_LDFLAGS) \
$(ANDROID_LDFLAGS) $(LDFLAGS) -shared $(ALLOBJS) \
$(LIBEGNU_ARCHIVE) $(LIBES)