2
0
mirror of https://github.com/koreader/koreader synced 2024-11-10 01:10:34 +00:00

make: add run rules for emulator targets

This commit is contained in:
Benoit Pierre 2024-08-11 20:58:23 +02:00 committed by Frans de Jonge
parent 59b533a83d
commit 387a9de305

View File

@ -1,3 +1,32 @@
# Run. {{{
PHONY += run run-prompt run-wbuilder
define run_script
for a in $(RARGS); do
[[ "$$a" = [-/]* ]] || a="$${PWD}/$$a";
set -- "$$@" "$$a";
done;
cd $(INSTALL_DIR)/koreader &&
while true; do
code=0;
$(RWRAP) ./luajit reader.lua "$$@" || code=$$?;
[ $${code} -eq 85 ] || exit $${code};
set --;
done
endef
run: all
$(strip $(run_script))
run-prompt: all
cd $(INSTALL_DIR)/koreader && ./luajit -i setupkoenv.lua
run-wbuilder: all
cd $(INSTALL_DIR)/koreader && EMULATE_READER_W=540 EMULATE_READER_H=720 ./luajit tools/wbuilder.lua
# }}}
# Testing & coverage. {{{
PHONY += coverage test testbase testfront