Install rcs2log within Emacs packages for Android

* doc/emacs/android.texi (Android Environment): Mention the
`rcs2log' program name variable.  Also refine the wording of the
paragraph describing bundled programs a bit.

* doc/lispref/processes.texi (Subprocess Creation): Mention
`rcs2log' and `rcs2log-program-name'.  Correct typos and
spelling mistakes within the variable index.

* etc/NEWS: Amend the announcement of *-program-name to also
cite rcs2log.

* java/Makefile.in (install_temp): Copy rcs2log to
lib/*/librcs2log.so after minor revisions to change the
interpreter name.

* lisp/vc/vc-rcs.el (vc-rcs-rcs2log-program): Ground the program
name upon `rcs2log-program-name'.

* src/callproc.c (syms_of_callproc) <Vrcs2log_program_name>: New
defvar.  Define to `librcs2log.so' under Android, `rcs2log'
elsewhere.
This commit is contained in:
Po Lu 2023-08-24 12:41:15 +08:00
parent 7b0f24ab1f
commit 32fe187bdf
6 changed files with 43 additions and 22 deletions

View file

@ -335,17 +335,17 @@ applications.}
Each application is also prohibited from accessing many system
directories and the app data directories of other applications.
Emacs comes with several binaries. While being executable files,
they are packaged as libraries in the library directory, because
otherwise the system will not unpack them while Emacs is being
installed. This means, instead of specifying @code{ctags} or
@code{emacsclient} in a subprocess, Lisp code must specify
@code{libctags.so} or @code{libemacsclient.so} on the command line
instead when starting either of those programs in a subprocess; to
determine which names to use, consult the values of the variables
@code{ctags-program-name}, @code{etags-program-name},
@code{hexl-program-name}, @code{emacsclient-program-name},
@code{movemail-program-name}, and @code{ebrowse-program-name}.
The Emacs distribution also incorporates several binaries. While
being executable files, they are packaged as libraries in the library
directory, because otherwise the system will not unpack them while
Emacs is being installed. This means that instead of @code{ctags} or
@code{emacsclient}, Lisp code must specify @code{libctags.so} or
@code{libemacsclient.so} on the command line when starting either of
those programs in a subprocess; to determine which names to use,
consult the values of the variables @code{ctags-program-name},
@code{etags-program-name}, @code{hexl-program-name},
@code{emacsclient-program-name}, @code{movemail-program-name},
@code{ebrowse-program-name}, and @code{rcs2log-program-name}.
@xref{Subprocess Creation,,, elisp, the Emacs Lisp Reference Manual}.
The @file{/assets} directory containing Emacs start-up files is

View file

@ -191,17 +191,18 @@ the function returns just the value of the variable @code{exec-path}.
@vindex hexl-program-name
@vindex emacsclient-program-name
@vindex movemail-program-name
@vindex ebrowse-program-manem
When starting a program that is part of the Emacs distribution,
you must take into account that the program may have been renamed in
order to comply with executable naming restrictions present on the
system.
@vindex ebrowse-program-name
@vindex rcs2log-program-name
When starting a program that is part of the Emacs distribution, you
must take into account that the program may have been renamed in order
to comply with executable naming restrictions present on the system.
Instead of starting @command{ctags}, for example, you should specify
the value of @code{ctags-program-name} instead. Likewise, instead of
starting @command{movemail}, you must start
@code{movemail-program-name}, and the same goes for @command{etags},
@command{hexl}, @command{emacsclient}, and @command{ebrowse}.
@command{hexl}, @command{emacsclient}, @code{rcs2log}, and
@command{ebrowse}.
@node Shell Arguments
@section Shell Arguments

View file

@ -846,9 +846,10 @@ within 'function-key-map' or 'input-decode-map' around those calls.
** New variables describing the names of built in programs.
The new variables 'ctags-program-name', 'ebrowse-program-name',
'etags-program-name', 'hexl-program-name', 'emacsclient-program-name'
and 'movemail-program-name' should be used instead of "ctags",
"ebrowse", "etags", "hexl", and "emacsclient", when starting one of
these built in programs in a subprocess.
'movemail-program-name', and 'rcs2log-program-name' should be used
instead of "ctags", "ebrowse", "etags", "hexl", "emacsclient", and
"rcs2log", when starting one of these built in programs in a
subprocess.
+++
** 'x-popup-menu' now understands touch screen events.

View file

@ -227,6 +227,13 @@ install_temp: $(CROSS_BINS) $(CROSS_LIBS) $(RESOURCE_FILES)
cp -f $$file install_temp/lib/$(ANDROID_ABI); \
fi \
done
# Next, produce a version of rcs2log befitting Android's naming
# conventions and shell interpreter location.
$(AM_V_at) \
sed 's|/bin/sh|/system/bin/sh|' \
$(top_srcdir)/lib-src/rcs2log > \
install_temp/lib/$(ANDROID_ABI)/librcs2log.so
$(AM_V_at) chmod +x install_temp/lib/$(ANDROID_ABI)/librcs2log.so
ifneq ($(NDK_BUILD_SHARED),)
$(AM_V_SILENT) cp -f $(NDK_BUILD_SHARED) \
install_temp/lib/$(ANDROID_ABI)

View file

@ -864,14 +864,15 @@ and CVS."
(defvar vc-rcs-rcs2log-program
(let (exe)
(cond ((file-executable-p
(setq exe (expand-file-name "rcs2log" exec-directory)))
(setq exe (expand-file-name rcs2log-program-name
exec-directory)))
exe)
;; In the unlikely event that someone is running an
;; uninstalled Emacs and wants to do something RCS-related.
((file-executable-p
(setq exe (expand-file-name "lib-src/rcs2log" source-directory)))
exe)
(t "rcs2log")))
(t rcs2log-program-name)))
"Path to the `rcs2log' program (normally in `exec-directory').")
(autoload 'vc-buffer-sync "vc-dispatcher")

View file

@ -2216,6 +2216,17 @@ the system. */);
Vebrowse_program_name = build_pure_c_string ("libebrowse.so");
#endif
DEFVAR_LISP ("rcs2log-program-name", Vrcs2log_program_name,
doc: /* Name of the `rcs2log' program distributed with Emacs.
Use this instead of calling `rcs2log' directly, as `rcs2log'
may have been renamed to comply with executable naming restrictions on
the system. */);
#if !defined HAVE_ANDROID || defined ANDROID_STUBIFY
Vrcs2log_program_name = build_pure_c_string ("rcs2log");
#else /* HAVE_ANDROID && !ANDROID_STUBIFY */
Vrcs2log_program_name = build_pure_c_string ("librcs2log.so");
#endif /* !HAVE_ANDROID || ANDROID_STUBIFY */
defsubr (&Scall_process);
defsubr (&Sgetenv_internal);
defsubr (&Scall_process_region);