Fix LaTeX build
diff --git a/.build.yml b/.build.yml
index 90d238c..2ab7807 100644
--- a/.build.yml
+++ b/.build.yml
@@ -10,9 +10,16 @@
- nasm
- texlive
- texlive-latex-extra
+ - texlive-plain-generic
+ - lmodern
- texlive-xetex
- global
tasks:
+ - build-latex: |
+ cd bluejay
+ ./bin/jmk
+ cd doc/lisp_reference
+ make
- build-kernel: |
cd bluejay
./bin/jmk
@@ -23,11 +30,6 @@
./bin/jmk
cd src/lisp
make NO_READLINE=1
- - build-latex: |
- cd bluejay
- ./bin/jmk
- cd doc/lisp_reference
- make
artifacts:
- bluejay/src/lisp/lisp
- bluejay/src/kernel/kernel.elf
diff --git a/src/lisp/Jmk b/src/lisp/Jmk
index ed2e788..03b0e55 100644
--- a/src/lisp/Jmk
+++ b/src/lisp/Jmk
@@ -15,12 +15,14 @@
NO_READLINE ?= 0
-CFLAGS += -Ivendor/luajit/dynasm -Werror -lreadline # -fsanitize=address
-LDFLAGS += -lreadline
+CFLAGS += -Ivendor/luajit/dynasm -Werror # -fsanitize=address
ASMFLAGS += -felf -Fdwarf
ifeq ($(NO_READLINE),1)
CFLAGS += -DNO_READLINE
+else
+LDFLAGS += -lreadline
+CFLAGS += -lreadline
endif
OBJECTS = main.o \
diff --git a/src/lisp/plat/linux.c b/src/lisp/plat/linux.c
index 82ecb10..fa6336f 100644
--- a/src/lisp/plat/linux.c
+++ b/src/lisp/plat/linux.c
@@ -4,8 +4,10 @@
#include <string.h>
#include <sys/mman.h>
#include <unistd.h>
+#ifndef NO_READLINE
#include <readline/readline.h>
#include <readline/history.h>
+#endif
void *malloc_aligned(size_t size)
{
@@ -45,10 +47,16 @@
char *read_input_line(char *prompt)
{
+#ifndef NO_READLINE
return readline(prompt);
+#else
+ return "";
+#endif
}
void add_line_to_history(char *line)
{
+#ifndef NO_READLINE
add_history(line);
+#endif
}