From: Po Lu Date: Thu, 24 Aug 2023 04:41:15 +0000 (+0800) Subject: Install rcs2log within Emacs packages for Android X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=32fe187bdf16ebc81a09592be0af75dc2227cded;p=emacs.git 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) : New defvar. Define to `librcs2log.so' under Android, `rcs2log' elsewhere. --- diff --git a/doc/emacs/android.texi b/doc/emacs/android.texi index 082c9f770b7..5e7ff0e4bb3 100644 --- a/doc/emacs/android.texi +++ b/doc/emacs/android.texi @@ -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 diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 799a9e19722..41485f48057 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -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 diff --git a/etc/NEWS b/etc/NEWS index f8ff39f87ac..9d356240f9c 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -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. diff --git a/java/Makefile.in b/java/Makefile.in index 804d4669c7a..87683f12544 100644 --- a/java/Makefile.in +++ b/java/Makefile.in @@ -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) diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el index c2112b76ad3..3d6907cbec1 100644 --- a/lisp/vc/vc-rcs.el +++ b/lisp/vc/vc-rcs.el @@ -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") diff --git a/src/callproc.c b/src/callproc.c index dc37dfdc01f..082c65c4f14 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -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);