[latex3-commits] [git/LaTeX3-latex3-l3build] standalone: Load variables only once (see #40) (f8fb466)
Joseph Wright
joseph.wright at morningstar2.co.uk
Tue Mar 6 08:25:30 CET 2018
Repository : https://github.com/latex3/l3build
On branch : standalone
Link : https://github.com/latex3/l3build/commit/f8fb4660ea5bed74a84cf6a5cda2af827aa3894b
>---------------------------------------------------------------
commit f8fb4660ea5bed74a84cf6a5cda2af827aa3894b
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Tue Mar 6 07:25:30 2018 +0000
Load variables only once (see #40)
This should allow both forms of usage, for the present,
but without having to reload files.
>---------------------------------------------------------------
f8fb4660ea5bed74a84cf6a5cda2af827aa3894b
l3build.lua | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/l3build.lua b/l3build.lua
index 8663ec2..ed3bd82 100644
--- a/l3build.lua
+++ b/l3build.lua
@@ -41,6 +41,7 @@ local tonumber = tonumber
local exit = os.exit
-- l3build setup and functions
+-- Note that global (config) variables are done a little later
kpse.set_program_name("kpsewhich")
build_kpse_path = string.match(lookup("l3build.lua"),"(.*[/])")
@@ -48,7 +49,6 @@ local function build_require(s)
require(lookup("l3build-"..s..".lua", { path = build_kpse_path } ) )
end
-build_require("variables")
build_require("arguments")
build_require("file-functions")
build_require("typesetting")
@@ -78,15 +78,16 @@ if match(arg[0], "l3build(%.lua)$") then
elseif fileexists("build.lua") then
-- Force these to be undefined: needed for the reloading step
dofile("build.lua")
- -- Reload the variables to set things up correctly
- -- Has to be dofile() as require() doesn't reload
- dofile(lookup("l3build-variables.lua", { path = build_kpse_path } ))
else
print("Error: Cannot find configuration build.lua")
exit(1)
end
end
+-- Load standard settings for variables:
+-- comes after any user versions
+build_require("variables")
+
-- Tidy up the epoch setting
-- Force an epoch if set at the command line
-- Must be done after loading variables, etc.
More information about the latex3-commits
mailing list