[PATCH] simplify $spadroot logic

10 views
Skip to first unread message

Qian Yun

unread,
Sep 27, 2023, 6:55:34 AM9/27/23
to fricas-devel
Following code builds FriCAS without error, proves that
"at build time old $spadroot is never being used". We always use
$FRICAS and only use $FRICAS.

So we can simplify the logic greatly.

=====
diff --git a/src/interp/util.lisp b/src/interp/util.lisp
index ffce3d1f..2dd9a5a1 100644
--- a/src/interp/util.lisp
+++ b/src/interp/util.lisp
@@ -107,7 +107,7 @@ from scratch.
;;; of the {\bf FRICAS} shell variable at build time) if we can't.
;;; Use the parent directory of FRICASsys binary as fallback.
(defun initroot (&optional (newroot nil))
- (reroot (or (|getEnv| "FRICAS") newroot
+ (reroot (or (|getEnv| "FRICAS") (error (concatenate 'string "ERRORX "
newroot))
(if (|fricas_probe_file| $spadroot) $spadroot)
(let ((bin-parent-dir
(concatenate 'string
=====

See attachment for full patch.

ECL uses a different code path, is also tested.

- Qian
simplify-spadroot.patch

Waldek Hebisch

unread,
Oct 6, 2023, 8:16:42 PM10/6/23
to fricas...@googlegroups.com
On Wed, Sep 27, 2023 at 06:55:29PM +0800, Qian Yun wrote:
> Following code builds FriCAS without error, proves that
> "at build time old $spadroot is never being used". We always use
> $FRICAS and only use $FRICAS.
>
> So we can simplify the logic greatly.
<snip>
> See attachment for full patch.
>
> ECL uses a different code path, is also tested.

Thanks, please commit.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages