summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/Makefile.in
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-05-29 20:59:08 +0000
committerKarl Berry <karl@freefriends.org>2008-05-29 20:59:08 +0000
commit6cd8ea7a508a2ba919634750b7bcb3409f6e39f3 (patch)
treeba49bf34f27a6e1dd54c7a98e3d33ae720294432 /Build/source/texk/kpathsea/Makefile.in
parent83a925beac351c221bc8499021eaf8568a758801 (diff)
remove texmf.in, just use slave copy of texmf.cnf; consequently simplify paths.h generation
git-svn-id: svn://tug.org/texlive/trunk@8409 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/Makefile.in')
-rw-r--r--Build/source/texk/kpathsea/Makefile.in87
1 files changed, 28 insertions, 59 deletions
diff --git a/Build/source/texk/kpathsea/Makefile.in b/Build/source/texk/kpathsea/Makefile.in
index bf86b4c4211..9a46993995e 100644
--- a/Build/source/texk/kpathsea/Makefile.in
+++ b/Build/source/texk/kpathsea/Makefile.in
@@ -57,43 +57,6 @@ kpsereadlink: readlink.o
$(kpathsea): $(objects)
$(kpathsea_link) -rpath $(libdir) -version-info @KPSE_LT_VERS@ $(objects)
-# Make variable substitutions for paths.h.
-texmf.cnf: texmf.in texmf.sed
- sed -f texmf.sed $(srcdir)/texmf.in >$@
-
-# The idea is to turn each var=value into s%@var@%value%g. Seems simpler
-# to put the substitutions in a file than to play shell quoting games.
-texmf.sed: Makefile
- rm -f texmf.sed
- echo $(makevars) \
- | tr ' ' '\012' \
- | sed -e 's/^/s%@/' -e 's/=/@%/' -e 's/$$/%g/' \
- >$@
-# Insert $TEXMF in as many of the hardwired paths as possible. We could
-# use the slightly different rule 's%$(texmf)/%\$$TEXMF/%g' and avoid
-# the need for the corrections below. But if texmf.in is edited
-# the heuristic may no longer work.
- echo 's%$(texmf)%\$$TEXMF%g' >>$@
-# Now we repair the damage this may have caused. Don't replace the rhs of
-# the TEXMFMAIN assignment itself, then we'd end up with TEXMFMAIN = $TEXMF
-# and TEXMF = $TEXMFMAIN. The (commented) assignment of TEXMFLOCAL is
-# likely to have been mangled as well.
- echo '/^ *TEXMFMAIN[ =]/s%\$$TEXMF%$(texmf)%' >>$@
- echo '/^[% ]*TEXMFLOCAL[ =]/s%\$$TEXMF%$(texmf)%' >>$@
- echo '/^[% ]*TEXMFDIST[ =]/s%\$$TEXMF%$(texmf)%' >>$@
- echo '/^[% ]*VARTEXMF[ =]/s%\$$TEXMF%$(texmf)%' >>$@
- echo '/^[% ]*TEXMFSYSVAR[ =]/s%\$$TEXMF%$(texmf)%' >>$@
- echo '/^[% ]*TEXMFSYSCONFIG[ =]/s%\$$TEXMF%$(texmf)%' >>$@
- echo '/^[% ]*TEXMFSYSVAR[ =]/s%$(texmf)MAIN%\$$TEXMFMAIN%' >>$@
- echo '/^[% ]*TEXMFSYSCONFIG[ =]/s%$(texmf)MAIN%\$$TEXMFMAIN%' >>$@
- echo '/^[% ]*TEXMFVAR[ =]/s%\$$TEXMF%$(texmf)%' >>$@
- echo '/^[% ]*TEXMFCONFIG[ =]/s%\$$TEXMF%$(texmf)%' >>$@
- echo '/^[% ]*TEXMFVAR[ =]/s%$(texmf)MAIN%\$$TEXMFMAIN%' >>$@
- echo '/^[% ]*TEXMFCONFIG[ =]/s%$(texmf)MAIN%\$$TEXMFMAIN%' >>$@
- echo '/^[% ]*TEXMFCNF[ =]/s%\$$TEXMF%$(texmf)%' >>$@
-# And fill in the last clause of TEXMFCNF with an absolute path.
- echo '/^ *TEXMFCNF[ =]/s%@web2c@%$(web2cdir)%' >>$@
-
# 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
@@ -106,34 +69,44 @@ texmf.sed: Makefile
# No backslash-newline escapes in the long sed replacement because that
# will turn into a space in the output.
#
-# Without the $TEXMF/prefix/etc. substitutions, if the cnf file was
-# not found, the compile-time paths would be of little use, since TEXMF
-# (etc.) wouldn't be defined. Alternatively, we could have a way to
-# specify compile-time default values for variables in general, but I
-# think it's better to keep the last-resort paths as simple as possible.
+# We replace the $TEXMF* references with nonexisting directories. These
+# are the compile-time defaults and are not useful in the native TL
+# builds; we rely completely on the self-location. (Previously, the
+# random build-time paths would get included in the binaries, to
+# consequent confusion.)
+#
+# We preserve the $SELFAUTO* references, since the selfauto-using
+# compile-time path for cnf files is how texmf.cnf gets found, which
+# determines everything else.
#
# 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.in that have no effect on paths.h, since that would cause
+# 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. Ultimately
-# the path-splitting code should be changed to understand both.
+# We also replace all semicolons with colons in the paths.
+# The path-splitting code should be changed to understand both.
+#
$(kpathsea_dir)/paths.h: stamp-paths
-stamp-paths: texmf.cnf
+stamp-paths: $(srcdir)/texmf.cnf
echo "/* paths.h: Generated from texmf.cnf. */" >paths.tmp
- sed -e 's/%.*//' -e 's/^[ ]*//' -e 's/[ ]*$$//' texmf.cnf \
+ sed -e 's/%.*//' -e 's/^[ ]*//' -e 's/[ ]*$$//' $(srcdir)/texmf.cnf \
| grep '^[ ]*[A-Z0-9_]*[ =]' \
| sed '/^$$/d' \
| sed 's/^\([^ =]*\)[ ]*=*[ ]*\(.*\)/#ifndef DEFAULT_\1%#define DEFAULT_\1 "\2"%#endif/' \
| tr '%' '\012' \
- | sed -e 's%\$$TEXMFMAIN%$(texmf)%g' \
- -e 's%\$$TEXMF%$(texmf)%g' \
- -e 's%\$$VARTEXFONTS%$(vartexfonts)%g' \
- -e 's%\$$web2cdir%$(web2cdir)%g' \
- -e 's%\$$prefix%$(prefix)%g' \
+ | sed -e 's%\$$TEXMFCONFIG%/nonesuch/texmfconfig%g' \
+ -e 's%\$$TEXMFDIST%/nonesuch/texmfdist%g' \
+ -e 's%\$$TEXMFDOCDIR%/nonesuch/texmfdocdir%g' \
+ -e 's%\$$TEXMFLOCAL%/nonesuch/texmflocal%g' \
+ -e 's%\$$TEXMFMAIN%/nonesuch/texmfmain%g' \
+ -e 's%\$$TEXMFSYSCONFIG%/nonesuch/texmfsysconfig%g' \
+ -e 's%\$$TEXMFSYSVAR%/nonesuch/texmfsysvar%g' \
+ -e 's%\$$TEXMFVAR%/nonesuch/texmfvar%g' \
+ -e 's%\$$TEXMF%/nonesuch/texmf%g' \
+ -e 's%\$$VARTEXFONTS%/nonesuch/vartexfonts%g' \
| sed -e 's%;%:%g' \
>>paths.tmp
@if cmp -s paths.h paths.tmp 2>/dev/null; then \
@@ -174,10 +147,6 @@ install-exec: kpsewhich
|| test ! -r $(scriptdir)/mktexlsr; then \
$(INSTALL_SCRIPT) $(srcdir)/mktexlsr $(scriptdir)/mktexlsr; \
else true; fi
-# if grep 'original mktexfmt --' $(scriptdir)/mktexfmt > /dev/null 2>&1\
-# || test ! -r $(scriptdir)/mktexfmt; then \
-# $(INSTALL_SCRIPT) $(srcdir)/mktexfmt $(scriptdir)/mktexfmt; \
-# else true; fi
$(INSTALL_DATA) $(srcdir)/mktex.opt $(web2cdir)/mktex.opt
$(INSTALL_SCRIPT) $(srcdir)/mktexdir $(web2cdir)/mktexdir
$(INSTALL_DATA) $(srcdir)/mktexdir.opt $(web2cdir)/mktexdir.opt
@@ -196,11 +165,11 @@ uninstall-exec:
$(UNINSTALL_PROGRAM) $(bindir)/kpseaccess
$(UNINSTALL_PROGRAM) $(bindir)/kpsereadlink
-install-data: texmf.cnf kpathsea.info install-man
+install-data: $(srcdir)/texmf.cnf kpathsea.info install-man
$(SHELL) $(top_srcdir)/../mkinstalldirs $(texmf) $(infodir) $(web2cdir)
if grep 'original texmf.cnf --' $(web2cdir)/texmf.cnf >/dev/null 2>&1 \
|| test ! -r $(web2cdir)/texmf.cnf; then \
- $(INSTALL_DATA) texmf.cnf $(web2cdir)/texmf.cnf; \
+ $(INSTALL_DATA) $(srcdir)/texmf.cnf $(web2cdir)/texmf.cnf; \
else true; fi
# Info files.
$(INSTALL_DATA) $(srcdir)/kpathsea.i* $(infodir)/
@@ -277,7 +246,7 @@ mostlyclean::
rm -f kpsewhich kpsestat kpseaccess kpsereadlink *.lo
$(LIBTOOL) --mode=clean $(RM) lib$(library).la
distclean::
- rm -f paths.h texmf.cnf texmf.sed stamp-paths
+ rm -f paths.h stamp-paths
# The manual pages
manfiles = kpseaccess.1 kpsestat.1 kpsewhich.1 kpsereadlink.1 \