diff options
author | Karl Berry <karl@freefriends.org> | 2023-02-27 18:45:24 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-02-27 18:45:24 +0000 |
commit | 03455e0c2cf3f72d34026071f889510ed47ff98c (patch) | |
tree | b136bfafb0785e02534006dcdf2ac2147431c8dd /Build/source | |
parent | 715a7beb52e172f6cb2084f6672935a858b3f4f1 (diff) |
linked_scripts updates for context and windows; other syncs,doc
git-svn-id: svn://tug.org/texlive/trunk@66220 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rwxr-xr-x | Build/source/build-aux/ltmain.sh | 855 | ||||
-rw-r--r-- | Build/source/texk/tests/TeXLive/TLConfig.pm | 12 | ||||
-rw-r--r-- | Build/source/texk/tests/TeXLive/TLUtils.pm | 102 | ||||
-rw-r--r-- | Build/source/texk/texlive/linked_scripts/Makefile.am | 53 | ||||
-rw-r--r-- | Build/source/texk/texlive/linked_scripts/Makefile.in | 31 | ||||
-rw-r--r-- | Build/source/texk/texlive/linked_scripts/scripts.lst | 7 | ||||
-rwxr-xr-x | Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl | 82 | ||||
-rw-r--r-- | Build/source/texk/texlive/tl_support/fmtutil.cnf | 11 |
8 files changed, 689 insertions, 464 deletions
diff --git a/Build/source/build-aux/ltmain.sh b/Build/source/build-aux/ltmain.sh index 0f0a2da3f9d..2a50d7f6f72 100755 --- a/Build/source/build-aux/ltmain.sh +++ b/Build/source/build-aux/ltmain.sh @@ -1,12 +1,12 @@ -#! /bin/sh +#! /usr/bin/env sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in -## by inline-source v2014-01-03.01 +## by inline-source v2019-02-19.15 -# libtool (GNU libtool) 2.4.6 +# libtool (GNU libtool) 2.4.7 # Provide generalized library-building support services. # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 -# Copyright (C) 1996-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -31,8 +31,8 @@ PROGRAM=libtool PACKAGE=libtool -VERSION=2.4.6 -package_revision=2.4.6 +VERSION=2.4.7 +package_revision=2.4.7 ## ------ ## @@ -64,34 +64,25 @@ package_revision=2.4.6 # libraries, which are installed to $pkgauxdir. # Set a version string for this script. -scriptversion=2015-01-20.17; # UTC +scriptversion=2019-02-19.15; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 -# Copyright (C) 2004-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. - -# As a special exception to the GNU General Public License, if you distribute -# this file as part of a program or library that is built using GNU Libtool, -# you may include this file under the same distribution terms that you use -# for the rest of that program. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# This is free software. There is NO warranty; not even for +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Copyright (C) 2004-2019, 2021 Bootstrap Authors +# +# This file is dual licensed under the terms of the MIT license +# <https://opensource.org/license/MIT>, and GPL version 2 or later +# <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of +# these licenses when using or redistributing this software or any of +# the files within it. See the URLs above, or the file `LICENSE` +# included in the Bootstrap distribution for the full license texts. -# Please report bugs or propose patches to gary@gnu.org. +# Please report bugs or propose patches to: +# <https://github.com/gnulib-modules/bootstrap/issues> ## ------ ## @@ -139,9 +130,12 @@ do _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# These NLS vars are set unconditionally (bootstrap issue #24). Unset those +# in case the environment reset is needed later and the $save_* variant is not +# defined (see the code above). +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL # Make sure IFS has a sensible default sp=' ' @@ -159,6 +153,26 @@ if test "${PATH_SEPARATOR+set}" != set; then fi +# func_unset VAR +# -------------- +# Portably unset VAR. +# In some shells, an 'unset VAR' statement leaves a non-zero return +# status if VAR is already unset, which might be problematic if the +# statement is used at the end of a function (thus poisoning its return +# value) or when 'set -e' is active (causing even a spurious abort of +# the script in this case). +func_unset () +{ + { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; } +} + + +# Make sure CDPATH doesn't cause `cd` commands to output the target dir. +func_unset CDPATH + +# Make sure ${,E,F}GREP behave sanely. +func_unset GREP_OPTIONS + ## ------------------------- ## ## Locate command utilities. ## @@ -259,7 +273,7 @@ test -z "$SED" && { rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin" rm -f conftest.sed SED=$func_path_progs_result } @@ -295,7 +309,7 @@ test -z "$GREP" && { rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin" GREP=$func_path_progs_result } @@ -360,6 +374,35 @@ sed_double_backslash="\ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" +# require_check_ifs_backslash +# --------------------------- +# Check if we can use backslash as IFS='\' separator, and set +# $check_ifs_backshlash_broken to ':' or 'false'. +require_check_ifs_backslash=func_require_check_ifs_backslash +func_require_check_ifs_backslash () +{ + _G_save_IFS=$IFS + IFS='\' + _G_check_ifs_backshlash='a\\b' + for _G_i in $_G_check_ifs_backshlash + do + case $_G_i in + a) + check_ifs_backshlash_broken=false + ;; + '') + break + ;; + *) + check_ifs_backshlash_broken=: + break + ;; + esac + done + IFS=$_G_save_IFS + require_check_ifs_backslash=: +} + ## ----------------- ## ## Global variables. ## @@ -580,16 +623,16 @@ if test yes = "$_G_HAVE_PLUSEQ_OP"; then { $debug_cmd - func_quote_for_eval "$2" - eval "$1+=\\ \$func_quote_for_eval_result" + func_quote_arg pretty "$2" + eval "$1+=\\ \$func_quote_arg_result" }' else func_append_quoted () { $debug_cmd - func_quote_for_eval "$2" - eval "$1=\$$1\\ \$func_quote_for_eval_result" + func_quote_arg pretty "$2" + eval "$1=\$$1\\ \$func_quote_arg_result" } fi @@ -1091,85 +1134,203 @@ func_relative_path () } -# func_quote_for_eval ARG... -# -------------------------- -# Aesthetically quote ARGs to be evaled later. -# This function returns two values: -# i) func_quote_for_eval_result -# double-quoted, suitable for a subsequent eval -# ii) func_quote_for_eval_unquoted_result -# has all characters that are still active within double -# quotes backslashified. -func_quote_for_eval () +# func_quote_portable EVAL ARG +# ---------------------------- +# Internal function to portably implement func_quote_arg. Note that we still +# keep attention to performance here so we as much as possible try to avoid +# calling sed binary (so far O(N) complexity as long as func_append is O(1)). +func_quote_portable () { $debug_cmd - func_quote_for_eval_unquoted_result= - func_quote_for_eval_result= - while test 0 -lt $#; do - case $1 in - *[\\\`\"\$]*) - _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; - *) - _G_unquoted_arg=$1 ;; - esac - if test -n "$func_quote_for_eval_unquoted_result"; then - func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" - else - func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" + $require_check_ifs_backslash + + func_quote_portable_result=$2 + + # one-time-loop (easy break) + while true + do + if $1; then + func_quote_portable_result=`$ECHO "$2" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` + break fi - case $_G_unquoted_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and variable expansion - # for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_quoted_arg=\"$_G_unquoted_arg\" + # Quote for eval. + case $func_quote_portable_result in + *[\\\`\"\$]*) + # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string + # contains the shell wildcard characters. + case $check_ifs_backshlash_broken$func_quote_portable_result in + :*|*[\[\*\?]*) + func_quote_portable_result=`$ECHO "$func_quote_portable_result" \ + | $SED "$sed_quote_subst"` + break + ;; + esac + + func_quote_portable_old_IFS=$IFS + for _G_char in '\' '`' '"' '$' + do + # STATE($1) PREV($2) SEPARATOR($3) + set start "" "" + func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy + IFS=$_G_char + for _G_part in $func_quote_portable_result + do + case $1 in + quote) + func_append func_quote_portable_result "$3$2" + set quote "$_G_part" "\\$_G_char" + ;; + start) + set first "" "" + func_quote_portable_result= + ;; + first) + set quote "$_G_part" "" + ;; + esac + done + done + IFS=$func_quote_portable_old_IFS ;; - *) - _G_quoted_arg=$_G_unquoted_arg - ;; + *) ;; esac - - if test -n "$func_quote_for_eval_result"; then - func_append func_quote_for_eval_result " $_G_quoted_arg" - else - func_append func_quote_for_eval_result "$_G_quoted_arg" - fi - shift + break done + + func_quote_portable_unquoted_result=$func_quote_portable_result + case $func_quote_portable_result in + # double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # many bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_portable_result=\"$func_quote_portable_result\" + ;; + esac } -# func_quote_for_expand ARG -# ------------------------- -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - $debug_cmd +# func_quotefast_eval ARG +# ----------------------- +# Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG', +# but optimized for speed. Result is stored in $func_quotefast_eval. +if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then + printf -v _GL_test_printf_tilde %q '~' + if test '\~' = "$_GL_test_printf_tilde"; then + func_quotefast_eval () + { + printf -v func_quotefast_eval_result %q "$1" + } + else + # Broken older Bash implementations. Make those faster too if possible. + func_quotefast_eval () + { + case $1 in + '~'*) + func_quote_portable false "$1" + func_quotefast_eval_result=$func_quote_portable_result + ;; + *) + printf -v func_quotefast_eval_result %q "$1" + ;; + esac + } + fi +else + func_quotefast_eval () + { + func_quote_portable false "$1" + func_quotefast_eval_result=$func_quote_portable_result + } +fi - case $1 in - *[\\\`\"]*) - _G_arg=`$ECHO "$1" | $SED \ - -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; - *) - _G_arg=$1 ;; + +# func_quote_arg MODEs ARG +# ------------------------ +# Quote one ARG to be evaled later. MODEs argument may contain zero or more +# specifiers listed below separated by ',' character. This function returns two +# values: +# i) func_quote_arg_result +# double-quoted (when needed), suitable for a subsequent eval +# ii) func_quote_arg_unquoted_result +# has all characters that are still active within double +# quotes backslashified. Available only if 'unquoted' is specified. +# +# Available modes: +# ---------------- +# 'eval' (default) +# - escape shell special characters +# 'expand' +# - the same as 'eval'; but do not quote variable references +# 'pretty' +# - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might +# be used later in func_quote to get output like: 'echo "a b"' instead +# of 'echo a\ b'. This is slower than default on some shells. +# 'unquoted' +# - produce also $func_quote_arg_unquoted_result which does not contain +# wrapping double-quotes. +# +# Examples for 'func_quote_arg pretty,unquoted string': +# +# string | *_result | *_unquoted_result +# ------------+-----------------------+------------------- +# " | \" | \" +# a b | "a b" | a b +# "a b" | "\"a b\"" | \"a b\" +# * | "*" | * +# z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\" +# +# Examples for 'func_quote_arg pretty,unquoted,expand string': +# +# string | *_result | *_unquoted_result +# --------------+---------------------+-------------------- +# z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\" +func_quote_arg () +{ + _G_quote_expand=false + case ,$1, in + *,expand,*) + _G_quote_expand=: + ;; esac - case $_G_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - _G_arg=\"$_G_arg\" + case ,$1, in + *,pretty,*|*,expand,*|*,unquoted,*) + func_quote_portable $_G_quote_expand "$2" + func_quote_arg_result=$func_quote_portable_result + func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result + ;; + *) + # Faster quote-for-eval for some shells. + func_quotefast_eval "$2" + func_quote_arg_result=$func_quotefast_eval_result ;; esac +} + - func_quote_for_expand_result=$_G_arg +# func_quote MODEs ARGs... +# ------------------------ +# Quote all ARGs to be evaled later and join them into single command. See +# func_quote_arg's description for more info. +func_quote () +{ + $debug_cmd + _G_func_quote_mode=$1 ; shift + func_quote_result= + while test 0 -lt $#; do + func_quote_arg "$_G_func_quote_mode" "$1" + if test -n "$func_quote_result"; then + func_append func_quote_result " $func_quote_arg_result" + else + func_append func_quote_result "$func_quote_arg_result" + fi + shift + done } @@ -1215,8 +1376,8 @@ func_show_eval () _G_cmd=$1 _G_fail_exp=${2-':'} - func_quote_for_expand "$_G_cmd" - eval "func_notquiet $func_quote_for_expand_result" + func_quote_arg pretty,expand "$_G_cmd" + eval "func_notquiet $func_quote_arg_result" $opt_dry_run || { eval "$_G_cmd" @@ -1241,8 +1402,8 @@ func_show_eval_locale () _G_fail_exp=${2-':'} $opt_quiet || { - func_quote_for_expand "$_G_cmd" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$_G_cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || { @@ -1369,30 +1530,26 @@ func_lt_ver () # End: #! /bin/sh -# Set a version string for this script. -scriptversion=2014-01-07.03; # UTC - # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 -# Copyright (C) 2010-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# This is free software. There is NO warranty; not even for +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Copyright (C) 2010-2019, 2021 Bootstrap Authors +# +# This file is dual licensed under the terms of the MIT license +# <https://opensource.org/license/MIT>, and GPL version 2 or later +# <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of +# these licenses when using or redistributing this software or any of +# the files within it. See the URLs above, or the file `LICENSE` +# included in the Bootstrap distribution for the full license texts. -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# Please report bugs or propose patches to: +# <https://github.com/gnulib-modules/bootstrap/issues> -# Please report bugs or propose patches to gary@gnu.org. +# Set a version string for this script. +scriptversion=2019-02-19.15; # UTC ## ------ ## @@ -1415,7 +1572,7 @@ scriptversion=2014-01-07.03; # UTC # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file -# starting with '# Written by ' and ending with '# warranty; '. +# starting with '# Written by ' and ending with '# Copyright'. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the @@ -1427,7 +1584,7 @@ scriptversion=2014-01-07.03; # UTC # to display verbose messages only when your user has specified # '--verbose'. # -# After sourcing this file, you can plug processing for additional +# After sourcing this file, you can plug in processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. @@ -1476,8 +1633,8 @@ fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## # This section contains functions for adding, removing, and running hooks -# to the main code. A hook is just a named list of of function, that can -# be run in order later on. +# in the main code. A hook is just a list of function names that can be +# run in order later on. # func_hookable FUNC_NAME # ----------------------- @@ -1510,7 +1667,8 @@ func_add_hook () # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ -# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. +# Remove HOOK_FUNC from the list of hook functions to be called by +# FUNC_NAME. func_remove_hook () { $debug_cmd @@ -1519,10 +1677,28 @@ func_remove_hook () } +# func_propagate_result FUNC_NAME_A FUNC_NAME_B +# --------------------------------------------- +# If the *_result variable of FUNC_NAME_A _is set_, assign its value to +# *_result variable of FUNC_NAME_B. +func_propagate_result () +{ + $debug_cmd + + func_propagate_result_result=: + if eval "test \"\${${1}_result+set}\" = set" + then + eval "${2}_result=\$${1}_result" + else + func_propagate_result_result=false + fi +} + + # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. -# It is assumed that the list of hook functions contains nothing more +# It's assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. @@ -1532,22 +1708,19 @@ func_run_hooks () case " $hookable_fns " in *" $1 "*) ;; - *) func_fatal_error "'$1' does not support hook funcions.n" ;; + *) func_fatal_error "'$1' does not support hook functions." ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do - eval $_G_hook '"$@"' - - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift + func_unset "${_G_hook}_result" + eval $_G_hook '${1+"$@"}' + func_propagate_result $_G_hook func_run_hooks + if $func_propagate_result_result; then + eval set dummy "$func_run_hooks_result"; shift + fi done - - func_quote_for_eval ${1+"$@"} - func_run_hooks_result=$func_quote_for_eval_result } @@ -1557,10 +1730,18 @@ func_run_hooks () ## --------------- ## # In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, remove any -# options that you action, and then pass back the remaining unprocessed -# options in '<hooked_function_name>_result', escaped suitably for -# 'eval'. Like this: +# full positional parameter list from your hook function. You may remove +# or edit any options that you action, and then pass back the remaining +# unprocessed options in '<hooked_function_name>_result', escaped +# suitably for 'eval'. +# +# The '<hooked_function_name>_result' variable is automatically unset +# before your hook gets called; for best performance, only set the +# *_result variable when necessary (i.e. don't call the 'func_quote' +# function unnecessarily because it can be an expensive operation on some +# machines). +# +# Like this: # # my_options_prep () # { @@ -1570,9 +1751,8 @@ func_run_hooks () # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' -# -# func_quote_for_eval ${1+"$@"} -# my_options_prep_result=$func_quote_for_eval_result +# # No change in '$@' (ignored completely by this hook). Leave +# # my_options_prep_result variable intact. # } # func_add_hook func_options_prep my_options_prep # @@ -1581,25 +1761,36 @@ func_run_hooks () # { # $debug_cmd # -# # Note that for efficiency, we parse as many options as we can +# args_changed=false +# +# # Note that, for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in -# --silent|-s) opt_silent=: ;; +# --silent|-s) opt_silent=: +# args_changed=: +# ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift +# args_changed=: # ;; -# *) set dummy "$_G_opt" "$*"; shift; break ;; +# *) # Make sure the first unrecognised option "$_G_opt" +# # is added back to "$@" in case we need it later, +# # if $args_changed was set to 'true'. +# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result +# # Only call 'func_quote' here if we processed at least one argument. +# if $args_changed; then +# func_quote eval ${1+"$@"} +# my_silent_option_result=$func_quote_result +# fi # } # func_add_hook func_parse_options my_silent_option # @@ -1610,17 +1801,26 @@ func_run_hooks () # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." -# -# func_quote_for_eval ${1+"$@"} -# my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # -# You'll alse need to manually amend $usage_message to reflect the extra +# You'll also need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. +# func_options_finish [ARG]... +# ---------------------------- +# Finishing the option parse loop (call 'func_options' hooks ATM). +func_options_finish () +{ + $debug_cmd + + func_run_hooks func_options ${1+"$@"} + func_propagate_result func_run_hooks func_options_finish +} + + # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the @@ -1630,17 +1830,27 @@ func_options () { $debug_cmd - func_options_prep ${1+"$@"} - eval func_parse_options \ - ${func_options_prep_result+"$func_options_prep_result"} - eval func_validate_options \ - ${func_parse_options_result+"$func_parse_options_result"} + _G_options_quoted=false - eval func_run_hooks func_options \ - ${func_validate_options_result+"$func_validate_options_result"} + for my_func in options_prep parse_options validate_options options_finish + do + func_unset func_${my_func}_result + func_unset func_run_hooks_result + eval func_$my_func '${1+"$@"}' + func_propagate_result func_$my_func func_options + if $func_propagate_result_result; then + eval set dummy "$func_options_result"; shift + _G_options_quoted=: + fi + done - # save modified positional parameters for caller - func_options_result=$func_run_hooks_result + $_G_options_quoted || { + # As we (func_options) are top-level options-parser function and + # nobody quoted "$@" for us yet, we need to do it explicitly for + # caller. + func_quote eval ${1+"$@"} + func_options_result=$func_quote_result + } } @@ -1649,9 +1859,8 @@ func_options () # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and -# needs to propogate that back to rest of this script, then the complete -# modified list must be put in 'func_run_hooks_result' before -# returning. +# needs to propagate that back to rest of this script, then the complete +# modified list must be put in 'func_run_hooks_result' before returning. func_hookable func_options_prep func_options_prep () { @@ -1662,9 +1871,7 @@ func_options_prep () opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} - - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result + func_propagate_result func_run_hooks func_options_prep } @@ -1676,25 +1883,32 @@ func_parse_options () { $debug_cmd - func_parse_options_result= - + _G_parse_options_requote=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} - - # Adjust func_parse_options positional parameters to match - eval set dummy "$func_run_hooks_result"; shift + func_propagate_result func_run_hooks func_parse_options + if $func_propagate_result_result; then + eval set dummy "$func_parse_options_result"; shift + # Even though we may have changed "$@", we passed the "$@" array + # down into the hook and it quoted it for us (because we are in + # this if-branch). No need to quote it again. + _G_parse_options_requote=false + fi # Break out of the loop if we already parsed every option. test $# -gt 0 || break + # We expect that one of the options parsed in this function matches + # and thus we remove _G_opt from "$@" and need to re-quote. + _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' - func_echo "enabling shell trace mode" + func_echo "enabling shell trace mode" >&2 $debug_cmd ;; @@ -1704,7 +1918,10 @@ func_parse_options () ;; --warnings|--warning|-W) - test $# = 0 && func_missing_arg $_G_opt && break + if test $# = 0 && func_missing_arg $_G_opt; then + _G_parse_options_requote=: + break + fi case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above @@ -1757,15 +1974,24 @@ func_parse_options () shift ;; - --) break ;; + --) _G_parse_options_requote=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift + _G_match_parse_options=false + break + ;; esac + + if $_G_match_parse_options; then + _G_parse_options_requote=: + fi done - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result + if $_G_parse_options_requote; then + # save modified positional parameters for caller + func_quote eval ${1+"$@"} + func_parse_options_result=$func_quote_result + fi } @@ -1782,12 +2008,10 @@ func_validate_options () test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} + func_propagate_result func_run_hooks func_validate_options # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE - - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result } @@ -1843,8 +2067,8 @@ func_missing_arg () # func_split_equals STRING # ------------------------ -# Set func_split_equals_lhs and func_split_equals_rhs shell variables after -# splitting STRING at the '=' sign. +# Set func_split_equals_lhs and func_split_equals_rhs shell variables +# after splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ @@ -1859,8 +2083,9 @@ then func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} - test "x$func_split_equals_lhs" = "x$1" \ - && func_split_equals_rhs= + if test "x$func_split_equals_lhs" = "x$1"; then + func_split_equals_rhs= + fi }' else # ...otherwise fall back to using expr, which is often a shell builtin. @@ -1870,7 +2095,7 @@ else func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= - test "x$func_split_equals_lhs" = "x$1" \ + test "x$func_split_equals_lhs=" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals @@ -1896,7 +2121,7 @@ else { $debug_cmd - func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` + func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt @@ -1938,31 +2163,44 @@ func_usage_message () # func_version # ------------ # Echo version message to standard output and exit. +# The version message is extracted from the calling file's header +# comments, with leading '# ' stripped: +# 1. First display the progname and version +# 2. Followed by the header comment line matching /^# Written by / +# 3. Then a blank line followed by the first following line matching +# /^# Copyright / +# 4. Immediately followed by any lines between the previous matches, +# except lines preceding the intervening completely blank line. +# For example, see the header comments of this file. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' - /(C)/!b go - :more - /\./!{ - N - s|\n# | | - b more - } - :go - /^# Written by /,/# warranty; / { - s|^# || - s|^# *$|| - s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| - p + /^# Written by /!b + s|^# ||; p; n + + :fwd2blnk + /./ { + n + b fwd2blnk } - /^# Written by / { - s|^# || - p + p; n + + :holdwrnt + s|^# || + s|^# *$|| + /^Copyright /!{ + /./H + n + b holdwrnt } - /^warranty; /q' < "$progpath" + + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + G + s|\(\n\)\n*|\1|g + p; q' < "$progpath" exit $? } @@ -1972,12 +2210,12 @@ func_version () # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. -scriptversion='(GNU libtool) 2.4.6' +scriptversion='(GNU libtool) 2.4.7' # func_echo ARG... @@ -2068,7 +2306,7 @@ include the following information: compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname (GNU libtool) 2.4.6 + version: $progname (GNU libtool) 2.4.7 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` @@ -2124,7 +2362,7 @@ fi # a configuration failure hint, and exit. func_fatal_configuration () { - func__fatal_error ${1+"$@"} \ + func_fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } @@ -2270,6 +2508,8 @@ libtool_options_prep () nonopt= preserve_args= + _G_rc_lt_options_prep=: + # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) @@ -2293,11 +2533,16 @@ libtool_options_prep () uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; + *) + _G_rc_lt_options_prep=false + ;; esac - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result + if $_G_rc_lt_options_prep; then + # Pass back the list of options. + func_quote eval ${1+"$@"} + libtool_options_prep_result=$func_quote_result + fi } func_add_hook func_options_prep libtool_options_prep @@ -2309,9 +2554,12 @@ libtool_parse_options () { $debug_cmd + _G_rc_lt_parse_options=false + # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do + _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -2386,15 +2634,20 @@ libtool_parse_options () func_append preserve_args " $_G_opt" ;; - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"} ; shift + _G_match_lt_parse_options=false + break + ;; esac + $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done - - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result + if $_G_rc_lt_parse_options; then + # save modified positional parameters for caller + func_quote eval ${1+"$@"} + libtool_parse_options_result=$func_quote_result + fi } func_add_hook func_parse_options libtool_parse_options @@ -2451,8 +2704,8 @@ libtool_validate_options () } # Pass back the unparsed argument list - func_quote_for_eval ${1+"$@"} - libtool_validate_options_result=$func_quote_for_eval_result + func_quote eval ${1+"$@"} + libtool_validate_options_result=$func_quote_result } func_add_hook func_validate_options libtool_validate_options @@ -3418,8 +3671,8 @@ func_mode_compile () esac done - func_quote_for_eval "$libobj" - test "X$libobj" != "X$func_quote_for_eval_result" \ + func_quote_arg pretty "$libobj" + test "X$libobj" != "X$func_quote_arg_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" @@ -3492,8 +3745,8 @@ compiler." func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result + func_quote_arg pretty "$srcfile" + qsrcfile=$func_quote_arg_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then @@ -3648,7 +3901,8 @@ This mode accepts the following additional options: -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler + -Wc,FLAG + -Xcompiler FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. @@ -3754,6 +4008,8 @@ The following components of LINK-COMMAND are treated specially: -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wa,FLAG + -Xassembler FLAG pass linker-specific FLAG directly to the assembler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) @@ -4096,8 +4352,8 @@ func_mode_install () case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " + func_quote_arg pretty "$nonopt" + install_prog="$func_quote_arg_result " arg=$1 shift else @@ -4107,8 +4363,8 @@ func_mode_install () # The real first argument should be the name of the installation program. # Aesthetically quote it. - func_quote_for_eval "$arg" - func_append install_prog "$func_quote_for_eval_result" + func_quote_arg pretty "$arg" + func_append install_prog "$func_quote_arg_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; @@ -4165,12 +4421,12 @@ func_mode_install () esac # Aesthetically quote the argument. - func_quote_for_eval "$arg" - func_append install_prog " $func_quote_for_eval_result" + func_quote_arg pretty "$arg" + func_append install_prog " $func_quote_arg_result" if test -n "$arg2"; then - func_quote_for_eval "$arg2" + func_quote_arg pretty "$arg2" fi - func_append install_shared_prog " $func_quote_for_eval_result" + func_append install_shared_prog " $func_quote_arg_result" done test -z "$install_prog" && \ @@ -4181,8 +4437,8 @@ func_mode_install () if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - func_append install_shared_prog " -m $func_quote_for_eval_result" + func_quote_arg pretty "$install_override_mode" + func_append install_shared_prog " -m $func_quote_arg_result" fi fi @@ -4478,8 +4734,8 @@ func_mode_install () relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$relink_command" + eval "func_echo $func_quote_arg_result" } if eval "$relink_command"; then : else @@ -5258,7 +5514,8 @@ else if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + func_quote_arg pretty "$ECHO" + qECHO=$func_quote_arg_result $ECHO "\ # A function that is used when there is no print builtin or printf. @@ -5268,7 +5525,7 @@ func_fallback_echo () \$1 _LTECHO_EOF' } - ECHO=\"$qECHO\" + ECHO=$qECHO fi # Very basic option parsing. These options are (a) specific to @@ -6611,9 +6868,9 @@ func_mode_link () while test "$#" -gt 0; do arg=$1 shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" + func_quote_arg pretty,unquoted "$arg" + qarg=$func_quote_arg_unquoted_result + func_append libtool_args " $func_quote_arg_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then @@ -6849,6 +7106,13 @@ func_mode_link () prev= continue ;; + xassembler) + func_append compiler_flags " -Xassembler $qarg" + prev= + func_append compile_command " -Xassembler $qarg" + func_append finalize_command " -Xassembler $qarg" + continue + ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" @@ -7019,7 +7283,7 @@ func_mode_link () # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; @@ -7039,7 +7303,7 @@ func_mode_link () esac elif test X-lc_r = "X$arg"; then case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc_r directly, use -pthread flag. continue ;; @@ -7069,8 +7333,20 @@ func_mode_link () prev=xcompiler continue ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199. + -pthread) + case $host in + *solaris2*) ;; + *) + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac + ;; + esac + continue + ;; + -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" @@ -7211,9 +7487,9 @@ func_mode_link () save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $func_quote_for_eval_result" - func_append compiler_flags " $func_quote_for_eval_result" + func_quote_arg pretty "$flag" + func_append arg " $func_quote_arg_result" + func_append compiler_flags " $func_quote_arg_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" @@ -7227,16 +7503,21 @@ func_mode_link () save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs - func_quote_for_eval "$flag" - func_append arg " $wl$func_quote_for_eval_result" - func_append compiler_flags " $wl$func_quote_for_eval_result" - func_append linker_flags " $func_quote_for_eval_result" + func_quote_arg pretty "$flag" + func_append arg " $wl$func_quote_arg_result" + func_append compiler_flags " $wl$func_quote_arg_result" + func_append linker_flags " $func_quote_arg_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; + -Xassembler) + prev=xassembler + continue + ;; + -Xcompiler) prev=xcompiler continue @@ -7254,8 +7535,8 @@ func_mode_link () # -msg_* for osf cc -msg_*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; # Flags to be passed through unchanged, with rationale: @@ -7272,12 +7553,17 @@ func_mode_link () # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang + # -fsanitize=* Clang/GCC memory and address sanitizer + # -fuse-ld=* Linker select flags for GCC + # -Wa,* Pass flags directly to the assembler -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ + -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*) + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" @@ -7298,15 +7584,15 @@ func_mode_link () continue else # Otherwise treat like 'Some other compiler flag' below - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result fi ;; # Some other compiler flag. -* | +*) - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; *.$objext) @@ -7426,8 +7712,8 @@ func_mode_link () *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg=$func_quote_for_eval_result + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; esac # arg @@ -8632,7 +8918,7 @@ func_mode_link () test CXX = "$tagname" && { case $host_os in linux*) - case `$CC -V 2>&1 | sed 5q` in + case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi @@ -8805,7 +9091,7 @@ func_mode_link () # case $version_type in # correct linux to gnu/linux during the next big refactor - darwin|freebsd-elf|linux|osf|windows|none) + darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor @@ -8896,7 +9182,7 @@ func_mode_link () versuffix=.$current.$revision ;; - freebsd-elf) + freebsd-elf | midnightbsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision @@ -9122,7 +9408,7 @@ func_mode_link () *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) @@ -9933,8 +10219,8 @@ EOF for cmd in $concat_cmds; do IFS=$save_ifs $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? @@ -10027,8 +10313,8 @@ EOF eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" + func_quote_arg expand,pretty "$cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? @@ -10502,12 +10788,13 @@ EOF elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + func_quote_arg pretty "$var_value" + relink_command="$var=$func_quote_arg_result; export $var; $relink_command" fi done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + func_quote eval cd "`pwd`" + func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)" + relink_command=$func_quote_arg_unquoted_result fi # Only actually do things if not in dry run mode. @@ -10747,13 +11034,15 @@ EOF elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + func_quote_arg pretty,unquoted "$var_value" + relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command" fi done # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + func_quote eval cd "`pwd`" + relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + func_quote_arg pretty,unquoted "$relink_command" + relink_command=$func_quote_arg_unquoted_result if test yes = "$hardcode_automatic"; then relink_command= fi diff --git a/Build/source/texk/tests/TeXLive/TLConfig.pm b/Build/source/texk/tests/TeXLive/TLConfig.pm index 92d32f5638a..64a13f30333 100644 --- a/Build/source/texk/tests/TeXLive/TLConfig.pm +++ b/Build/source/texk/tests/TeXLive/TLConfig.pm @@ -1,12 +1,12 @@ # TeXLive::TLConfig.pm - module exporting configuration values -# Copyright 2007-2023 Norbert Preining +# Copyright 2007-2022 Norbert Preining # This file is licensed under the GNU General Public License version 2 # or any later version. use strict; use warnings; package TeXLive::TLConfig; -my $svnrev = '$Revision: 65950 $'; +my $svnrev = '$Revision: 63068 $'; my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown"; sub module_revision { return $_modulerevision; } @@ -61,7 +61,7 @@ BEGIN { # the year of our release, will be used in the location of the # network packages, and in menu names, and other places. -our $ReleaseYear = 2023; +our $ReleaseYear = 2022; # users can upgrade from this year to the current year; might be the # same as the release year, or any number of releases earlier. @@ -118,8 +118,8 @@ our $RelocPrefix = "RELOC"; our @CriticalPackagesList = qw/texlive.infra/; our $CriticalPackagesRegexp = '^(texlive\.infra)'; if ($^O =~ /^MSWin/i) { - push (@CriticalPackagesList, "tlperl.windows"); - $CriticalPackagesRegexp = '^(texlive\.infra|tlperl\.windows$)'; + push (@CriticalPackagesList, "tlperl.win32"); + $CriticalPackagesRegexp = '^(texlive\.infra|tlperl\.win32$)'; } @@ -366,7 +366,7 @@ C<systems/texlive/tlnet/>. =item C<@TeXLive::TLConfig::CriticalPackagesRegexp> A list of all those packages which we do not update regularly since they -are too central, currently texlive.infra and (for Windows) tlperl.windows. +are too central, currently texlive.infra and (for Windows) tlperl.win32. =item C<@TeXLive::TLConfig::InstallExtraRequiredPackages> diff --git a/Build/source/texk/tests/TeXLive/TLUtils.pm b/Build/source/texk/tests/TeXLive/TLUtils.pm index 7b7bb8cc760..12130936c64 100644 --- a/Build/source/texk/tests/TeXLive/TLUtils.pm +++ b/Build/source/texk/tests/TeXLive/TLUtils.pm @@ -1,5 +1,5 @@ # TeXLive::TLUtils.pm - the inevitable utilities for TeX Live. -# Copyright 2007-2023 Norbert Preining, Reinhard Kotucha +# Copyright 2007-2022 Norbert Preining, Reinhard Kotucha # This file is licensed under the GNU General Public License version 2 # or any later version. @@ -7,7 +7,7 @@ use strict; use warnings; package TeXLive::TLUtils; -my $svnrev = '$Revision: 65994 $'; +my $svnrev = '$Revision: 64503 $'; my $_modulerevision = ($svnrev =~ m/: ([0-9]+) /) ? $1 : "unknown"; sub module_revision { return $_modulerevision; } @@ -26,7 +26,7 @@ C<TeXLive::TLUtils> - TeX Live infrastructure miscellany TeXLive::TLUtils::platform(); TeXLive::TLUtils::platform_name($canonical_host); TeXLive::TLUtils::platform_desc($platform); - TeXLive::TLUtils::wndws(); + TeXLive::TLUtils::win32(); TeXLive::TLUtils::unix(); =head2 System tools @@ -264,7 +264,7 @@ BEGIN { @EXPORT = qw(setup_programs download_file process_logging_options tldie tlwarn info log debug ddebug dddebug debug debug_hash_str debug_hash - wndws xchdir xsystem run_cmd system_pipe sort_archs); + win32 xchdir xsystem run_cmd system_pipe sort_archs); } use Cwd; @@ -284,7 +284,7 @@ our $SshURIRegex = '^((ssh|scp)://([^@]*)@([^/]*)/|([^@]*)@([^:]*):).*$'; =item C<platform> If C<$^O =~ /MSWin/i> is true we know that we're on -Windows and we set the global variable C<$::_platform_> to C<windows>. +Windows and we set the global variable C<$::_platform_> to C<win32>. Otherwise we call C<platform_name> with the output of C<config.guess> as argument. @@ -296,16 +296,13 @@ understands the C<$(...)> construct. This means that on old-enough systems, such as Solaris, we have to look for a shell. We use the value of the C<CONFIG_SHELL> environment variable if it is set, else C</bin/ksh> if it exists, else C</bin/bash> if it exists, else give up. -Happily, C<config.guess> later reverted this change, but we keep our -shell-finding code anyway to defend against future mistakes of the same ilk. =cut sub platform { - if (! defined $::_platform_) { + unless (defined $::_platform_) { if ($^O =~ /^MSWin/i) { - print STDERR "\$^O is $^O\n"; - $::_platform_ = "windows"; + $::_platform_ = "win32"; } else { my $config_guess = "$::installerdir/tlpkg/installer/config.guess"; @@ -530,8 +527,7 @@ sub platform_desc { 'sparc-linux' => 'GNU/Linux on Sparc', 'sparc-solaris' => 'Solaris on Sparc', 'universal-darwin' => 'MacOSX current (10.14-) on ARM/x86_64', - 'win32' => 'Windows (32-bit)', - 'windows' => 'Windows (64-bit)', + 'win32' => 'Windows', 'x86_64-cygwin' => 'Cygwin on x86_64', 'x86_64-darwinlegacy' => 'MacOSX legacy (10.6-) on x86_64', 'x86_64-dragonfly' => 'DragonFlyBSD on x86_64', @@ -554,21 +550,21 @@ sub platform_desc { } -=item C<wndws> +=item C<win32> Return C<1> if platform is Windows and C<0> otherwise. The test is currently based on the value of Perl's C<$^O> variable. =cut -sub wndws { +sub win32 { if ($^O =~ /^MSWin/i) { return 1; } else { return 0; } # the following needs config.guess, which is quite bad ... - # return (&platform eq "windows")? 1:0; + # return (&platform eq "win32")? 1:0; } @@ -579,7 +575,7 @@ Return C<1> if platform is UNIX and C<0> otherwise. =cut sub unix { - return (&platform eq "windows")? 0:1; + return (&platform eq "win32")? 0:1; } @@ -603,7 +599,7 @@ sub getenv { my $envvar=shift; my $var=$ENV{"$envvar"}; return 0 unless (defined $var); - if (&wndws) { + if (&win32) { $var=~s!\\!/!g; # change \ -> / (required by Perl) } return "$var"; @@ -625,7 +621,7 @@ sub which { my @PATH; my $PATH = getenv('PATH'); - if (&wndws) { + if (&win32) { my @PATHEXT = split (';', getenv('PATHEXT')); push (@PATHEXT, ''); # in case argument contains an extension @PATH = split (';', $PATH); @@ -792,7 +788,7 @@ sub system_pipe { my ($prog, $infile, $outfile, $removeIn, @extraargs) = @_; my $progQuote = quotify_path_with_spaces($prog); - if (wndws()) { + if (win32()) { $infile =~ s!/!\\!g; $outfile =~ s!/!\\!g; } @@ -825,7 +821,7 @@ computing the disk space. sub diskfree { my $td = shift; my ($output, $retval); - if (wndws()) { + if (win32()) { # the powershell one-liner only works from win8 on. my @winver = Win32::GetOSVersion(); if ($winver[1]<=6 && $winver[2]<=1) { @@ -908,7 +904,7 @@ my $user_home_dir; sub get_user_home { return $user_home_dir if ($user_home_dir); - $user_home_dir = getenv (wndws() ? 'USERPROFILE' : 'HOME') || '~'; + $user_home_dir = getenv (win32() ? 'USERPROFILE' : 'HOME') || '~'; return $user_home_dir; } @@ -943,7 +939,7 @@ Return both C<dirname> and C<basename>. Example: sub dirname_and_basename { my $path=shift; my ($share, $base) = ("", ""); - if (wndws()) { + if (win32) { $path=~s!\\!/!g; } # do not try to make sense of paths ending with /.. @@ -952,7 +948,7 @@ sub dirname_and_basename { # eliminate `/.' path components while ($path =~ s!/\./!/!) {}; # UNC path? => first split in $share = //xxx/yy and $path = /zzzz - if (wndws() and $path =~ m!^(//[^/]+/[^/]+)(.*)$!) { + if (win32() and $path =~ m!^(//[^/]+/[^/]+)(.*)$!) { ($share, $path) = ($1, $2); if ($path =~ m!^/?$!) { $path = $share; @@ -1010,7 +1006,7 @@ sub basename { sub tl_abs_path { my $path = shift; - if (wndws()) { + if (win32) { $path=~s!\\!/!g; } if (-e $path) { @@ -1020,13 +1016,13 @@ sub tl_abs_path { } else{ # collapse /./ components $path =~ s!/\./!/!g; - # no support for .. path components or for windows long-path syntax + # no support for .. path components or for win32 long-path syntax # (//?/ path prefix) die "Unsupported path syntax" if $path =~ m!/\.\./! || $path =~ m!/\.\.$! || $path =~ m!^\.\.!; - die "Unsupported path syntax" if wndws() && $path =~ m!^//\?/!; + die "Unsupported path syntax" if win32() && $path =~ m!^//\?/!; if ($path !~ m!^(.:)?/!) { # relative path - if (wndws() && $path =~ /^.:/) { # drive letter + if (win32() && $path =~ /^.:/) { # drive letter my $dcwd; # starts with drive letter: current dir on drive $dcwd = Cwd::getdcwd ($1); @@ -1060,7 +1056,7 @@ sub dir_slash { sub dir_creatable { my $path=shift; #print STDERR "testing $path\n"; - $path =~ s!\\!/!g if wndws; + $path =~ s!\\!/!g if win32; return 0 unless -d $path; $path .= '/' unless $path =~ m!/$!; #print STDERR "testing $path\n"; @@ -1102,7 +1098,7 @@ a fileserver. sub dir_writable { my ($path) = @_; return 0 unless -d $path; - $path =~ s!\\!/!g if wndws; + $path =~ s!\\!/!g if win32; $path .= '/' unless $path =~ m!/$!; my $i = 0; my $f; @@ -1146,9 +1142,9 @@ sub mkdirhier { $ret = 1; } else { my $subdir = ""; - # windows is special as usual: we need to separate //servername/ part + # win32 is special as usual: we need to separate //servername/ part # from the UNC path, since (! -d //servername/) tests true - $subdir = $& if ( wndws() && ($tree =~ s!^//[^/]+/!!) ); + $subdir = $& if ( win32() && ($tree =~ s!^//[^/]+/!!) ); my @dirs = split (/[\/\\]/, $tree); for my $dir (@dirs) { @@ -1621,13 +1617,13 @@ sub removed_dirs { # what should we do with not existing entries???? next if (! -r "$f"); my $abs_f = Cwd::abs_path ($f); - # the following is necessary because on windows, + # the following is necessary because on win32, # abs_path("tl-portable") # returns # c:\tl test\... # and not forward slashes, while, if there is already a forward / # in the path, also the rest is done with forward slashes. - $abs_f =~ s!\\!/!g if wndws(); + $abs_f =~ s!\\!/!g if win32(); if (!$abs_f) { warn ("oops, no abs_path($f) from " . `pwd`); next; @@ -1887,7 +1883,7 @@ sub do_postaction { sub _do_postaction_fileassoc { my ($how, $mode, $tlpobj, $pa) = @_; - return 1 unless wndws(); + return 1 unless win32(); my ($errors, %keyval) = parse_into_keywords($pa, qw/extension filetype/); @@ -1925,7 +1921,7 @@ sub _do_postaction_fileassoc { sub _do_postaction_filetype { my ($how, $tlpobj, $pa) = @_; - return 1 unless wndws(); + return 1 unless win32(); my ($errors, %keyval) = parse_into_keywords($pa, qw/name cmd/); @@ -1970,7 +1966,7 @@ sub _do_postaction_filetype { # associated program shows up in `open with' menu sub _do_postaction_progid { my ($how, $tlpobj, $pa) = @_; - return 1 unless wndws(); + return 1 unless win32(); my ($errors, %keyval) = parse_into_keywords($pa, qw/extension filetype/); @@ -2020,7 +2016,7 @@ sub _do_postaction_script { return 0; } my $file = $keyval{'file'}; - if (wndws() && defined($keyval{'filew32'})) { + if (win32() && defined($keyval{'filew32'})) { $file = $keyval{'filew32'}; } my $texdir = `kpsewhich -var-value=TEXMFROOT`; @@ -2050,7 +2046,7 @@ sub _do_postaction_script { sub _do_postaction_shortcut { my ($how, $tlpobj, $do_menu, $do_desktop, $pa) = @_; - return 1 unless wndws(); + return 1 unless win32(); my ($errors, %keyval) = parse_into_keywords($pa, qw/type name icon cmd args hide/); @@ -2321,7 +2317,7 @@ sub add_remove_symlinks { my $plat_bindir = "$Master/bin/$arch"; # nothing to do with symlinks on Windows, of course. - return if wndws(); + return if win32(); my $info_dir = "$Master/texmf-dist/doc/info"; if ($mode eq "add") { @@ -2407,7 +2403,7 @@ be called to make the changes immediately visible. sub w32_add_to_path { my ($bindir, $multiuser) = @_; - return if (!wndws()); + return if (!win32()); my $path = TeXLive::TLWinGoo::get_system_env() -> {'/Path'}; $path =~ s/[\s\x00]+$//; @@ -2652,7 +2648,7 @@ sub untar { # on w32 don't extract file modified time, because AV soft can open # files in the mean time causing time stamp modification to fail - my $taropt = wndws() ? "xmf" : "xf"; + my $taropt = win32() ? "xmf" : "xf"; if (system($tar, $taropt, $tarfile) != 0) { tlwarn("TLUtils::untar: $tar $taropt $tarfile failed (in $targetdir)\n"); $ret = 0; @@ -3150,7 +3146,7 @@ sub _download_file_lwp { sub _download_file_program { my ($url, $dest, $type) = @_; - if (wndws()) { + if (win32()) { $dest =~ s!/!\\!g; } @@ -3199,7 +3195,7 @@ Return C</dev/null> on Unix and C<nul> on Windows. =cut sub nulldev { - return (&wndws()) ? 'nul' : '/dev/null'; + return (&win32()) ? 'nul' : '/dev/null'; } =item C<get_full_line ($fh)> @@ -4062,7 +4058,7 @@ sub texdir_check { # Unfortunately we have lots of special characters. # On Windows, backslashes are normal but will already have been changed # to slashes by tl_abs_path. And we should only check for : on Unix. - my $colon = wndws() ? "" : ":"; + my $colon = win32() ? "" : ":"; if ($texdir =~ /[,$colon;\\{}\$]/) { if ($warn) { print " !! TEXDIR value has problematic characters: $orig_texdir\n"; @@ -4075,7 +4071,7 @@ sub texdir_check { return 0; } # w32: for now, reject the root of a samba share - return 0 if wndws() && $texdir =~ m!^//[^/]+/[^/]+$!; + return 0 if win32() && $texdir =~ m!^//[^/]+/[^/]+$!; # if texdir already exists, make sure we can write into it. return dir_writable($texdir) if (-d $texdir); @@ -4106,7 +4102,7 @@ are (erroneously) eradicated. sub quotify_path_with_spaces { my $p = shift; - my $m = wndws() ? '[+=^&();,!%\s]' : '.'; + my $m = win32() ? '[+=^&();,!%\s]' : '.'; if ( $p =~ m/$m/ ) { $p =~ s/"//g; # remove any existing double quotes $p = "\"$p\""; @@ -4154,13 +4150,13 @@ slashes after reading a path. They both are no-ops on Unix. sub native_slashify { my ($r) = @_; - $r =~ s!/!\\!g if wndws(); + $r =~ s!/!\\!g if win32(); return $r; } sub forward_slashify { my ($r) = @_; - $r =~ s!\\!/!g if wndws(); + $r =~ s!\\!/!g if win32(); return $r; } @@ -4242,7 +4238,7 @@ END_NO_SSL # sub query_ctan_mirror_curl { my $max_trial = 3; - my $warg = (wndws() ? '-w "%{url_effective}" ' : "-w '%{url_effective}' "); + my $warg = (win32() ? '-w "%{url_effective}" ' : "-w '%{url_effective}' "); for (my $i = 1; $i <= $max_trial; $i++) { # -L -> follow redirects # -s -> silent @@ -4849,7 +4845,7 @@ sub mktexupd { die "mktexupd: exec file does not exist: $file" if (! -f $file); } } - my $delim= (&wndws)? ';' : ':'; + my $delim= (&win32)? ';' : ':'; my $TEXMFDBS; chomp($TEXMFDBS=`kpsewhich --show-path="ls-R"`); @@ -4859,8 +4855,8 @@ sub mktexupd { foreach my $path (keys %files) { foreach my $db (@texmfdbs) { $db=substr($db, -1) if ($db=~m|/$|); # strip leading / - $db = lc($db) if wndws(); - my $up = (wndws() ? lc($path) : $path); + $db = lc($db) if win32(); + my $up = (win32() ? lc($path) : $path); if (substr($up, 0, length("$db/")) eq "$db/") { # we appended a / because otherwise "texmf" is recognized as a # substring of "texmf-dist". @@ -4992,7 +4988,7 @@ directory for PATH. sub prepend_own_path { my $bindir = dirname(Cwd::abs_path(which('kpsewhich'))); - if (wndws()) { + if (win32()) { $bindir =~ s!\\!/!g; $ENV{'PATH'} = "$bindir;$ENV{PATH}"; } else { diff --git a/Build/source/texk/texlive/linked_scripts/Makefile.am b/Build/source/texk/texlive/linked_scripts/Makefile.am index 71a562a6f68..a431f1d70e0 100644 --- a/Build/source/texk/texlive/linked_scripts/Makefile.am +++ b/Build/source/texk/texlive/linked_scripts/Makefile.am @@ -1,7 +1,7 @@ ## $Id$ ## Makefile.am for the TeX Live subdirectory texk/texlive/linked_scripts/ ## -## Copyright 2016-2022 Karl Berry <tex-live@tug.org> +## Copyright 2016-2023 Karl Berry <tex-live@tug.org> ## Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. ## @@ -38,23 +38,20 @@ installdirs-local: # dangling symlinks produced by `make install'. # The instances in texmf* are the masters (except when it is CTAN). # -## We distinguish several classes of scripts according to their -## type: `shell', `context', or `other'. +## We distinguish classes of scripts: `shell' and `other'. ## ## On Unix systems a symlink from $(bindir) to the script is installed ## for all of them; on Windows nothing is installed in $(bindir) for ## `shell' scripts whereas for `other' (usually perl, lua, ...) scripts -## the standard wrapper ../$(WIN_WRAPPER)/runscript.exe is installed or -## the ConTeXt wrapper ../$(WIN_WRAPPER)/context/mtxrun.exe for -## `context' scripts. +## the standard wrapper ../$(WIN_WRAPPER)/runscript.exe is installed. ## -## WIN_WRAPPER is w32_wrapper for 32-bit or w64_wrapper for 64-bit. +## WIN_WRAPPER is windows_wrapper (64-bit). ## -## The "shell" list aren't just shell scripts, in either direction. -## Some /bin/sh scripts are listed as `other' or `context' -## scripts because they are correctly handled by the wrapper binaries. -## Conversely, some non-sh scripts are listed as `shell' because they -## depend on shell scripts or otherwise aren't useful on Windows. +## The "shell" list aren't just shell scripts, in either direction. Some +## /bin/sh scripts are listed as `other' scripts because they are +## correctly handled by the wrapper binaries. Conversely, some non-sh +## scripts are listed as `shell' because they depend on shell scripts or +## otherwise aren't useful on Windows. ## texmf_scriptsdir = $(datarootdir)/texmf-dist/scripts texmf_shell_scripts = \ @@ -254,23 +251,9 @@ texmf_other_scripts = \ xindex/xindex.lua \ yplan/yplan -texmf_context_scripts = \ - context/stubs/unix/context \ - context/stubs/unix/contextjit \ - context/stubs/unix/luatools \ - context/stubs/unix/mtxrun \ - context/stubs/unix/mtxrunjit \ - context/stubs/unix/texexec \ - context/stubs/unix/texmfstart - -EXTRA_DIST += \ - context/stubs/unix/ctxtools \ - context/stubs/unix/pstopdf - nobase_dist_texmf_scripts_SCRIPTS = \ $(texmf_shell_scripts) \ - $(texmf_other_scripts) \ - $(texmf_context_scripts) + $(texmf_other_scripts) ## Symlinks within $(bindir): FILE:LINK here means "ln -s FILE LINK" is done. bin_links = \ @@ -309,7 +292,6 @@ bin_links = \ EXTRA_DIST += ../../../build-aux/relpath relpath = $(SHELL) $(top_srcdir)/../../build-aux/relpath runscript = $(top_srcdir)/$(WIN_WRAPPER)/runscript.exe -ctxscript = $(top_srcdir)/$(WIN_WRAPPER)/context/mtxrun.exe install-data-hook: installdirs-local if WIN32 @for s in $(texmf_other_scripts); do \ @@ -319,19 +301,8 @@ if WIN32 done $(INSTALL_SCRIPT) $(top_srcdir)/$(WIN_WRAPPER)/runscript.dll $(DESTDIR)$(bindir) $(INSTALL_SCRIPT) $(top_srcdir)/$(WIN_WRAPPER)/runscript.exe $(DESTDIR)$(bindir) - $(INSTALL_SCRIPT) $(top_srcdir)/w32_wrapper/runscript.tlu $(DESTDIR)$(bindir) - @for s in $(texmf_context_scripts); do \ - t=`basename $$s | sed 's,\.[^/]*$$,,' | tr '[A-Z]' '[a-z]'`; \ - echo "$(INSTALL_SCRIPT) '$(ctxscript)' '$(DESTDIR)$(bindir)/$$t.exe'"; \ - $(INSTALL_SCRIPT) $(ctxscript) $(DESTDIR)$(bindir)/$$t.exe; \ - done + $(INSTALL_SCRIPT) $(top_srcdir)/$(WIN_WRAPPER)/runscript.tlu $(DESTDIR)$(bindir) $(INSTALL_SCRIPT) $(top_srcdir)/$(WIN_WRAPPER)/context/mtxrun.dll $(DESTDIR)$(bindir) - $(INSTALL_SCRIPT) $(srcdir)/context/stubs/unix/mtxrun $(DESTDIR)$(bindir)/mtxrun.lua - @for s in $(bin_links); do \ - link=`echo $$s | sed 's,.*:,,'`; \ - echo "$(INSTALL_SCRIPT) '$(runscript)' '$(DESTDIR)$(bindir)/$$link.exe'"; \ - $(INSTALL_SCRIPT) $(runscript) $(DESTDIR)$(bindir)/$$link.exe || exit 1; \ - done else !WIN32 ## Name the link as the basename, removing any extension, ## except for listings-ext.sh, which is documented as that name. @@ -397,6 +368,6 @@ endif !WIN32 ## ## This target is invoked by check-wrapper-consistency (run from cron). .PHONY: echo-shell-scripts -shell_scripts = $(texmf_shell_scripts) $(texmf_context_scripts) +shell_scripts = $(texmf_shell_scripts) echo-shell-scripts: @echo $(shell_scripts) diff --git a/Build/source/texk/texlive/linked_scripts/Makefile.in b/Build/source/texk/texlive/linked_scripts/Makefile.in index eceeb3b2880..eb1a95e1d57 100644 --- a/Build/source/texk/texlive/linked_scripts/Makefile.in +++ b/Build/source/texk/texlive/linked_scripts/Makefile.in @@ -263,8 +263,7 @@ DISTCLEANFILES = scripts-list # # We support native builds, multiplatform or not, as well as distro builds. # -EXTRA_DIST = scripts.lst context/stubs/unix/ctxtools \ - context/stubs/unix/pstopdf ../../../build-aux/relpath +EXTRA_DIST = scripts.lst ../../../build-aux/relpath # Copies of these scripts exist here for the sake of avoiding # dangling symlinks produced by `make install'. @@ -468,19 +467,9 @@ texmf_other_scripts = \ xindex/xindex.lua \ yplan/yplan -texmf_context_scripts = \ - context/stubs/unix/context \ - context/stubs/unix/contextjit \ - context/stubs/unix/luatools \ - context/stubs/unix/mtxrun \ - context/stubs/unix/mtxrunjit \ - context/stubs/unix/texexec \ - context/stubs/unix/texmfstart - nobase_dist_texmf_scripts_SCRIPTS = \ $(texmf_shell_scripts) \ - $(texmf_other_scripts) \ - $(texmf_context_scripts) + $(texmf_other_scripts) bin_links = \ allcm:allec \ @@ -496,9 +485,8 @@ bin_links = \ relpath = $(SHELL) $(top_srcdir)/../../build-aux/relpath runscript = $(top_srcdir)/$(WIN_WRAPPER)/runscript.exe -ctxscript = $(top_srcdir)/$(WIN_WRAPPER)/context/mtxrun.exe @WIN32_TRUE@WINEXT = $(EXEEXT) -shell_scripts = $(texmf_shell_scripts) $(texmf_context_scripts) +shell_scripts = $(texmf_shell_scripts) all: all-am .SUFFIXES: @@ -762,19 +750,8 @@ install-data-hook: installdirs-local @WIN32_TRUE@ done @WIN32_TRUE@ $(INSTALL_SCRIPT) $(top_srcdir)/$(WIN_WRAPPER)/runscript.dll $(DESTDIR)$(bindir) @WIN32_TRUE@ $(INSTALL_SCRIPT) $(top_srcdir)/$(WIN_WRAPPER)/runscript.exe $(DESTDIR)$(bindir) -@WIN32_TRUE@ $(INSTALL_SCRIPT) $(top_srcdir)/w32_wrapper/runscript.tlu $(DESTDIR)$(bindir) -@WIN32_TRUE@ @for s in $(texmf_context_scripts); do \ -@WIN32_TRUE@ t=`basename $$s | sed 's,\.[^/]*$$,,' | tr '[A-Z]' '[a-z]'`; \ -@WIN32_TRUE@ echo "$(INSTALL_SCRIPT) '$(ctxscript)' '$(DESTDIR)$(bindir)/$$t.exe'"; \ -@WIN32_TRUE@ $(INSTALL_SCRIPT) $(ctxscript) $(DESTDIR)$(bindir)/$$t.exe; \ -@WIN32_TRUE@ done +@WIN32_TRUE@ $(INSTALL_SCRIPT) $(top_srcdir)/$(WIN_WRAPPER)/runscript.tlu $(DESTDIR)$(bindir) @WIN32_TRUE@ $(INSTALL_SCRIPT) $(top_srcdir)/$(WIN_WRAPPER)/context/mtxrun.dll $(DESTDIR)$(bindir) -@WIN32_TRUE@ $(INSTALL_SCRIPT) $(srcdir)/context/stubs/unix/mtxrun $(DESTDIR)$(bindir)/mtxrun.lua -@WIN32_TRUE@ @for s in $(bin_links); do \ -@WIN32_TRUE@ link=`echo $$s | sed 's,.*:,,'`; \ -@WIN32_TRUE@ echo "$(INSTALL_SCRIPT) '$(runscript)' '$(DESTDIR)$(bindir)/$$link.exe'"; \ -@WIN32_TRUE@ $(INSTALL_SCRIPT) $(runscript) $(DESTDIR)$(bindir)/$$link.exe || exit 1; \ -@WIN32_TRUE@ done @WIN32_FALSE@ @REL=`$(relpath) '$(DESTDIR)' '$(bindir)' '$(datarootdir)'`; \ @WIN32_FALSE@ if test -z "$$REL"; then \ @WIN32_FALSE@ echo 'unable to compute relative path for linked scripts' >&2; \ diff --git a/Build/source/texk/texlive/linked_scripts/scripts.lst b/Build/source/texk/texlive/linked_scripts/scripts.lst index 69930bbcab4..2e005ab1c3a 100644 --- a/Build/source/texk/texlive/linked_scripts/scripts.lst +++ b/Build/source/texk/texlive/linked_scripts/scripts.lst @@ -192,11 +192,4 @@ vpe/vpe.pl webquiz/webquiz.py xindex/xindex.lua yplan/yplan -context/stubs/unix/context -context/stubs/unix/contextjit -context/stubs/unix/luatools -context/stubs/unix/mtxrun -context/stubs/unix/mtxrunjit -context/stubs/unix/texexec -context/stubs/unix/texmfstart ' diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl index 44854cee54c..39eec873627 100755 --- a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl +++ b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl @@ -1,5 +1,5 @@ #!/usr/bin/env perl -# $Id: tlmgr.pl 65998 2023-02-21 01:33:24Z karl $ +# $Id: tlmgr.pl 66218 2023-02-27 17:09:29Z karl $ # Copyright 2008-2023 Norbert Preining # This file is licensed under the GNU General Public License version 2 # or any later version. @@ -8,8 +8,8 @@ use strict; use warnings; -my $svnrev = '$Revision: 65998 $'; -my $datrev = '$Date: 2023-02-21 02:33:24 +0100 (Tue, 21 Feb 2023) $'; +my $svnrev = '$Revision: 66218 $'; +my $datrev = '$Date: 2023-02-27 18:09:29 +0100 (Mon, 27 Feb 2023) $'; my $tlmgrrevision; my $tlmgrversion; my $prg; @@ -246,7 +246,7 @@ my %action_specification = ( "function" => \&action_paper }, "path" => { - "options" => { "w32mode" => "=s" }, + "options" => { "windowsmode|w32mode" => "=s" }, "run-post" => 0, "function" => \&action_path }, @@ -264,7 +264,7 @@ my %action_specification = ( "options" => { "all" => 1, "fileassocmode" => "=i", - "w32mode" => "=s", + "windowsmode|w32mode" => "=s", }, "run-post" => 0, "function" => \&action_postaction @@ -883,7 +883,6 @@ sub handle_execute_actions { my $status_file = TeXLive::TLUtils::tl_tmpfile(); my $fmtutil_args = "$common_fmtutil_args --status-file=$status_file"; - # if create_formats is false (NOT the default) we add --refresh so that # only existing formats are recreated if (!$localtlpdb->option("create_formats")) { @@ -894,9 +893,10 @@ sub handle_execute_actions { if ($::files_changed) { $errors += do_cmd_and_check("mktexlsr"); if (defined($localtlpdb->get_package('context')) - && (-x "$bindir/texlua" || -x "$bindir/texlua.exe")) { - $errors += do_cmd_and_check("mtxrun --generate"); - $errors += do_cmd_and_check("context --luatex --generate"); + && (-x "$bindir/luametatex" || -x "$bindir/luametatex.exe")) { +; # x86_64-linux binary too new +# $errors += do_cmd_and_check("mtxrun --generate"); +# $errors += do_cmd_and_check("context --luatex --generate"); } $::files_changed = 0; } @@ -1506,56 +1506,56 @@ sub action_path { my $winadminmode = 0; if (wndws()) { # - # for w32 we do system wide vs user setting detection as follows: - # - if --w32mode is NOT given, + # for windows we do system wide vs. user setting detection as follows: + # - if --windowsmode is NOT given, # - if admin # --> honor opt_w32_multi_user setting in tlpdb # - if not admin # - if opt_w32_multi_user == NO # --> do user path adjustment # - if opt_w32_multi_user == YES - # --> do nothing, warn that the setting is on, suggest --w32mode user - # - if --w32mode admin + # --> do nothing, warn the setting is on, suggest --windowsmode user + # - if --windowsmode admin # - if admin # --> ignore opt_w32_multi_user and do system path adjustment # - if non-admin # --> do nothing but warn that user does not have privileges - # - if --w32mode user + # - if --windowsmode user # - if admin # --> ignore opt_w32_multi_user and do user path adjustment # - if non-admin # --> ignore opt_w32_multi_user and do user path adjustment - if (!$opts{"w32mode"}) { + if (!$opts{"windowsmode"}) { $winadminmode = $localtlpdb->option("w32_multi_user"); if (!TeXLive::TLWinGoo::admin()) { if ($winadminmode) { - tlwarn("The TLPDB specifies system wide path adjustments\nbut you don't have admin privileges.\nFor user path adjustment please use\n\t--w32mode user\n"); + tlwarn("The TLPDB specifies system wide path adjustments\nbut you don't have admin privileges.\nFor user path adjustment please use\n\t--windowsmode user\n"); # and do nothing return ($F_ERROR); } } } else { - # we are in the block where a --w32mode argument is given + # we are in the block where a --windowsmode argument is given # we reverse the tests: if (TeXLive::TLWinGoo::admin()) { # in admin mode we simply use what is given on the cmd line - if ($opts{"w32mode"} eq "user") { + if ($opts{"windowsmode"} eq "user") { $winadminmode = 0; - } elsif ($opts{"w32mode"} eq "admin") { + } elsif ($opts{"windowsmode"} eq "admin") { $winadminmode = 1; } else { - tlwarn("$prg: unknown --w32admin mode: $opts{w32mode}, should be 'admin' or 'user'\n"); + tlwarn("$prg: unknown --windowsmode mode: $opts{windowsmode}, should be 'admin' or 'user'\n"); return ($F_ERROR); } } else { # we are non-admin - if ($opts{"w32mode"} eq "user") { + if ($opts{"windowsmode"} eq "user") { $winadminmode = 0; - } elsif ($opts{"w32mode"} eq "admin") { - tlwarn("$prg: You don't have the privileges to work in --w32mode admin\n"); + } elsif ($opts{"windowsmode"} eq "admin") { + tlwarn("$prg: You don't have the privileges to work in --windowsmode admin\n"); return ($F_ERROR); } else { - tlwarn("$prg: unknown --w32admin mode: $opts{w32mode}, should be 'admin' or 'user'\n"); + tlwarn("$prg: unknown --windowsmode mode: $opts{windowsmode}, should be 'admin' or 'user'\n"); return ($F_ERROR); } } @@ -6145,7 +6145,7 @@ sub check_texmfdbs { # explicitly run the various post actions, e.g., # on a client system or overriding global settings. # -# tlmgr postaction [--w32mode=user|admin] [--fileassocmode=1|2] [--all] +# tlmgr postaction [--windowsmode=user|admin] [--fileassocmode=1|2] [--all] # [install|remove] [shortcut|fileassoc|script] [<pkg>...] sub action_postaction { @@ -6166,8 +6166,8 @@ sub action_postaction { return; } if (wndws()) { - if ($opts{"w32mode"}) { - if ($opts{"w32mode"} eq "user") { + if ($opts{"windowsmode"}) { + if ($opts{"windowsmode"} eq "user") { if (TeXLive::TLWinGoo::admin()) { debug("Switching to user mode on user request\n"); TeXLive::TLWinGoo::non_admin(); @@ -6175,13 +6175,13 @@ sub action_postaction { # in user mode we also switch TEXMFSYSVAR to TEXMFVAR since # xetex.pl, but maybe others are writing to TEXMFSYSVAR chomp($ENV{"TEXMFSYSVAR"} = `kpsewhich -var-value TEXMFVAR`); - } elsif ($opts{"w32mode"} eq "admin") { + } elsif ($opts{"windowsmode"} eq "admin") { if (!TeXLive::TLWinGoo::admin()) { - tlwarn("$prg: you don't have the permissions for --w32mode=admin\n"); + tlwarn("$prg: you don't have permission for --windowsmode=admin\n"); return; } } else { - tlwarn("$prg: action postaction --w32mode can only be 'admin' or 'user'\n"); + tlwarn("$prg: action postaction --windowsmode can only be 'admin' or 'user'\n"); return; } } @@ -8789,9 +8789,9 @@ settings. =over 4 -=item B<path [--w32mode=user|admin] add> +=item B<path [--windowsmode=user|admin] add> -=item B<path [--w32mode=user|admin] remove> +=item B<path [--windowsmode=user|admin] remove> On Unix, adds or removes symlinks for executables, man pages, and info pages in the system directories specified by the respective options (see @@ -8803,21 +8803,21 @@ command must be rerun as needed. On Windows, the registry part where the binary directory is added or removed is determined in the following way: -If the user has admin rights, and the option C<--w32mode> is not given, +If the user has admin rights, and the option C<--windowsmode> is not given, the setting I<w32_multi_user> determines the location (i.e., if it is on then the system path, otherwise the user path is changed). -If the user has admin rights, and the option C<--w32mode> is given, this +If the user has admin rights, and the option C<--windowsmode> is given, this option determines the path to be adjusted. -If the user does not have admin rights, and the option C<--w32mode> +If the user does not have admin rights, and the option C<--windowsmode> is not given, and the setting I<w32_multi_user> is off, the user path is changed, while if the setting I<w32_multi_user> is on, a warning is issued that the caller does not have enough privileges. -If the user does not have admin rights, and the option C<--w32mode> +If the user does not have admin rights, and the option C<--windowsmode> is given, it must be C<user> and the user path will be adjusted. If a -user without admin rights uses the option C<--w32mode admin> a warning +user without admin rights uses the option C<--windowsmode admin> a warning is issued that the caller does not have enough privileges. =back @@ -8916,13 +8916,13 @@ Options: =over 4 -=item B<--w32mode=[user|admin]> +=item B<--windowsmode=[user|admin]> -If the option C<--w32mode> is given the value C<user>, all actions will +If the option C<--windowsmode> is given the value C<user>, all actions will only be carried out in the user-accessible parts of the registry/filesystem, while the value C<admin> selects the system-wide parts of the registry for the file associations. If you do not have -enough permissions, using C<--w32mode=admin> will not succeed. +enough permissions, using C<--windowsmode=admin> will not succeed. =item B<--fileassocmode=[1|2]> @@ -10249,7 +10249,7 @@ This script and its documentation were written for the TeX Live distribution (L<https://tug.org/texlive>) and both are licensed under the GNU General Public License Version 2 or later. -$Id: tlmgr.pl 65998 2023-02-21 01:33:24Z karl $ +$Id: tlmgr.pl 66218 2023-02-27 17:09:29Z karl $ =cut # test HTML version: pod2html --cachedir=/tmp tlmgr.pl >/tmp/tlmgr.html diff --git a/Build/source/texk/texlive/tl_support/fmtutil.cnf b/Build/source/texk/texlive/tl_support/fmtutil.cnf index fb9e1f10bdf..f51bb4a0f72 100644 --- a/Build/source/texk/texlive/tl_support/fmtutil.cnf +++ b/Build/source/texk/texlive/tl_support/fmtutil.cnf @@ -1,5 +1,4 @@ -# Generated by /home/texlive/karl/Master/bin/x86_64-linux/tlmgr on Sun Feb 19 17:24:45 2023 -# $Id: fmtutil-hdr.cnf 53804 2020-02-16 17:57:32Z karl $ +# Generated by /home/texlive/karl/Master/bin/x86_64-linux/tlmgr on Sun Dec 18 22:44:08 2022 # Originally written by Thomas Esser, 1998. Public domain. # # For guidance on how to support local formats, see the man @@ -70,7 +69,7 @@ pdfcsplain xetex - -etex csplain.ini eplain pdftex language.dat -translate-file=cp227.tcx *eplain.ini # # from hitex: -hilatex hitex language.dat -etex -ltx hilatex.ini +#! hilatex hitex language.dat -etex -ltx hilatex.ini hitex hitex language.def -etex -ltx hitex.ini # # from jadetex: @@ -131,11 +130,11 @@ pdftex pdftex language.def -translate-file=cp227.tcx *pdfetex.ini # # from platex: platex eptex language.dat *platex.ini -platex-dev euptex language.dat *platex.ini +platex-dev eptex language.dat *platex.ini # # from ptex: eptex eptex language.def *eptex.ini -ptex eptex - ptex.ini +ptex ptex - ptex.ini # # from tex: tex tex - tex.ini @@ -149,7 +148,7 @@ uplatex-dev euptex language.dat *uplatex.ini # # from uptex: euptex euptex language.def *euptex.ini -uptex euptex - uptex.ini +uptex uptex - uptex.ini # # from xelatex-dev: xelatex-dev xetex language.dat -etex xelatex.ini |