File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,8 +101,7 @@ cli.parseArguments = function ()
101101 table.insert (SILE .input .luarocksTrees , tree )
102102 end
103103 if opts .makedeps then
104- SILE .makeDeps = require (" core.makedeps" )
105- SILE .makeDeps .filename = opts .makedeps
104+ SILE .input .makedeps = opts .makedeps
106105 end
107106 if opts .output then
108107 if opts .output == " STDIO" then
Original file line number Diff line number Diff line change 206206--
207207-- Does not move on to processing input document(s).
208208function SILE .init ()
209+ if SILE .input .makedeps then
210+ SILE .makeDeps = require (" core.makedeps" )
211+ SILE .makeDeps .filename = SILE .input .makedeps
212+ end
209213 if SILE .backend then
210214 SU .deprecated (" SILE.backend" , " SILE.input.backend" , " 0.15.7" , " 0.17.0" )
211215 SILE .input .backend = SILE .backend
Original file line number Diff line number Diff line change @@ -48,9 +48,13 @@ pub fn start_luavm() -> crate::Result<Lua> {
4848}
4949
5050pub fn inject_paths ( lua : Lua ) -> crate :: Result < Lua > {
51+ // Note set_name() here can't be left blank or it will resolve to src/lib.rs, and it can't be
52+ // something custom that doesn't resolve to an actual file because it will turn up in the
53+ // makedepends list. We use the internal Lua VM's own =[C] syntax which will be relpaced with
54+ // $0 so that the Rust binary becomes the listed dependency.
5155 #[ cfg( feature = "static" ) ]
5256 lua. load ( r#"require("core.pathsetup")"# )
53- . set_name ( "relative pathsetup loader " )
57+ . set_name ( "=[C] " )
5458 . exec ( ) ?;
5559 #[ cfg( not( feature = "static" ) ) ]
5660 {
@@ -70,7 +74,7 @@ pub fn inject_paths(lua: Lua) -> crate::Result<Lua> {
7074 dofile( "./core/pathsetup.lua" )
7175 end
7276 } )
73- . set_name ( "hard coded pathsetup loader " )
77+ . set_name ( "=[C] " )
7478 . exec ( ) ?;
7579 }
7680 Ok ( lua)
You can’t perform that action at this time.
0 commit comments