summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-04-24 09:07:53 +0000
committerNorbert Preining <preining@logic.at>2008-04-24 09:07:53 +0000
commit36207075ee39a6516879dddd8daa4e3ebb43764c (patch)
treecd7b5a31344aaa86ca6b9f96840d573fedecb854
parenta660d2695030b1107c7cc04162d1a4b511493f2b (diff)
format regeneration when paper has changed
git-svn-id: svn://tug.org/texlive/trunk@7627 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/texmf/scripts/texlive/texconf.tlu26
1 files changed, 22 insertions, 4 deletions
diff --git a/Master/texmf/scripts/texlive/texconf.tlu b/Master/texmf/scripts/texlive/texconf.tlu
index c3597886e4b..cec0cebd3fe 100755
--- a/Master/texmf/scripts/texlive/texconf.tlu
+++ b/Master/texmf/scripts/texlive/texconf.tlu
@@ -7,9 +7,6 @@
-- texconf is a subset of Thomas Esser's texconfig shell script.
--
--- TODO
--- . call mktexlsr texmfconfig only if something has changed, not
--- in the case of usage messages
function fixwin(args_unix)
if os.type == 'windows' then
@@ -36,6 +33,9 @@ basename=select(1, string.gsub(filename, '\.tlu$', ''))
usageprogname = basename
+domktexlsr = false
+doformat = false
+
sys=false
if string.find(basename, '-sys$') then
@@ -274,6 +274,7 @@ function set_dvips_papersize(papersize)
end
config:close()
print ('> '..texmfconfig..'/dvips/config/config.ps')
+ domktexlsr = true
end
end -- set_dvips_papersize
@@ -342,6 +343,7 @@ function set_xdvi_papersize(papersize)
end
config:close()
print ('> '..texmfconfig..'/xdvi/XDvi')
+ domktexlsr = true
end
end
@@ -417,6 +419,8 @@ function set_pdftex_papersize(papersize)
end
config:close()
print ('> '..outfile)
+ domktexlsr = true
+ doformat = true
end
end
@@ -489,6 +493,7 @@ function set_dvipdfm_papersize(papersize, program)
end
end
config:close()
+ domktexlsr = true
end
end
@@ -576,12 +581,25 @@ else
end
-if sys then
+if sys and domktexlsr then
command = { "mktexlsr", texmfconfig }
command = fixwin(command)
os.spawn(command)
end
+if doformat then
+ -- we have to update the formats
+ -- I don't know how to select only those formats for which pdftexconfig.tex
+ -- is necessary, so we call fmtutil-sys --refresh
+ -- that will recreate a lot, sorry
+ if sys then
+ command = { "fmtutil-sys", "--refresh" }
+ else
+ command = { "fmtutil", "--refresh" }
+ end
+ os.spawn(command)
+end
+
-- Local Variables:
-- lua-indent-level: 2
-- tab-width: 2