summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/cnf-to-paths.awk
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-08-07 22:50:24 +0000
committerKarl Berry <karl@freefriends.org>2011-08-07 22:50:24 +0000
commit5c643469f1d42bcc79dc4d4856860d28553f062d (patch)
treefd509ba7d4b25af2669d97173a7767c193da9cfa /Build/source/texk/kpathsea/cnf-to-paths.awk
parent225707d558db9d31ef762d40845fb25f74c971b2 (diff)
preserve texmf.cnf values starting with /
git-svn-id: svn://tug.org/texlive/trunk@23442 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/cnf-to-paths.awk')
-rw-r--r--Build/source/texk/kpathsea/cnf-to-paths.awk19
1 files changed, 14 insertions, 5 deletions
diff --git a/Build/source/texk/kpathsea/cnf-to-paths.awk b/Build/source/texk/kpathsea/cnf-to-paths.awk
index 755a5c30d14..faae308cb4a 100644
--- a/Build/source/texk/kpathsea/cnf-to-paths.awk
+++ b/Build/source/texk/kpathsea/cnf-to-paths.awk
@@ -10,20 +10,25 @@
# (whitespace around the = is optional)
#
/^[ \t]*[A-Z0-9_]+[ \t]*=/ {
- # On these lines, there are two cases:
+ # On these lines, we distinguish three cases:
#
# 1) definitions referring to SELFAUTO*, which we want to keep. In
# particular, this is how the compile-time TEXMFCNF gets defined and
# thus how texmf.cnf gets found.
#
- # 2) all the others, which we want to convert to a constant
- # /nonesuch. That way, the binaries don't get change just because we
- # change definitions in texmf.cnf.
+ # 2) definitions starting with a /, which we also want to keep. Here
+ # we assume a distro maintainer has changed a variable, e.g.,
+ # TEXMFMAIN=/usr/share/texmf, so keep it. (This also preserves the
+ # default values for OSFONTDIR and TRFONTS, but that's ok.)
+ #
+ # 3) anything else, which we want to convert to a constant /nonesuch.
+ # That way, the binaries don't get changed just because we change
+ # definitions in texmf.cnf.
#
# The definition of DEFAULT_TEXMF (and other variables)
# that winds up in the final paths.h will not be used.
- # Let's extract the identifier and the value from the line. Since
+ # Extract the identifier and the value from the line. Since
# gawk's subexpression matching is an extension, do it with copies.
ident = $0;
sub(/^[ \t]*/, "", ident);
@@ -38,6 +43,10 @@
# Replace all semicolons with colons in the SELFAUTO paths we're keeping.
# (The path-splitting code should be changed to understand both.)
gsub(/;/, ":", val);
+ } else if (val ~ /^\//) {
+ # If the value starts with /, presume we're compiling with changes
+ # made for a distro, and keep it. Likewise switch to :.
+ gsub(/;/, ":", val);
} else {
val = "/nonesuch";
}