From 12fc7ee3ae7730f90014b301df62d10f14c8eb6d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 29 Nov 2015 22:45:29 +0000 Subject: musixtex (29nov15) git-svn-id: svn://tug.org/texlive/trunk@38974 c570f23f-e606-0410-a88d-b1316a301751 --- .../texlive/linked_scripts/musixtex/musixtex.lua | 81 +++++++++++++++------- .../texk/texlive/linked_scripts/texlive/tlmgr.pl | 61 +++++++--------- 2 files changed, 81 insertions(+), 61 deletions(-) (limited to 'Build') diff --git a/Build/source/texk/texlive/linked_scripts/musixtex/musixtex.lua b/Build/source/texk/texlive/linked_scripts/musixtex/musixtex.lua index 3977fb38cf4..c85f38a8a15 100755 --- a/Build/source/texk/texlive/linked_scripts/musixtex/musixtex.lua +++ b/Build/source/texk/texlive/linked_scripts/musixtex/musixtex.lua @@ -1,6 +1,6 @@ #!/usr/bin/env texlua -VERSION = "0.11" +VERSION = "0.12" --[[ musixtex.lua: processes MusiXTeX files (and deletes intermediate files) @@ -26,6 +26,9 @@ VERSION = "0.11" --[[ ChangeLog: + version 0.12 2015-11-28 RDT + Process .ltx files with -l implied + version 0.11 2015-07-16 RDT Automatic autosp preprocessing. @@ -64,10 +67,10 @@ VERSION = "0.11" --]] function usage() - print("Usage: [texlua] musixtex.lua { option | basename[.tex] | basename[.aspc] } ... ") + print("Usage: [texlua] musixtex.lua { option | basename[.tex] | basename[.aspc] basename[.ltx] } ... ") print("options: -v version") print(" -h help") - print(" -l latex (or pdflatex)") + print(" -l latex (or pdflatex) (implied with .ltx extension)") print(" -p pdfetex (or pdflatex)") print(" -d dvipdfm") print(" -s stop at dvi") @@ -76,7 +79,7 @@ function usage() print(" -1 one-pass [pdf][la]tex processing") print(" -F fmt use fmt as the TeX processor") print(" -x run makeindex") - print(" -a preprocess using autosp") + print(" -a preprocess using autosp (impled with .aspc extension)") print(" -f restore default processing") end @@ -144,31 +147,57 @@ repeat tex = arg[narg] else repeat -- pseudo loop to get effect of "continue" using "break" - filename = this_arg - if filename ~= "" and string.sub(filename, -5, -1) == ".aspc" then - if io.open(filename, "r") then - print("Processing ".. filename ) + texfilename = this_arg + if texfilename ~= "" and string.sub(texfilename, -5, -1) == ".aspc" then + if io.open(texfilename, "r") then + print("Processing ".. texfilename ) else - print("No file: " .. filename ) + print("No file: " .. texfilename ) break -- out of pseudo loop end preprocess = 1 - filename = string.sub(filename, 1, -6) - elseif filename ~= "" and string.sub(filename, -4, -1) == ".tex" then - if io.open(filename, "r") then - print("Processing ".. filename ) + filename = string.sub(texfilename, 1, -6) + texfilename = filename .. ".tex" + elseif texfilename ~= "" and string.sub(texfilename, -4, -1) == ".ltx" then + if io.open(texfilename, "r") then + print("Processing ".. texfilename ) + else + print("No file: " .. texfilename ) + break -- out of pseudo loop + end + if tex == "pdfetex" then + tex = "pdflatex" else - print("No file: " .. filename ) + tex = "latex" + end + filename = string.sub(texfilename, 1, -5) + elseif texfilename ~= "" and string.sub(texfilename, -4, -1) == ".tex" then + if io.open(texfilename, "r") then + print("Processing ".. texfilename ) + else + print("No file: " .. texfilename ) break -- out of pseudo loop end - filename = string.sub(filename, 1, -5) - elseif io.open(filename .. ".aspc", "r") then + filename = string.sub(texfilename, 1, -5) + elseif io.open(texfilename .. ".aspc", "r") then preprocess = 1 - print("Processing ".. filename .. ".aspc") - elseif io.open(filename .. ".tex", "r") then - print("Processing ".. filename .. ".tex") + print("Processing ".. texfilename .. ".aspc") + filename = texfilename + elseif io.open(texfilename .. ".ltx", "r") then + if tex == "pdfetex" then + tex = "pdflatex" + else + tex = "latex" + end + ltx = 1 + filename = texfilename + texfilename = filename .. ".ltx" + elseif io.open(texfilename .. ".tex", "r") then + print("Processing ".. texfilename .. ".tex") + filename = texfilename + texfilename = filename .. ".tex" else - print("No file: " .. filename ) + print("No file: " .. texfilename ) break -- out of pseudo loop end if preprocess == 1 and os.execute("autosp " .. filename) ~= 0 then @@ -176,18 +205,18 @@ repeat break -- out of pseudo loop end os.remove( filename .. ".mx2" ) - if (passes == 1 or os.execute(tex .. " " .. filename) == 0) and + if (passes == 1 or os.execute(tex .. " " .. texfilename) == 0) and (passes == 1 or os.execute(musixflx .. " " .. filename) == 0) and - (os.execute(tex .. " " .. filename) == 0) and + (os.execute(tex .. " " .. texfilename) == 0) and ((tex ~= "latex" and tex ~="pdflatex") or (index == 0) or (os.execute("makeindex -q " .. filename) == 0)) and ((tex ~= "latex" and tex ~= "pdflatex") - or (os.execute(tex .. " " .. filename) == 0)) and + or (os.execute(tex .. " " .. texfilename) == 0)) and ((tex ~= "latex" and tex ~= "pdflatex") - or (os.execute(tex .. " " .. filename) == 0)) and + or (os.execute(tex .. " " .. texfilename) == 0)) and ((tex ~= "latex" and tex ~= "pdflatex") - or (os.execute(tex .. " " .. filename) == 0)) and + or (os.execute(tex .. " " .. texfilename) == 0)) and (dvi == "" or (os.execute(dvi .. " " .. filename) == 0)) and (ps2pdf == "" or (os.execute(ps2pdf .. " " .. filename .. ".ps") == 0) ) then @@ -205,7 +234,7 @@ repeat end end else - print("Musixtex processing of " .. filename .. ".tex fails.\n") + print("Musixtex processing of " .. texfilename " fails.\n") exit_code = 2 --[[ uncomment for debugging print("tex = ", tex) diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl index efa474960d2..173e69dedb3 100755 --- a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl +++ b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl @@ -1,13 +1,13 @@ #!/usr/bin/env perl -# $Id: tlmgr.pl 38720 2015-10-26 22:29:22Z karl $ +# $Id: tlmgr.pl 38967 2015-11-28 02:15:58Z preining $ # # Copyright 2008-2015 Norbert Preining # This file is licensed under the GNU General Public License version 2 # or any later version. # -my $svnrev = '$Revision: 38720 $'; -my $datrev = '$Date: 2015-10-26 23:29:22 +0100 (Mon, 26 Oct 2015) $'; +my $svnrev = '$Revision: 38967 $'; +my $datrev = '$Date: 2015-11-28 03:15:58 +0100 (Sat, 28 Nov 2015) $'; my $tlmgrrevision; my $prg; if ($svnrev =~ m/: ([0-9]+) /) { @@ -823,32 +823,6 @@ sub handle_execute_actions { } } - # - # check if *depending* formats have been changed - # we are currently only caring for package "latex" and "tex". If - # one of these has changed, we search for all packages *depending* - # on latex/tex and regenerate all formats in these packages. - # - # do this only if we are not in --list or --dry-run mode - if (!$opts{"list"}) { - my @check_indirect_formats; - # TODO: - # in case that hyphenation patterns are changed, ie $regenerate_language - # then maybe we don't need to update latex based ones? - push @check_indirect_formats, $localtlpdb->needed_by("latex") - if ($::latex_updated); - push @check_indirect_formats, $localtlpdb->needed_by("tex") - if ($::tex_updated); - for my $p (@check_indirect_formats) { - my $tlp = $localtlpdb->get_package($p); - if (!defined($tlp)) { - tlwarn("$p mentioned but not found in local tlpdb, strange!\n"); - next; - } - TeXLive::TLUtils::announce_execute_actions("enable", $tlp, "format"); - } - } - # format-regenerate is used when the paper size changes. In that # case, if option("create_formats") is set, we simply want to generate # all formats @@ -3301,12 +3275,8 @@ sub action_update { # special check for depending format updates: # if one of latex or tex has been updated, we rebuild the formats # defined in packages *depending* on these packages. - if (!$opts{"list"}) { - if ($updated{"latex"} || $updated{"babel"}) { - TeXLive::TLUtils::announce_execute_actions("latex-updated"); - } - TeXLive::TLUtils::announce_execute_actions("tex-updated") if ($updated{"tex"}); - } + check_announce_format_triggers(@inst_packs, @new_packs) + if (!$opts{"list"}); print "end-of-updates\n" if $::machinereadable; @@ -3462,6 +3432,27 @@ END_DISK_WARN } +sub check_announce_format_triggers { + # we treat new and updated packages the same as updated + # when it comes to triggers + my %updpacks = map { $_ => 1 } @_; + + # search all format definitions in the tlpdb + FMTDEF: for my $fmtdef ($localtlpdb->format_definitions) { + # if by default they are activated, check the whether the + # trigger packages appear in the list of updated/new packages + if (($fmtdef->{'mode'} == 1) && $fmtdef->{'fmttriggers'}) { + for my $trigger (@{$fmtdef->{'fmttriggers'}}) { + if ($updpacks{$trigger}) { + TeXLive::TLUtils::announce_execute_actions("rebuild-format", + 0, $fmtdef); + next FMTDEF; + } + } + } + } +} + # INSTALL # # tlmgr install foo bar baz -- cgit v1.2.3