]> git.eshelyaron.com Git - emacs.git/commitdiff
Install rcs2log within Emacs packages for Android
authorPo Lu <luangruo@yahoo.com>
Thu, 24 Aug 2023 04:41:15 +0000 (12:41 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 24 Aug 2023 04:41:54 +0000 (12:41 +0800)
* 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.

doc/emacs/android.texi
doc/lispref/processes.texi
etc/NEWS
java/Makefile.in
lisp/vc/vc-rcs.el
src/callproc.c

index 082c9f770b71976e78ffe0b4a9fc41eaa8f48f33..5e7ff0e4bb317caa92eb50b046b3bc4de18e31c6 100644 (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
index 799a9e19722a77d825ae2d6089124d5c09f9aa49..41485f48057a8403252aabcd26d37d1cc5cbe6b1 100644 (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
index f8ff39f87acc05a48cc158fb06f2a8eec6b343a3..9d356240f9c2090b4c7afe1914c339067e0d3441 100644 (file)
--- 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.
index 804d4669c7abe6469b05428aec1a3526dc01aefd..87683f125445ee26b0714ade11288cad88c5187f 100644 (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)
index c2112b76ad3385ca64a755c04cf6a59fdff70e12..3d6907cbec102a6ce68c36504779ef73216ef121 100644 (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")
index dc37dfdc01f67865a7d228bf6860a8649c4b0bd4..082c65c4f14bb66ee52a3dff61772f736565ef8b 100644 (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);