summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2010-01-08 02:31:10 +0000
committerNorbert Preining <preining@logic.at>2010-01-08 02:31:10 +0000
commited002f07fb749ed39bb26cb9ffa9526859ec03c0 (patch)
treeba475d3266ee8b86e0f5874b298a0394395661c3 /Master/texmf
parent02b6d8b30951c6d280c291863925f32a6eb84f50 (diff)
--rebuild-sys also for generate fmtutil and generate language
git-svn-id: svn://tug.org/texlive/trunk@16636 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl49
1 files changed, 45 insertions, 4 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 1bf590ff626..332a4910846 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -2979,6 +2979,17 @@ sub action_generate {
chomp (my $TEXMFLOCAL = `kpsewhich -var-value=TEXMFLOCAL`);
if ($what =~ m/^language(\.dat|\.def)?$/i) {
+ #
+ # we have to set TEXMFVAR, TEXMFCONFIG in the environment so that
+ # searching for language.(dat/def) does search in the right place
+ my $ldat;
+ my $ldef;
+ if ($opts{"rebuild-sys"}) {
+ $ENV{"TEXMFVAR"} = $TEXMFSYSVAR;
+ $ENV{"TEXMFCONFIG"} = $TEXMFSYSCONFIG;
+ chomp ($ldat = `kpsewhich language.dat`);
+ chomp ($ldef = `kpsewhich language.def`);
+ }
if ($what =~ m/^language(\.dat)?$/i) {
$dest ||= "$TEXMFSYSVAR/tex/generic/config/language.dat";
$localconf ||= "$TEXMFLOCAL/tex/generic/config/language-local.dat";
@@ -2989,12 +3000,30 @@ sub action_generate {
# variable so that it is reset to the right value
undef $dest;
}
+ if ($opts{"rebuild-sys"}) {
+ if ($ldat =~ m/^[[:space:]]*$/) {
+ tlwarn("Cannot find language.dat, not updating formats based on it.\n");
+ } else {
+ do_cmd_and_check("fmtutil-sys --byhyphen $ldat");
+ }
+ } else {
+ info("To make the newly-generated language.dat take effect, run fmtutil-sys --byhyphen $ldat.\n");
+ }
}
if ($what =~ m/^language(\.def)?$/i) {
$dest ||= "$TEXMFSYSVAR/tex/generic/config/language.def";
$localconf ||= "$TEXMFLOCAL/tex/generic/config/language-local.def";
debug("$0: writing language.def data to $dest\n");
TeXLive::TLUtils::create_language_def($localtlpdb, $dest, $localconf);
+ if ($opts{"rebuild-sys"}) {
+ if ($ldef =~ m/^[[:space:]]*$/) {
+ tlwarn("Cannot find language.def, not updating formats based on it.\n");
+ } else {
+ do_cmd_and_check("fmtutil-sys --byhyphen $ldef");
+ }
+ } else {
+ info("To make the newly-generated language.def take effect, run fmtutil-sys --byhyphen $ldef.\n");
+ }
}
} elsif ($what =~ m/^fmtutil$/i) {
@@ -3003,6 +3032,12 @@ sub action_generate {
debug("$0: writing new fmtutil.cnf to $dest\n");
TeXLive::TLUtils::create_fmtutil($localtlpdb, $dest, $localconf);
+ if ($opts{"rebuild-sys"}) {
+ do_cmd_and_check("fmtutil-sys --all");
+ } else {
+ info("To make the newly-generated fmtutil.cnf take effect, run fmtutil-sys --all.\n");
+ }
+
} elsif ($what =~ m/^updmap$/i) {
$dest ||= "$TEXMFSYSCONFIG/web2c/updmap.cfg";
$localconf ||= "$TEXMFLOCAL/web2c/updmap-local.cfg";
@@ -5069,10 +5104,16 @@ location in C<TEXMFLOCAL>).
=item B<--rebuild-sys>
-tells tlmgr to call C<updmap-sys> after (re-)generating the C<updmap.cfg>
-file. This is necessary to actually make the changes take effect. it
-is not done by default because often multiple font changes are made in
-succession, and running C<updmap> is a lengthy process.
+tells tlmgr to run necessary programs after config files have been
+regenerated. These are: C<updmap-sys> after C<generate updmap>,
+C<fmtutil-sys --all> after C<generate fmtutil>,
+C<fmtutil-sys --byhyphen .../language.dat> after C<generate language.dat>,
+and
+C<fmtutil-sys --byhyphen .../language.def> after C<generate language.def>.
+
+This is necessary to actually make the changes take effect.
+This is not done by default since those calls are lengthy processes and
+one might want to made several changes before running these programs.
=back