diff options
| author | Alan Third | 2021-06-16 21:28:10 +0100 |
|---|---|---|
| committer | Alan Third | 2021-06-26 10:34:59 +0100 |
| commit | 5dd2d50f3d5e65b85c87da86e2e8a6d087fe5767 (patch) | |
| tree | f8add442c328e37e5b8519415ed60d0c54523e65 /src/callproc.c | |
| parent | 4d63a033a726a8da33bda8d18a503e88bfb794fb (diff) | |
| download | emacs-5dd2d50f3d5e65b85c87da86e2e8a6d087fe5767.tar.gz emacs-5dd2d50f3d5e65b85c87da86e2e8a6d087fe5767.zip | |
Fix NS native compilation builds
* Makefile.in (ns_applibexecdir):
(ns_applibdir):
(ns_appdir): New variables.
(.PHONY): Include new rule.
(epaths-force-ns-self-contained): Remove the app bundle directory from
all paths.
* configure.ac (NS_SELF_CONTAINED): Set the default site-lisp
directory instead of hard-coding it in the ObjC code, and use the new
epaths generating make rule.
* src/callproc.c (init_callproc_1):
(init_callproc): Remove all the NS specific code as the special cases
are now handled by decode_env_path.
* src/emacs.c (load_pdump):
(decode_env_path): Use ns_relocate to find the correct directory after
relocation.
* src/lread.c (load_path_default): Remove all the NS specific code as
the special cases are now handled by decode_env_path.
* src/nsterm.h: Update function definitions.
* src/nsterm.m (ns_etc_directory):
(ns_exec_path):
(ns_load_path): Remove functions that are no longer needed.
(ns_relocate): New function to calculate paths within the NS app
bundle.
* nextstep/Makefile.in (ns_applibexecdir): New variable, and update
anything relying on the libexec location.
Diffstat (limited to 'src/callproc.c')
| -rw-r--r-- | src/callproc.c | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/src/callproc.c b/src/callproc.c index e44e243680d..aabc39313b8 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -1661,32 +1661,15 @@ make_environment_block (Lisp_Object current_dir) | |||
| 1661 | void | 1661 | void |
| 1662 | init_callproc_1 (void) | 1662 | init_callproc_1 (void) |
| 1663 | { | 1663 | { |
| 1664 | #ifdef HAVE_NS | 1664 | Vdata_directory = decode_env_path ("EMACSDATA", PATH_DATA, 0); |
| 1665 | const char *etc_dir = ns_etc_directory (); | ||
| 1666 | const char *path_exec = ns_exec_path (); | ||
| 1667 | #endif | ||
| 1668 | |||
| 1669 | Vdata_directory = decode_env_path ("EMACSDATA", | ||
| 1670 | #ifdef HAVE_NS | ||
| 1671 | etc_dir ? etc_dir : | ||
| 1672 | #endif | ||
| 1673 | PATH_DATA, 0); | ||
| 1674 | Vdata_directory = Ffile_name_as_directory (Fcar (Vdata_directory)); | 1665 | Vdata_directory = Ffile_name_as_directory (Fcar (Vdata_directory)); |
| 1675 | 1666 | ||
| 1676 | Vdoc_directory = decode_env_path ("EMACSDOC", | 1667 | Vdoc_directory = decode_env_path ("EMACSDOC", PATH_DOC, 0); |
| 1677 | #ifdef HAVE_NS | ||
| 1678 | etc_dir ? etc_dir : | ||
| 1679 | #endif | ||
| 1680 | PATH_DOC, 0); | ||
| 1681 | Vdoc_directory = Ffile_name_as_directory (Fcar (Vdoc_directory)); | 1668 | Vdoc_directory = Ffile_name_as_directory (Fcar (Vdoc_directory)); |
| 1682 | 1669 | ||
| 1683 | /* Check the EMACSPATH environment variable, defaulting to the | 1670 | /* Check the EMACSPATH environment variable, defaulting to the |
| 1684 | PATH_EXEC path from epaths.h. */ | 1671 | PATH_EXEC path from epaths.h. */ |
| 1685 | Vexec_path = decode_env_path ("EMACSPATH", | 1672 | Vexec_path = decode_env_path ("EMACSPATH", PATH_EXEC, 0); |
| 1686 | #ifdef HAVE_NS | ||
| 1687 | path_exec ? path_exec : | ||
| 1688 | #endif | ||
| 1689 | PATH_EXEC, 0); | ||
| 1690 | Vexec_directory = Ffile_name_as_directory (Fcar (Vexec_path)); | 1673 | Vexec_directory = Ffile_name_as_directory (Fcar (Vexec_path)); |
| 1691 | /* FIXME? For ns, path_exec should go at the front? */ | 1674 | /* FIXME? For ns, path_exec should go at the front? */ |
| 1692 | Vexec_path = nconc2 (decode_env_path ("PATH", "", 0), Vexec_path); | 1675 | Vexec_path = nconc2 (decode_env_path ("PATH", "", 0), Vexec_path); |
| @@ -1701,10 +1684,6 @@ init_callproc (void) | |||
| 1701 | 1684 | ||
| 1702 | char *sh; | 1685 | char *sh; |
| 1703 | Lisp_Object tempdir; | 1686 | Lisp_Object tempdir; |
| 1704 | #ifdef HAVE_NS | ||
| 1705 | if (data_dir == 0) | ||
| 1706 | data_dir = ns_etc_directory () != 0; | ||
| 1707 | #endif | ||
| 1708 | 1687 | ||
| 1709 | if (!NILP (Vinstallation_directory)) | 1688 | if (!NILP (Vinstallation_directory)) |
| 1710 | { | 1689 | { |
| @@ -1716,15 +1695,8 @@ init_callproc (void) | |||
| 1716 | /* MSDOS uses wrapped binaries, so don't do this. */ | 1695 | /* MSDOS uses wrapped binaries, so don't do this. */ |
| 1717 | if (NILP (Fmember (tem, Vexec_path))) | 1696 | if (NILP (Fmember (tem, Vexec_path))) |
| 1718 | { | 1697 | { |
| 1719 | #ifdef HAVE_NS | ||
| 1720 | const char *path_exec = ns_exec_path (); | ||
| 1721 | #endif | ||
| 1722 | /* Running uninstalled, so default to tem rather than PATH_EXEC. */ | 1698 | /* Running uninstalled, so default to tem rather than PATH_EXEC. */ |
| 1723 | Vexec_path = decode_env_path ("EMACSPATH", | 1699 | Vexec_path = decode_env_path ("EMACSPATH", SSDATA (tem), 0); |
| 1724 | #ifdef HAVE_NS | ||
| 1725 | path_exec ? path_exec : | ||
| 1726 | #endif | ||
| 1727 | SSDATA (tem), 0); | ||
| 1728 | Vexec_path = nconc2 (decode_env_path ("PATH", "", 0), Vexec_path); | 1700 | Vexec_path = nconc2 (decode_env_path ("PATH", "", 0), Vexec_path); |
| 1729 | } | 1701 | } |
| 1730 | 1702 | ||