~swisschili/bluejay

4691cf6c7820af91ef4d6d697e4214ce4b33df8e — swissChili 3 months ago 6d02af4
Fix LaTeX build
3 files changed, 19 insertions(+), 7 deletions(-)

M .build.yml
M src/lisp/Jmk
M src/lisp/plat/linux.c
M .build.yml => .build.yml +7 -5
@@ 10,9 10,16 @@ packages:
  - 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 @@ tasks:
      ./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

M src/lisp/Jmk => src/lisp/Jmk +4 -2
@@ 15,12 15,14 @@ archetype(asm)

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 \

M src/lisp/plat/linux.c => src/lisp/plat/linux.c +8 -0
@@ 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 @@ bool file_exists(const char *path)

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
}