Enhance sextant-bootstrap to spawn a slynk server or make library

This commit is contained in:
Renaud Casenave-Péré 2023-06-29 23:30:41 +02:00
parent df036192ea
commit 2c82fcb25e
5 changed files with 24 additions and 20 deletions

View file

@ -108,4 +108,5 @@
;; re-ini
)
#+harbour-sextant
(qlater #'start)

8
load.lisp Normal file
View file

@ -0,0 +1,8 @@
#-eql5
(error "Please use the EQL5 executable")
(push :sextant-repl *features*)
(load "lisp/bundle.lisp")
(asdf:load-system "sextant")

View file

@ -1,10 +1,7 @@
#-eql5
(error "Please use the EQL5 executable")
(unless (member "norepl" (ext:command-args) :test #'string=)
(push :sextant-repl *features*))
(load "lisp/bundle.lisp")
(push :harbour-sextant *features*)
(asdf:make-build "sextant"
:monolithic t
@ -16,5 +13,3 @@
(when (probe-file lib-name)
(delete-file lib-name))
(rename-file (x:cc "sextant--all-systems" ".a") lib-name))
(eql:qquit)

View file

@ -31,7 +31,7 @@ LISP_FILES = make.lisp \
lisp/local-projects/sextant/org/all.lisp
lisp.output = libsextant.a
lisp.commands = $$PWD/sextant-bootstrap -platform minimal $$PWD/make.lisp
lisp.commands = $$PWD/sextant-bootstrap -platform minimal -make
lisp.input = LISP_FILES
lisp.CONFIG = combine target_predeps
@ -45,14 +45,6 @@ CONFIG += sailfishapp
LIBS += -L. -lsextant-parser -lsextant -lecl -leql5
QT += widgets qml multimedia network quick sql
norepl|standalone:lisp.commands = $$PWD/sextant-bootstrap -platform minimal $$PWD/make.lisp norepl
standalone {
CONFIG += link_prl
LIBS -= -lecl -leql5
LIBS += -l:libecl.a -l:libeclatomic.a -l:libeclgc.a -l:libeclgmp.a -l:libeclffi.a -l:libeql5.a
}
SOURCES += src/harbour-sextant.cc
DISTFILES += qml/harbour-sextant.qml \

View file

@ -13,8 +13,7 @@ int main(int argc, char** argv)
EQL::ini(argc, argv);
if (argc == 1)
return 0;
QStringList args(QCoreApplication::arguments());
EQL eql;
eql.printVersion();
@ -23,9 +22,18 @@ int main(int argc, char** argv)
si_select_package(ecl_make_constant_base_string("COMMON-LISP-USER", 16));
std::string code("(load \"");
code += argv[1];
code += "\")";
std::string code("(progn (load \"load.lisp\")");
if (args.contains("-repl")) {
code += "(funcall (intern (symbol-name 'start-slynk) :sextant)) ";
code += "(si:top-level)";
}
else {
if (args.contains("-make"))
code += "(load \"make.lisp\")";
}
code += ")";
CL_CATCH_ALL_BEGIN(ecl_process_env())
{