diff options
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/kpathsea/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/Makefile.am | 17 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/bsnl.awk | 17 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/texmf.cnf | 3 |
4 files changed, 34 insertions, 9 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index c19a926b8d2..1b7256fe053 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,3 +1,9 @@ +2010-04-04 Karl Berry <karl@tug.org> + + * bsnl.awk: tiny awk program to eliminate \-newline sequences. + * Makefile.am (stamp-paths): call it. + * texmf.cnf (TEXMF_RESTRICTED_SCRIPTS): use \-newline again. + 2010-03-29 Peter Breitenlohner <peb@mppmu.mpg.de> * lib.h, xcalloc.c, xmalloc.c, xrealloc.c: Change type of size diff --git a/Build/source/texk/kpathsea/Makefile.am b/Build/source/texk/kpathsea/Makefile.am index e1184d7e646..0ff3b8c5419 100644 --- a/Build/source/texk/kpathsea/Makefile.am +++ b/Build/source/texk/kpathsea/Makefile.am @@ -159,8 +159,8 @@ kpseinclude_HEADERS = \ ## First null out comments and leading/trailing whitespace, then remove ## lines that define invalid C identifiers, then remove blank lines and -## lines that define lowercase values (those are never path values). Each -## line remaining looks like +## lines that define lowercase values (those are never path values). +## Each line remaining looks like ## <name> = <value> ## (but = and surrounding spaces are optional, hence can't remove all spaces). ## Change this to #ifndef DEFAULT_name@#define DEFAULT_name "value"@#endif, @@ -181,18 +181,19 @@ kpseinclude_HEADERS = \ ## ## The definition of DEFAULT_TEXMF (and other variables) ## that winds up in the final paths.h will not be used. -# +## ## We don't want to rewrite paths.h when we have only changed comments ## in texmf.cnf that have no effect on paths.h, since that would cause ## almost everything to be rebuilt. -# +## ## We also replace all semicolons with colons in the paths. -## The path-splitting code should be changed to understand both. -# +## (The path-splitting code should be changed to understand both.) +## paths.h: stamp-paths -stamp-paths: texmf.cnf +stamp-paths: texmf.cnf bsnl.awk echo "/* paths.h: Generated from texmf.cnf. */" >paths.tmp - sed -e 's/%.*//' -e 's/^[ ]*//' -e 's/[ ]*$$//' $< \ + awk -f $(srcdir)/bsnl.awk texmf.cnf \ + | sed -e 's/%.*//' -e 's/^[ ]*//' -e 's/[ ]*$$//' \ | grep '^[ ]*[A-Z0-9_]*[ =]' \ | sed '/^$$/d' \ | sed 's/^\([^ =]*\)[ ]*=*[ ]*\(.*\)/#ifndef DEFAULT_\1%#define DEFAULT_\1 "\2"%#endif/' \ diff --git a/Build/source/texk/kpathsea/bsnl.awk b/Build/source/texk/kpathsea/bsnl.awk new file mode 100644 index 00000000000..5464628b788 --- /dev/null +++ b/Build/source/texk/kpathsea/bsnl.awk @@ -0,0 +1,17 @@ +# bsnl.awk - eliminate backslash-newline sequences +# Public domain. Originally written 2010, Karl Berry. + +# on a line ending with a backslash, save it (minus the backslash). +/\\$/ { + buf = buf substr ($0, 1, length ($0) - 1); + next; + } + +# on other lines, print the buffer if there is one, then the regular line. + { + if (buf) { + printf "%s", buf; # don't print a newline + buf = ""; + } + print; + } diff --git a/Build/source/texk/kpathsea/texmf.cnf b/Build/source/texk/kpathsea/texmf.cnf index ae18e643e4c..2292c1ce893 100644 --- a/Build/source/texk/kpathsea/texmf.cnf +++ b/Build/source/texk/kpathsea/texmf.cnf @@ -527,7 +527,8 @@ shell_escape.tex = f % This is used by the Windows script wrapper for restricting searching % for the purportedly safe shell_escape_commands above to system % directories. -TEXMF_RESTRICTED_SCRIPTS = {!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST}/scripts/{$progname,$engine,}// +TEXMF_RESTRICTED_SCRIPTS \ + = {!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST}/scripts/{$progname,$engine,}// % Allow TeX \openin, \openout, or \input on filenames starting with `.' % (e.g., .rhosts) or outside the current tree (e.g., /etc/passwd)? |