From fdef059e4e6932b6257f350c6bad64e960b8fa0d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 23 Jun 2009 00:47:00 +0000 Subject: pass $(EXEEXT) for cygwin git-svn-id: svn://tug.org/texlive/trunk@13904 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/tetex/ChangeLog | 6 ++++++ Build/source/texk/tetex/Makefile.am | 7 ++++--- Build/source/texk/tetex/Makefile.in | 2 +- Build/source/texk/tetex/texlinks | 31 ++++++++++++++++++++----------- 4 files changed, 31 insertions(+), 15 deletions(-) diff --git a/Build/source/texk/tetex/ChangeLog b/Build/source/texk/tetex/ChangeLog index 2dac9a7ba43..edb9b75661d 100644 --- a/Build/source/texk/tetex/ChangeLog +++ b/Build/source/texk/tetex/ChangeLog @@ -1,3 +1,9 @@ +2009-06-23 Karl Berry + + * Makefile.am (run_texlinks): add -e "$(EXEEXT)". + * texlinks: new option -e to specify executable extension (for + cygwin). + 2009-06-11 Norbert Preining * fmtutil (log_warning): new fn, related code, so that diff --git a/Build/source/texk/tetex/Makefile.am b/Build/source/texk/tetex/Makefile.am index 6aa2b88b715..97c088d2ad3 100644 --- a/Build/source/texk/tetex/Makefile.am +++ b/Build/source/texk/tetex/Makefile.am @@ -159,9 +159,10 @@ EXTRA_DIST += \ ## This target is invoked by the top-level make, ## to create the per-format engine symlinks in $(bindir), ## after everything else is installed. We explicitly specify the -## fmtutil.cnf file to use for the sake of distro builds. Also, that way -## we don't have to run mktexlsr also. -run_texlinks = $(bindir)/texlinks -f $(web2cdir)/fmtutil.cnf +## fmtutil.cnf file to use for the sake of distro builds. +## We pass along the executable extension for the sake of cygwin, so we +## don't create dangling symlinks there (even though they work). +run_texlinks = $(bindir)/texlinks -v -f $(web2cdir)/fmtutil.cnf -e "$(EXEEXT)" run-texlinks: PATH="$(bindir):$(PATH)"; export PATH; $(run_texlinks) diff --git a/Build/source/texk/tetex/Makefile.in b/Build/source/texk/tetex/Makefile.in index be64fe2898e..959b2bdd1c9 100644 --- a/Build/source/texk/tetex/Makefile.in +++ b/Build/source/texk/tetex/Makefile.in @@ -278,7 +278,7 @@ dist_web2c_DATA = fmtutil.cnf EXTRA_DIST = README.a2ping README.texdoctk doc/Makefile \ doc/TETEXDOC.bib doc/TETEXDOC.tex fontinst.bat pdfetex-pl.pool \ updmap.pl win32/epstopdf.c win32/epstopdf.txt -run_texlinks = $(bindir)/texlinks -f $(web2cdir)/fmtutil.cnf +run_texlinks = $(bindir)/texlinks -v -f $(web2cdir)/fmtutil.cnf -e "$(EXEEXT)" all: all-am .SUFFIXES: diff --git a/Build/source/texk/tetex/texlinks b/Build/source/texk/tetex/texlinks index d8e51550924..db16bb45aa0 100755 --- a/Build/source/texk/tetex/texlinks +++ b/Build/source/texk/tetex/texlinks @@ -1,4 +1,5 @@ #!/bin/sh +# $Id$ # Thomas Esser, 1999, 2002, 2003. public domain. @@ -38,24 +39,26 @@ export PATH # hack around a bug in zsh: test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' -cnf=fmtutil.cnf # name of the config file -version=20080528.1847 # utc timestamp +version=20090623.0228 progname=texlinks +cnf=fmtutil.cnf # name of the config file usage='Usage: texlinks [OPTION]... [DIRECTORY]... Create symbolic links format -> engine according to fmtutil setup. Mandatory arguments to long options are mandatory for short options too. - -h, --help show this help text - --version show version string + -e, --exeext EXT append EXT to symlink targets (default: none) -f, --cnffile FILE use FILE as config file (default: fmtutil.cnf) - -v, --verbose enable verbose messages (default: off) -m, --multiplatform operate in all platform specific directories (default: operate only in directory for this platform) - -s, --silent silently skip existing scripts / binaries + -q, --quiet silently skip existing scripts / binaries (default: issue warning) + -s, --silent same as -q -u, --unlink remove symlinks created by texlinks + -v, --verbose enable verbose messages (default: off) + -h, --help show this help text + --version show version string The DIRECTORY arguments are an optional list of directories in which to operate. If no directories are specified and --multiplatform is @@ -125,7 +128,8 @@ check_for_binary() ############################################################################### # install_link(dest src) # create a symlink like ln -s dest src, but make sure that src is not -# an existing binary +# an existing binary, possibly adding the executable extension if +# passed on the command. ############################################################################### install_link() { @@ -148,6 +152,9 @@ install_link() ;; esac + # append .exe if supplied (for cygwin). + test -n "$exeext" && dest="$dest$exeext" + case $src in */cont-??|*/mptopdf) # context includes wrapper scripts that create/run these. @@ -155,7 +162,7 @@ install_link() ;; *) test "x$src" != "x`(ls -ld $src | awk '{print $NF}') 2>/dev/null`" && - verbose_do rm -f "$src" + rm -f "$src" if test -f "$src"; then case $silent in @@ -235,6 +242,7 @@ main() dirs= needsCleanup=false + exeext= multiplatform=false verbose=false unlink=false @@ -247,13 +255,14 @@ main() --h*|-h) echo "$usage"; exit 0;; --version) - echo "$progname version $version."; exit 0;; + echo "$progname version $version"; exit 0;; --cnffile|-f) shift; cnf_file=$1;; - --v*|-v) verbose=true;; - --s*|-s) silent=true;; + --e*|-e) shift; exeext=$1;; --m*|-m) multiplatform=true;; + --s*|-s|--q*|-q) silent=true;; --u*|-u) unlink=true;; + --v*|-v) verbose=true;; -*) errmsg "fmtutil: unknown option \`$1' ignored.";; *) break;; esac -- cgit v1.2.3