mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
tweaks for new build system
- forward unknown make targets to base - add `cmake` and `staging` directories to ignored output artifacts - drop `package.path` and `package.cpath` luarocks specific entries
This commit is contained in:
committed by
Frans de Jonge
parent
1c9c35dcb3
commit
5a465f413b
12
Makefile
12
Makefile
@@ -1,3 +1,5 @@
|
||||
PHONY = all android-ndk android-sdk base clean coverage doc fetchthirdparty po pot static-check test testfront
|
||||
|
||||
# koreader-base directory
|
||||
KOR_BASE?=base
|
||||
|
||||
@@ -69,7 +71,7 @@ ifeq ($(abspath $(OUTPUT_DIR)),$(OUTPUT_DIR))
|
||||
else
|
||||
ABSOLUTE_OUTPUT_DIR = $(KOR_BASE)/$(OUTPUT_DIR)
|
||||
endif
|
||||
OUTPUT_DIR_ARTIFACTS = $(ABSOLUTE_OUTPUT_DIR)/!(cache|history|thirdparty)
|
||||
OUTPUT_DIR_ARTIFACTS = $(ABSOLUTE_OUTPUT_DIR)/!(cache|cmake|history|staging|thirdparty)
|
||||
|
||||
all: base
|
||||
install -d $(INSTALL_DIR)/koreader
|
||||
@@ -217,4 +219,10 @@ static-check:
|
||||
doc:
|
||||
make -C doc
|
||||
|
||||
.PHONY: all android-ndk android-sdk base clean doc test
|
||||
.NOTPARALLEL:
|
||||
.PHONY: $(PHONY)
|
||||
|
||||
LEFTOVERS = $(filter-out $(PHONY) $(INSTALL_DIR)/%,$(MAKECMDGOALS))
|
||||
.PHONY: $(LEFTOVERS)
|
||||
$(LEFTOVERS):
|
||||
$(MAKE) -C $(KOR_BASE) $@
|
||||
|
||||
2
kodev
2
kodev
@@ -804,7 +804,7 @@ TARGET:
|
||||
# We don't want to stack valgrind/catchsegv on top of GDB ;).
|
||||
if [[ "${gdb}" == gdb* ]]; then
|
||||
# The standard CLI needs a little hand holding to properly pass arguments to the process it'll monitor
|
||||
KOREADER_COMMAND="${gdb} --args ./luajit reader.lua ${KOREADER_ARGS} ${args}"
|
||||
KOREADER_COMMAND="${gdb} --directory "${CURDIR}/base" --args ./luajit reader.lua ${KOREADER_ARGS} ${args}"
|
||||
else
|
||||
KOREADER_COMMAND="${gdb} ./luajit reader.lua ${KOREADER_ARGS} ${args}"
|
||||
fi
|
||||
|
||||
@@ -64,4 +64,4 @@ update: all
|
||||
cp $(ANDROID_LAUNCHER_DIR)/bin/NativeActivity.apk \
|
||||
koreader-android-$(ANDROID_ARCH)$(KODEDUG_SUFFIX)-$(VERSION).apk
|
||||
|
||||
.PHONY: androiddev update
|
||||
PHONY += androiddev update
|
||||
|
||||
@@ -33,4 +33,4 @@ endif
|
||||
ARCH=x86_64 "$$OLDPWD/$(APPIMAGETOOL)" --appimage-extract-and-run koreader && \
|
||||
mv *.AppImage ../../koreader-$(DIST)-$(MACHINE)-$(VERSION).AppImage
|
||||
|
||||
.PHONY: update
|
||||
PHONY += update
|
||||
|
||||
@@ -30,4 +30,4 @@ update: all
|
||||
tar --hard-dereference -I"gzip --rsyncable" -cah --no-recursion -f ../$(CERVANTES_PACKAGE_OTA) \
|
||||
-T koreader/ota/package.index
|
||||
|
||||
.PHONY: update
|
||||
PHONY += update
|
||||
|
||||
@@ -43,4 +43,4 @@ update: all
|
||||
tar --hard-dereference -I"gzip --rsyncable" -cah --no-recursion -f ../$(KINDLE_PACKAGE_OTA) \
|
||||
-T koreader/ota/package.index
|
||||
|
||||
.PHONY: update
|
||||
PHONY += update
|
||||
|
||||
@@ -30,4 +30,4 @@ update: all
|
||||
tar --hard-dereference -I"gzip --rsyncable" -cah --no-recursion -f ../$(KOBO_PACKAGE_OTA) \
|
||||
-T koreader/ota/package.index
|
||||
|
||||
.PHONY: update
|
||||
PHONY += update
|
||||
|
||||
@@ -41,4 +41,4 @@ update: all
|
||||
|
||||
rm -rf $(INSTALL_DIR)/linux
|
||||
|
||||
.PHONY: update
|
||||
PHONY += update
|
||||
|
||||
@@ -11,4 +11,4 @@ update: all
|
||||
rm -rfv "$(INSTALL_DIR)/bundle/Contents/MainMenu.xib"
|
||||
$(CURDIR)/platform/mac/do_mac_bundle.sh $(INSTALL_DIR)
|
||||
|
||||
.PHONY: update
|
||||
PHONY += update
|
||||
|
||||
@@ -40,4 +40,4 @@ update: all
|
||||
tar --hard-dereference -I"gzip --rsyncable" -cah --no-recursion -f ../../$(PB_PACKAGE_OTA) \
|
||||
-T koreader/ota/package.index
|
||||
|
||||
.PHONY: update
|
||||
PHONY += update
|
||||
|
||||
@@ -29,4 +29,4 @@ update: all
|
||||
tar -I"gzip --rsyncable" -cah --no-recursion -f ../$(REMARKABLE_PACKAGE_OTA) \
|
||||
-T koreader/ota/package.index
|
||||
|
||||
.PHONY: update
|
||||
PHONY += update
|
||||
|
||||
@@ -28,4 +28,4 @@ update: all
|
||||
tar --hard-dereference -I"gzip --rsyncable" -cah --no-recursion -f ../$(SONY_PRSTUX_PACKAGE_OTA) \
|
||||
-T koreader/ota/package.index
|
||||
|
||||
.PHONY: update
|
||||
PHONY += update
|
||||
|
||||
@@ -27,4 +27,4 @@ update: all
|
||||
click build koreader && \
|
||||
mv *.click ../../koreader-$(DIST)-$(MACHINE)-$(VERSION).click
|
||||
|
||||
.PHONY: update
|
||||
PHONY += update
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
-- set search path for 'require()'
|
||||
package.path =
|
||||
"common/?.lua;rocks/share/lua/5.1/?.lua;frontend/?.lua;" ..
|
||||
"common/?.lua;frontend/?.lua;" ..
|
||||
package.path
|
||||
package.cpath =
|
||||
"common/?.so;common/?.dll;/usr/lib/lua/?.so;rocks/lib/lua/5.1/?.so;" ..
|
||||
"common/?.so;common/?.dll;/usr/lib/lua/?.so;" ..
|
||||
package.cpath
|
||||
|
||||
-- set search path for 'ffi.load()'
|
||||
@@ -20,7 +20,7 @@ ffi.load = function(lib, global)
|
||||
local loaded, re = pcall(ffi_load, lib)
|
||||
if loaded then return re end
|
||||
|
||||
local lib_path = package.searchpath(lib, "./lib?.so;./libs/lib?.so;./libs/lib?.so.1;./rocks/lib/lua/5.1/lib?.so")
|
||||
local lib_path = package.searchpath(lib, "./lib?.so;./libs/lib?.so;./libs/lib?.so.1")
|
||||
|
||||
if not lib_path then
|
||||
io.write("ffi.load (warning): ", re, "\n")
|
||||
|
||||
@@ -34,8 +34,8 @@ if not busted_ok then
|
||||
end
|
||||
end
|
||||
|
||||
package.path = "?.lua;common/?.lua;rocks/share/lua/5.1/?.lua;frontend/?.lua;" .. package.path
|
||||
package.cpath = "?.so;common/?.so;/usr/lib/lua/?.so;rocks/lib/lua/5.1/?.so;" .. package.cpath
|
||||
package.path = "?.lua;common/?.lua;frontend/?.lua;" .. package.path
|
||||
package.cpath = "?.so;common/?.so;/usr/lib/lua/?.so;" .. package.cpath
|
||||
|
||||
-- turn off debug by default and set log level to warning
|
||||
require("dbg"):turnOff()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
describe("Dbg module", function()
|
||||
local dbg, dbg_on
|
||||
setup(function()
|
||||
package.path = "?.lua;common/?.lua;rocks/share/lua/5.1/?.lua;frontend/?.lua;" .. package.path
|
||||
package.path = "?.lua;common/?.lua;frontend/?.lua;" .. package.path
|
||||
dbg = require("dbg")
|
||||
dbg_on = dbg.is_on
|
||||
end)
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
-- usage: ./luajit tools/benchmark.lua test/sample.pdf
|
||||
|
||||
require "defaults"
|
||||
package.path = "common/?.lua;rocks/share/lua/5.1/?.lua;frontend/?.lua;" .. package.path
|
||||
package.cpath = "common/?.so;common/?.dll;/usr/lib/lua/?.so;rocks/lib/lua/5.1/?.so;" .. package.cpath
|
||||
package.path = "common/?.lua;frontend/?.lua;" .. package.path
|
||||
package.cpath = "common/?.so;common/?.dll;/usr/lib/lua/?.so;" .. package.cpath
|
||||
|
||||
local DataStorage = require("datastorage")
|
||||
--G_reader_settings = require("docsettings"):open(".reader")
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
-- usage: ./luajit tools/kobo_touch_probe.lua
|
||||
|
||||
require "defaults"
|
||||
package.path = "common/?.lua;rocks/share/lua/5.1/?.lua;frontend/?.lua;" .. package.path
|
||||
package.cpath = "common/?.so;common/?.dll;/usr/lib/lua/?.so;rocks/lib/lua/5.1/?.so;" .. package.cpath
|
||||
package.path = "common/?.lua;frontend/?.lua;" .. package.path
|
||||
package.cpath = "common/?.so;common/?.dll;/usr/lib/lua/?.so;" .. package.cpath
|
||||
|
||||
local DataStorage = require("datastorage")
|
||||
local _ = require("gettext")
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
-- usage: ./luajit tools/wtest.lua
|
||||
|
||||
print(package.path)
|
||||
package.path = "common/?.lua;rocks/share/lua/5.1/?.lua;frontend/?.lua;" .. package.path
|
||||
package.cpath = "common/?.so;common/?.dll;/usr/lib/lua/?.so;rocks/lib/lua/5.1/?.so;" .. package.cpath
|
||||
package.path = "common/?.lua;frontend/?.lua;" .. package.path
|
||||
package.cpath = "common/?.so;common/?.dll;/usr/lib/lua/?.so;" .. package.cpath
|
||||
|
||||
-- Load default settings
|
||||
G_defaults = require("luadefaults"):open()
|
||||
|
||||
Reference in New Issue
Block a user