summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/README.coding20
-rw-r--r--Build/source/README.config23
-rw-r--r--Build/source/README.hacking4
-rw-r--r--Build/source/README.layout5
-rwxr-xr-xBuild/source/build-aux/relpath58
-rw-r--r--Build/source/texk/ChangeLog6
-rw-r--r--Build/source/texk/am/script_links.am31
-rw-r--r--Build/source/texk/tex4htk/ChangeLog4
-rw-r--r--Build/source/texk/tex4htk/Makefile.am16
-rw-r--r--Build/source/texk/tex4htk/Makefile.in164
-rw-r--r--Build/source/texk/texlive/linked_scripts/ChangeLog9
-rw-r--r--Build/source/texk/texlive/linked_scripts/Makefile.am47
-rw-r--r--Build/source/texk/texlive/linked_scripts/Makefile.in118
-rw-r--r--Build/source/texk/texlive/linked_scripts/scripts.lst90
-rw-r--r--Build/source/utils/chktex/Makefile.in29
-rw-r--r--Build/source/utils/xindy/Makefile.in28
16 files changed, 358 insertions, 294 deletions
diff --git a/Build/source/README.coding b/Build/source/README.coding
index 90d17adea3d..3a1f19cf594 100644
--- a/Build/source/README.coding
+++ b/Build/source/README.coding
@@ -19,21 +19,21 @@ independently.
-----------------------------------------------
The TL build system no longer supports pre-ANSI C compilers. Thus all
function prototypes and definitions must conform to the ANSI C standard
-(including `void' in the declaration of functions that take no parameters).
+(including `void' in the declaration of C functions with no parameters).
1.2. Static
-----------
-Functions used in only one file must be declared `static'; no prototype is
-required except as forward declaration.
+Functions used in only one file should be declared `static'; no prototype is
+then required except as forward declaration.
1.3. Extern
-----------
-Functions used in several files require (extern) prototypes to be provided
-by a header files. That header must be included in the file defining the
-function and in all files using that function -- this is the only way to
-guarantee consistency between definition and use of functions. No more
-`extern's sprinkled throughout the C code (with or without comment where
-that function is defined).
+Non-static functions, e.g., used in several files, require (extern)
+prototypes to be provided by a header files. That header must be included
+in the file defining the function and in all files using that function --
+this is the only way to guarantee consistency between definition and use of
+functions. No more `extern's sprinkled throughout the C code (with or
+without comment where that function is defined).
1.4. Variables
--------------
@@ -48,7 +48,7 @@ exactly one file.
------------------------
Ideally, a function parameter not modified by the function should be
declared as const. This is important in particular for strings (`char *')
-because frequently string literals are used as actual arguments.
+because frequently the actual arguments are string literals.
However, a `char **' value is not assignment compatible with a `const
char **' variable. Getting all `const's right often is quite involved but
usually can be done. There are, however, a few notable exceptions: the X11
diff --git a/Build/source/README.config b/Build/source/README.config
index 6d476f71727..bb2ad81d640 100644
--- a/Build/source/README.config
+++ b/Build/source/README.config
@@ -1,8 +1,8 @@
Copyright (C) 2009-2011 Peter Breitenlohner <tex-live@tug.org>
You may freely use, modify and/or distribute this file.
- Configure options for the TeX Live (TL) build system
- =====================================================
+ Configure options for the TeX Live (TL) build system
+ ====================================================
The TL build system contains a collection of program packages, i.e.,
subdirectories texk/PROG/ (where `PROG' is web2c, afm2pl, bibtex8, etc.) and
@@ -119,7 +119,7 @@ appended to banner lines. The Build script for a native TL build doesn't
use this option, but distro builds should specify this as, e.g.,
'/SomeDistro'.
-2.3.1. --with-editor=CMD
+2.3.2. --with-editor=CMD
Specify the command CMD to invoke from the `e' option, replacing the default
`vi +%d '%s'' for Unix or `texworks --position=%d "%s"' for Windows.
@@ -136,12 +136,13 @@ If enabled (by default) allow TeX's '--ipc' option.
2.3.6. --disable-tex, --enable-etex, --disable-aleph, --disable-pdftex,
--disable-luatex, --disable-xetex, --disable-ptex, --disable-eptex,
- --disable-mf, --disable-mp
+ --disable-uptex, --disable-euptex, --disable-mf, --disable-mp
Do or do not build the various TeX, METAFONT, and MetaPost engines
(defaults for the TeX engines are defined in texk/web2c/ac/web2c.ac).
2.3.7. --enable-tex-synctex, --disable-etex-synctex,
--disable-ptex-synctex, --disable-eptex-synctex
+ --disable-uptex-synctex, --disable-euptex-synctex
--disable-pdftex-synctex, --disable-xetex-synctex
Build the various TeX engines with or without SyncTeX support (ignored for a
native TeX Live build, defaults are defined in texk/web2c/ac/web2c.ac).
@@ -157,7 +158,7 @@ Do not build a separate non-graphically-capable METAFONT.
2.3.11. --disable-web-progs
Do not build the WEB programs bibtex ... weave, e.g., if you just
-want to rebuild engines.
+want to rebuild some engines.
2.3.12. --disable-omfonts
Build the Web versions of the omega font utilities (ofm2opl, opl2ofm, ovf2ovp,
@@ -233,14 +234,14 @@ The flags for a system freetype2 library are determined via freetype-config.
3.4. Configure options for libpoppler
-------------------------------------
-3.4.1. --with-system-xpdf
-Use an installed (system) version >=0.12 of libpoppler instead of xpdf
-(and pkg-config to obtain the required flags).
-
-3.4.2. --with-system-poppler
+3.4.1. --with-system-poppler
Use an installed (system) version >=0.12 of libpoppler (and pkg-config
to obtain the required flags).
+3.4.2. --with-system-xpdf
+Use an installed (system) version >=0.12 of libpoppler instead of xpdf
+(and pkg-config to obtain the required flags).
+
3.5. Configure options for libgraphite
--------------------------------------
3.5.1. --without-graphite
@@ -267,7 +268,7 @@ For system icu libraries.
4.3. PKG_CONFIG=/path/to/pkg-config
-----------------------------------
-For fontconfig and system xpdf (poppler) libraries.
+For fontconfig and system poppler libraries.
4.4. CLISP=/path/to/clisp
-------------------------
diff --git a/Build/source/README.hacking b/Build/source/README.hacking
index a651163bc87..a00b74140c4 100644
--- a/Build/source/README.hacking
+++ b/Build/source/README.hacking
@@ -106,12 +106,12 @@ LIB_LIBS are constructed from values for the configure options
'--with-Lib-includes' and/or '--with-Lib-libdir'; alternatively they may
result from running pkg-config, freetype-config, or similar.
-As example, the file libs/libpng/ac/withenable.ac contains
+As an example, the file libs/libpng/ac/withenable.ac contains
KPSE_WITH_LIB([libpng], [zlib])
where KPSE_WITH_LIB, defined in m4/kpse-setup.m4, has one required argument
-- the name of the subdirectory -- and two optional arguments: a list of
required TL libraries, and a list of options ('tree' if only the library
-from the TL can be used). The file libs/libpng/ac/libpng.ac contains
+from the TL tree can be used). The file libs/libpng/ac/libpng.ac contains
KPSE_TRY_LIB([libpng],
[#include <png.h>],
[png_structp png; png_voidp io; png_rw_ptr fn;
diff --git a/Build/source/README.layout b/Build/source/README.layout
index 4138bb2a700..38c5d6d4657 100644
--- a/Build/source/README.layout
+++ b/Build/source/README.layout
@@ -28,8 +28,8 @@ also kept separately as precise documentation of our changes.
All this should simplify upgrading of modules maintained independently
and/or integrating new modules into the TL build system.
- Layout of the TeX Live (TL) build system
- ========================================
+ Layout of the TL build system
+ =============================
1. Layout of directories
========================
@@ -71,6 +71,7 @@ Several libraries use an (almost) unmodified source tree supplemented by a
proxy build system (bypassing that of the source tree), e.g.,
libs/zlib/zlib-1.2.5/ (almost) unmodified source tree
+libs/zlib/zlib-1.2.5-PATCHES/ modifications applied to that source tree
libs/zlib/Makefile.am proxy Makefile.am
libs/zlib/configure.ac and configure.ac
diff --git a/Build/source/build-aux/relpath b/Build/source/build-aux/relpath
new file mode 100755
index 00000000000..f448cfcd84e
--- /dev/null
+++ b/Build/source/build-aux/relpath
@@ -0,0 +1,58 @@
+#! /bin/sh
+# relpath - compute the relative path FROM -> TO
+
+# Copyright (C) 2011 Peter Breitenlohner <tex-live@tug.org>
+#
+# This file is free software; the copyright holder
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# First handle the simple case that FROM is a subdirectory of TO
+
+case $2 in
+ "$3"/*)
+ echo "X$2" | sed 's,^X'$3'/,,; s,[^/][^/]*,..,g'
+ exit 0;;
+esac
+
+# Now the more general case, mainly for distro builds
+
+err () {
+ echo "$*" >&2
+ exit 1
+}
+
+test $# = 3 || err 'relpath PREF FROM TO
+ compute the relative path FROM -> TO
+ where FROM and TO are absolute paths, and
+ prefixed with PREF are existing directories'
+
+chk () {
+ case $2 in
+ *' '* | *'/./'* | *'/../'*) err "'$2' contains ' ', '/./', or '/../'";;
+ /*) ;;
+ *) err "'$2' must be an absolute path";;
+ esac
+ test -d "$1$2" || err "'$1$2' not a directory"
+ # Normalize, remove leading and trailing /
+ res=`echo $2 | sed 's,^//*,,; s,//*$,,; s,///*,/,g'`
+}
+
+chk "$1" "$2"; from=$res
+chk "$1" "$3"; to=$res
+
+test "/$from" = "/$to" && { echo "."; exit 0; }
+
+# Remove common prefix
+while test "/$to" != "/"; do
+ test "/$from" = "/" && { echo "$to"; exit 0; }
+ test `echo $from | sed 's,/.*,,'` = `echo $to | sed 's,/.*,,'` || break
+ from=`echo $from | sed 's,[^/]*/*,,'`
+ to=`echo $to | sed 's,[^/]*/*,,'`
+done
+
+from=`echo $from | sed 's,[^/][^/]*,..,g'`
+test "/$to" = "/" || from="$from/$to"
+
+echo "$from"
+exit 0
diff --git a/Build/source/texk/ChangeLog b/Build/source/texk/ChangeLog
index 3a83194d0d2..486ae702364 100644
--- a/Build/source/texk/ChangeLog
+++ b/Build/source/texk/ChangeLog
@@ -1,3 +1,9 @@
+2011-09-09 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * ../build-aux/relpath: New shell script to compute relative
+ path for linked scripts.
+ * am/script_links.am: Use relpath, mainly for distros.
+
2011-05-30 Peter Breitenlohner <peb@mppmu.mpg.de>
* am/bin_links.am: New Makefile fragment for symlinks within
diff --git a/Build/source/texk/am/script_links.am b/Build/source/texk/am/script_links.am
index a73f397ecc3..14079694336 100644
--- a/Build/source/texk/am/script_links.am
+++ b/Build/source/texk/am/script_links.am
@@ -1,4 +1,4 @@
-## texk/am/perl_links.am: Makefile fragment for perl script links.
+## texk/am/script_links.am: Makefile fragment for lua/perl/shell script links.
##
## Copyright (C) 2011 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.
@@ -9,8 +9,8 @@
##
## requires conditionals WIN32 and WIN32_WRAP
## requires $(scriptsdir): e.g., texmf/scripts/chktex
-## appends to $(nodist_bin_SCRIPTS)
-#
+## appends to $(nodist_bin_SCRIPTS) and $(EXTRA_DIST)
+##
## install-lua-scripts requires $(lua_scripts), e.g., musixflx
## install-perl-scripts requires $(perl_scripts), e.g., deweb
## install-shell-scripts requires $(shell_scripts), e.g. htlatex
@@ -18,7 +18,7 @@
## shell_scripts are somewhat special because win32 needs
## additional .bat scripts or similar
.PHONY: install-lua-links install-perl-links install-shell-links \
- install-links make-links uninstall-links
+ install-links uninstall-links
all_scripts = $(lua_scripts) $(perl_scripts) $(shell_scripts)
@@ -48,21 +48,20 @@ if !WIN32
$(MAKE) $(AM_MAKEFLAGS) TYPE=shell EXT=sh install-links
endif !WIN32
-# We support both multiplatform and non-multiplatform builds.
-install-links:
- case "$(bindir)" in \
- */bin) $(MAKE) $(AM_MAKEFLAGS) REL=.. TYPE=$(TYPE) EXT=$(EXT) make-links;; \
- */bin/*) $(MAKE) $(AM_MAKEFLAGS) REL=../.. TYPE=$(TYPE) EXT=$(EXT) make-links;; \
- *) echo "strange directory '$(bindir)' for linked $(TYPE) scripts" >&2; \
- exit 1;; \
- esac
+EXTRA_DIST += ../../build-aux/relpath
-make-links:
- @cd $(DESTDIR)$(bindir) && \
+# We support native builds, multiplatform or not, as well as distro builds.
+install-links:
+ @REL=`$(SHELL) $(srcdir)/../../build-aux/relpath '$(DESTDIR)' '$(bindir)' '$(prefix)'`; \
+ if test -z "$$REL"; then \
+ echo 'unable to compute relative path for linked $(TYPE) scripts' >&2; \
+ exit 1; \
+ fi; \
+ cd $(DESTDIR)$(bindir) && \
for f in $($(TYPE)_scripts); do \
rm -f $$f; \
- echo "creating link '$$f' -> '$(REL)/$(scriptsdir)/$$f.$(EXT)'"; \
- $(LN_S) $(REL)/$(scriptsdir)/$$f.$(EXT) $$f || exit 1; \
+ echo "creating link '$$f' -> '$$REL/$(scriptsdir)/$$f.$(EXT)'"; \
+ $(LN_S) $$REL/$(scriptsdir)/$$f.$(EXT) $$f || exit 1; \
done
uninstall-links:
diff --git a/Build/source/texk/tex4htk/ChangeLog b/Build/source/texk/tex4htk/ChangeLog
index dd26aca9c8b..cf6cc702bbc 100644
--- a/Build/source/texk/tex4htk/ChangeLog
+++ b/Build/source/texk/tex4htk/ChangeLog
@@ -1,3 +1,7 @@
+2011-09-09 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am: Adapt to script_links.am using relpath.
+
2011-03-31 Peter Breitenlohner <peb@mppmu.mpg.de>
Rename ht{,context,latex,mex,tex,texi,xelatex,xetex} => ht*.sh.
diff --git a/Build/source/texk/tex4htk/Makefile.am b/Build/source/texk/tex4htk/Makefile.am
index 696d5391e65..f5b4589f5a0 100644
--- a/Build/source/texk/tex4htk/Makefile.am
+++ b/Build/source/texk/tex4htk/Makefile.am
@@ -1,10 +1,17 @@
## Makefile.am for the TeX Live subdirectory texk/tex4htk/
##
-## Copyright (C) 2009 - 2011 Peter Breitenlohner <tex-live@tug.org>
+## Copyright (C) 2009-2011 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.
##
ACLOCAL_AMFLAGS = -I ../../m4
+## We distribute the whole java tree.
+EXTRA_DIST = java
+
+# in case of an SVN repository
+dist-hook:
+ rm -rf `find $(distdir) -name .svn`
+
INCLUDES = $(KPATHSEA_INCLUDES)
AM_CPPFLAGS = -DANSI -DKPATHSEA
AM_CFLAGS = $(WARNING_CFLAGS)
@@ -43,7 +50,7 @@ CLEANFILES = $(nodist_bin_SCRIPTS)
## Not used
##
-EXTRA_DIST = \
+EXTRA_DIST += \
dbcontext \
dblatex \
dbmcontext \
@@ -66,7 +73,6 @@ EXTRA_DIST = \
estexi \
esxelatex \
esxetex \
- java \
jh1context \
jh1latex \
jh1mex \
@@ -157,7 +163,3 @@ EXTRA_DIST = \
xhxetex \
xv4ht.java
-# in case of an SVN repository
-dist-hook:
- rm -rf `find $(distdir) -name .svn`
-
diff --git a/Build/source/texk/tex4htk/Makefile.in b/Build/source/texk/tex4htk/Makefile.in
index ef5c9ac5868..4872a2666c3 100644
--- a/Build/source/texk/tex4htk/Makefile.in
+++ b/Build/source/texk/tex4htk/Makefile.in
@@ -256,6 +256,23 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I ../../m4
+EXTRA_DIST = java ../../build-aux/relpath dbcontext dblatex dbmcontext \
+ dbmex dbmlatex dbmmex dbmtex dbmtexi dbmxelatex dbmxetex dbtex \
+ dbtexi dbxelatex dbxetex demo.tex escontext eslatex esmex \
+ estex estexi esxelatex esxetex jh1context jh1latex jh1mex \
+ jh1tex jh1texi jh1xelatex jh1xetex jhcontext jhlatex jhmex \
+ jhtex jhtexi jhxelatex jhxetex jmcontext jmlatex jmmex jmtex \
+ jmtexi jmxelatex jmxetex jscontext jslatex jsmex jstex jstexi \
+ jsxelatex jsxetex mzcontext mzlatex mzmex mztex mztexi \
+ mzxelatex mzxetex oocontext oolatex oomex ootex ootexi \
+ ooxelatex ooxetex teicontext teilatex teimcontext teimex \
+ teimlatex teimmex teimtex teimtexi teimxelatex teimxetex \
+ teitex teitexi teixelatex teixetex test.tex test1.tex \
+ testa.tex testb.tex uxhcontext uxhlatex uxhmex uxhtex uxhtexi \
+ uxhxelatex uxhxetex wcontext wlatex wmex wtex wtexi wxelatex \
+ wxetex xhcontext xhlatex xhmcontext xhmex xhmlatex xhmmex \
+ xhmtex xhmtexi xhmxelatex xhmxetex xhtex xhtexi xhxelatex \
+ xhxetex xv4ht.java
INCLUDES = $(KPATHSEA_INCLUDES)
AM_CPPFLAGS = -DANSI -DKPATHSEA
AM_CFLAGS = $(WARNING_CFLAGS)
@@ -273,120 +290,6 @@ texmfdir = ${prefix}/$(scriptsdir)
dist_texmf_SCRIPTS = $(perl_scripts:=.pl) $(shell_scripts:=.sh)
@WIN32_TRUE@dist_bin_SCRIPTS = $(shell_scripts:=.bat)
CLEANFILES = $(nodist_bin_SCRIPTS)
-EXTRA_DIST = \
- dbcontext \
- dblatex \
- dbmcontext \
- dbmex \
- dbmlatex \
- dbmmex \
- dbmtex \
- dbmtexi \
- dbmxelatex \
- dbmxetex \
- dbtex \
- dbtexi \
- dbxelatex \
- dbxetex \
- demo.tex \
- escontext \
- eslatex \
- esmex \
- estex \
- estexi \
- esxelatex \
- esxetex \
- java \
- jh1context \
- jh1latex \
- jh1mex \
- jh1tex \
- jh1texi \
- jh1xelatex \
- jh1xetex \
- jhcontext \
- jhlatex \
- jhmex \
- jhtex \
- jhtexi \
- jhxelatex \
- jhxetex \
- jmcontext \
- jmlatex \
- jmmex \
- jmtex \
- jmtexi \
- jmxelatex \
- jmxetex \
- jscontext \
- jslatex \
- jsmex \
- jstex \
- jstexi \
- jsxelatex \
- jsxetex \
- mzcontext \
- mzlatex \
- mzmex \
- mztex \
- mztexi \
- mzxelatex \
- mzxetex \
- oocontext \
- oolatex \
- oomex \
- ootex \
- ootexi \
- ooxelatex \
- ooxetex \
- teicontext \
- teilatex \
- teimcontext \
- teimex \
- teimlatex \
- teimmex \
- teimtex \
- teimtexi \
- teimxelatex \
- teimxetex \
- teitex \
- teitexi \
- teixelatex \
- teixetex \
- test.tex \
- test1.tex \
- testa.tex \
- testb.tex \
- uxhcontext \
- uxhlatex \
- uxhmex \
- uxhtex \
- uxhtexi \
- uxhxelatex \
- uxhxetex \
- wcontext \
- wlatex \
- wmex \
- wtex \
- wtexi \
- wxelatex \
- wxetex \
- xhcontext \
- xhlatex \
- xhmcontext \
- xhmex \
- xhmlatex \
- xhmmex \
- xhmtex \
- xhmtexi \
- xhmxelatex \
- xhmxetex \
- xhtex \
- xhtexi \
- xhxelatex \
- xhxetex \
- xv4ht.java
-
all: c-auto.h
$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -970,13 +873,15 @@ uninstall-am: uninstall-binPROGRAMS uninstall-dist_binSCRIPTS \
uninstall-hook uninstall-nodist_binSCRIPTS
+# in case of an SVN repository
+dist-hook:
+ rm -rf `find $(distdir) -name .svn`
+
$(t4ht_OBJECTS) $(tex4ht_OBJECTS): $(KPATHSEA_DEPEND)
@KPATHSEA_RULE@
-
-#
.PHONY: install-lua-links install-perl-links install-shell-links \
- install-links make-links uninstall-links
+ install-links uninstall-links
@WIN32_TRUE@@WIN32_WRAP_TRUE@$(wrappers): $(runscript)
@WIN32_TRUE@@WIN32_WRAP_TRUE@ $(LN_S) $(runscript) $@
@@ -989,21 +894,18 @@ install-perl-links:
install-shell-links:
@WIN32_FALSE@ $(MAKE) $(AM_MAKEFLAGS) TYPE=shell EXT=sh install-links
-# We support both multiplatform and non-multiplatform builds.
+# We support native builds, multiplatform or not, as well as distro builds.
install-links:
- case "$(bindir)" in \
- */bin) $(MAKE) $(AM_MAKEFLAGS) REL=.. TYPE=$(TYPE) EXT=$(EXT) make-links;; \
- */bin/*) $(MAKE) $(AM_MAKEFLAGS) REL=../.. TYPE=$(TYPE) EXT=$(EXT) make-links;; \
- *) echo "strange directory '$(bindir)' for linked $(TYPE) scripts" >&2; \
- exit 1;; \
- esac
-
-make-links:
- @cd $(DESTDIR)$(bindir) && \
+ @REL=`$(SHELL) $(srcdir)/../../build-aux/relpath '$(DESTDIR)' '$(bindir)' '$(prefix)'`; \
+ if test -z "$$REL"; then \
+ echo 'unable to compute relative path for linked $(TYPE) scripts' >&2; \
+ exit 1; \
+ fi; \
+ cd $(DESTDIR)$(bindir) && \
for f in $($(TYPE)_scripts); do \
rm -f $$f; \
- echo "creating link '$$f' -> '$(REL)/$(scriptsdir)/$$f.$(EXT)'"; \
- $(LN_S) $(REL)/$(scriptsdir)/$$f.$(EXT) $$f || exit 1; \
+ echo "creating link '$$f' -> '$$REL/$(scriptsdir)/$$f.$(EXT)'"; \
+ $(LN_S) $$REL/$(scriptsdir)/$$f.$(EXT) $$f || exit 1; \
done
uninstall-links:
@@ -1015,10 +917,6 @@ uninstall-links:
install-data-hook: install-perl-links install-shell-links
uninstall-hook: uninstall-links
-# in case of an SVN repository
-dist-hook:
- rm -rf `find $(distdir) -name .svn`
-
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/Build/source/texk/texlive/linked_scripts/ChangeLog b/Build/source/texk/texlive/linked_scripts/ChangeLog
index 00bdcba83d8..bc372b75494 100644
--- a/Build/source/texk/texlive/linked_scripts/ChangeLog
+++ b/Build/source/texk/texlive/linked_scripts/ChangeLog
@@ -1,3 +1,12 @@
+2011-09-14 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (scripts.tmp): List each file on a separate line.
+
+2011-09-09 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am (install-data-hook): Use new shell script relpath
+ to compute relative path for linked scripts, mainly for distros.
+
2011-07-29 Karl Berry <karl@tug.org>
* Makefile.am (texmf_dist_other_scripts): add urlbst.
diff --git a/Build/source/texk/texlive/linked_scripts/Makefile.am b/Build/source/texk/texlive/linked_scripts/Makefile.am
index 63dfb373051..71614cc5c2b 100644
--- a/Build/source/texk/texlive/linked_scripts/Makefile.am
+++ b/Build/source/texk/texlive/linked_scripts/Makefile.am
@@ -11,8 +11,12 @@ if MAINTAINER_MODE
all-local: scripts.tmp
scripts.tmp: Makefile
echo "Create $@"
- @echo "texmf_scripts='$(nobase_dist_texmf_scripts_SCRIPTS)'" >$@
- @echo "texmf_dist_scripts='$(nobase_dist_texmf_dist_scripts_SCRIPTS)'" >>$@
+ @echo "texmf_scripts='" >$@
+ @for f in $(nobase_dist_texmf_scripts_SCRIPTS); do echo "$$f"; done >>$@
+ @echo "'" >>$@
+ @echo "texmf_dist_scripts='" >>$@
+ @for f in $(nobase_dist_texmf_dist_scripts_SCRIPTS); do echo "$$f"; done >>$@
+ @echo "'" >>$@
cmp -s $(srcdir)/scripts.lst $@ || cp -f $@ $(srcdir)/scripts.lst
else !MAINTAINER_MODE
all-local:
@@ -152,8 +156,10 @@ bin_links = \
# written the auto-update to ensure linked_scripts is actually up to date
# with the masters in Master/texmf*/scripts, but one day.
#
-# We support both multiplatform and non-multiplatform builds.
+# We support native builds, multiplatform or not, as well as distro builds.
#
+EXTRA_DIST += ../../../build-aux/relpath
+relpath = $(SHELL) $(top_srcdir)/../../build-aux/relpath
runscript = $(top_srcdir)/w32_wrapper/runscript.exe
install-data-hook:
if WIN32
@@ -168,33 +174,28 @@ if WIN32
$(INSTALL_SCRIPT) $(runscript) $(DESTDIR)$(bindir)/$$link.exe || exit 1; \
done
else !WIN32
- case "$(bindir)" in \
- */bin) $(MAKE) $(AM_MAKEFLAGS) REL=.. install-links;; \
- */bin/*) $(MAKE) $(AM_MAKEFLAGS) REL=../.. install-links;; \
- *) echo "strange directory '$(bindir)' for linked scripts" >&2; \
- exit 1;; \
- esac
-endif !WIN32
-
## Name the link as the basename, removing any extension,
## except for listings-ext.sh, which is documented as that name.
## Downcase for the sake of TeXcount.pl -> texcount.
-.PHONY: install-links
-install-links:
- @cd $(DESTDIR)$(bindir) && \
+ @REL=`$(relpath) '$(DESTDIR)' '$(bindir)' '$(prefix)'`; \
+ if test -z "$$REL"; then \
+ echo 'unable to compute relative path for linked scripts' >&2; \
+ exit 1; \
+ fi; \
+ cd $(DESTDIR)$(bindir) && \
for s in $(nobase_dist_texmf_scripts_SCRIPTS); do \
target=`basename $$s | sed 's,\.[^/]*$$,,' | tr '[A-Z]' '[a-z]'`; \
rm -f $$target; \
- echo "creating link '$$target' -> '$(REL)/texmf/scripts/$$s'"; \
- $(LN_S) $(REL)/texmf/scripts/$$s $$target || exit 1; \
+ echo "creating link '$$target' -> '$$REL/texmf/scripts/$$s'"; \
+ $(LN_S) $$REL/texmf/scripts/$$s $$target || exit 1; \
done && \
for s in $(nobase_dist_texmf_dist_scripts_SCRIPTS); do \
target=`basename $$s | tr '[A-Z]' '[a-z]'`; \
echo "$$s" | grep listings-ext.sh >/dev/null \
|| target=`echo $$target | sed 's,\.[^/]*$$,,'`; \
rm -f $$target; \
- echo "creating link '$$target' -> '$(REL)/texmf-dist/scripts/$$s'"; \
- $(LN_S) $(REL)/texmf-dist/scripts/$$s $$target || exit 1; \
+ echo "creating link '$$target' -> '$$REL/texmf-dist/scripts/$$s'"; \
+ $(LN_S) $$REL/texmf-dist/scripts/$$s $$target || exit 1; \
done && \
for s in $(bin_links); do \
link=`echo $$s | sed 's,.*:,,'`; \
@@ -204,11 +205,15 @@ install-links:
$(LN_S) $$file $$link || exit 1; \
done && \
rm -f man && \
- if test -d $(REL)/texmf/doc/man; then \
- echo "creating link 'man' -> '$(REL)/texmf/doc/man'" && \
- (ln -s $(REL)/texmf/doc/man man || :); \
+ if test -d $$REL/texmf/doc/man; then \
+ echo "creating link 'man' -> '$$REL/texmf/doc/man'" && \
+ (ln -s $$REL/texmf/doc/man man || :); \
else :; fi
## man dir link for those mans which can use it.
+endif !WIN32
+
+.PHONY: install-links
+install-links:
## For WIN32 (MinGW or native) we have wrapper binaries with .exe,
## for Cygwin and Unix we have symlinks without .exe.
diff --git a/Build/source/texk/texlive/linked_scripts/Makefile.in b/Build/source/texk/texlive/linked_scripts/Makefile.in
index be1ae9f0b6d..0f94140cfa3 100644
--- a/Build/source/texk/texlive/linked_scripts/Makefile.in
+++ b/Build/source/texk/texlive/linked_scripts/Makefile.in
@@ -159,7 +159,28 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
DISTCLEANFILES = scripts.tmp
-EXTRA_DIST = scripts.lst
+
+# The idea is to install the scripts themselves in texmf*/scripts, and
+# have bin/arch/foo be a symlink to, say,
+# ../../texmf-dist/scripts/foo/foo.pl. That way we save a bit of disk
+# space, but much more importantly omit duplication, and most
+# importantly of all make it possible to invoke the same Perl script on
+# Windows (see ../w32_wrapper).
+#
+# The installation into texmf*/scripts is ideally done with ctan2tl.
+# The copy of the wrapper for Windows is done by hand, but (todo)
+# could/should also be done by ctan2tl. The check-wrapper-consistency
+# script at least checks after the fact for problems.
+#
+# We also keep a copy of all the scripts here and install into the runtime.
+# This is purely for other distro builders, so symlinks are not dangling in
+# the inst/bin dir (it is meaningless in native TL). We have not yet
+# written the auto-update to ensure linked_scripts is actually up to date
+# with the masters in Master/texmf*/scripts, but one day.
+#
+# We support native builds, multiplatform or not, as well as distro builds.
+#
+EXTRA_DIST = scripts.lst ../../../build-aux/relpath
bin_SCRIPTS =
# Copies of these scripts exist here for the sake of avoiding
@@ -274,27 +295,7 @@ bin_links = \
epstopdf:repstopdf \
pdfcrop:rpdfcrop
-
-# The idea is to install the scripts themselves in texmf*/scripts, and
-# have bin/arch/foo be a symlink to, say,
-# ../../texmf-dist/scripts/foo/foo.pl. That way we save a bit of disk
-# space, but much more importantly omit duplication, and most
-# importantly of all make it possible to invoke the same Perl script on
-# Windows (see ../w32_wrapper).
-#
-# The installation into texmf*/scripts is ideally done with ctan2tl.
-# The copy of the wrapper for Windows is done by hand, but (todo)
-# could/should also be done by ctan2tl. The check-wrapper-consistency
-# script at least checks after the fact for problems.
-#
-# We also keep a copy of all the scripts here and install into the runtime.
-# This is purely for other distro builders, so symlinks are not dangling in
-# the inst/bin dir (it is meaningless in native TL). We have not yet
-# written the auto-update to ensure linked_scripts is actually up to date
-# with the masters in Master/texmf*/scripts, but one day.
-#
-# We support both multiplatform and non-multiplatform builds.
-#
+relpath = $(SHELL) $(top_srcdir)/../../build-aux/relpath
runscript = $(top_srcdir)/w32_wrapper/runscript.exe
@WIN32_TRUE@WINEXT = $(EXEEXT)
all: all-am
@@ -608,8 +609,12 @@ uninstall-am: uninstall-binSCRIPTS \
@MAINTAINER_MODE_TRUE@all-local: scripts.tmp
@MAINTAINER_MODE_TRUE@scripts.tmp: Makefile
@MAINTAINER_MODE_TRUE@ echo "Create $@"
-@MAINTAINER_MODE_TRUE@ @echo "texmf_scripts='$(nobase_dist_texmf_scripts_SCRIPTS)'" >$@
-@MAINTAINER_MODE_TRUE@ @echo "texmf_dist_scripts='$(nobase_dist_texmf_dist_scripts_SCRIPTS)'" >>$@
+@MAINTAINER_MODE_TRUE@ @echo "texmf_scripts='" >$@
+@MAINTAINER_MODE_TRUE@ @for f in $(nobase_dist_texmf_scripts_SCRIPTS); do echo "$$f"; done >>$@
+@MAINTAINER_MODE_TRUE@ @echo "'" >>$@
+@MAINTAINER_MODE_TRUE@ @echo "texmf_dist_scripts='" >>$@
+@MAINTAINER_MODE_TRUE@ @for f in $(nobase_dist_texmf_dist_scripts_SCRIPTS); do echo "$$f"; done >>$@
+@MAINTAINER_MODE_TRUE@ @echo "'" >>$@
@MAINTAINER_MODE_TRUE@ cmp -s $(srcdir)/scripts.lst $@ || cp -f $@ $(srcdir)/scripts.lst
@MAINTAINER_MODE_FALSE@all-local:
install-data-hook:
@@ -623,42 +628,41 @@ install-data-hook:
@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@ case "$(bindir)" in \
-@WIN32_FALSE@ */bin) $(MAKE) $(AM_MAKEFLAGS) REL=.. install-links;; \
-@WIN32_FALSE@ */bin/*) $(MAKE) $(AM_MAKEFLAGS) REL=../.. install-links;; \
-@WIN32_FALSE@ *) echo "strange directory '$(bindir)' for linked scripts" >&2; \
-@WIN32_FALSE@ exit 1;; \
-@WIN32_FALSE@ esac
+@WIN32_FALSE@ @REL=`$(relpath) '$(DESTDIR)' '$(bindir)' '$(prefix)'`; \
+@WIN32_FALSE@ if test -z "$$REL"; then \
+@WIN32_FALSE@ echo 'unable to compute relative path for linked scripts' >&2; \
+@WIN32_FALSE@ exit 1; \
+@WIN32_FALSE@ fi; \
+@WIN32_FALSE@ cd $(DESTDIR)$(bindir) && \
+@WIN32_FALSE@ for s in $(nobase_dist_texmf_scripts_SCRIPTS); do \
+@WIN32_FALSE@ target=`basename $$s | sed 's,\.[^/]*$$,,' | tr '[A-Z]' '[a-z]'`; \
+@WIN32_FALSE@ rm -f $$target; \
+@WIN32_FALSE@ echo "creating link '$$target' -> '$$REL/texmf/scripts/$$s'"; \
+@WIN32_FALSE@ $(LN_S) $$REL/texmf/scripts/$$s $$target || exit 1; \
+@WIN32_FALSE@ done && \
+@WIN32_FALSE@ for s in $(nobase_dist_texmf_dist_scripts_SCRIPTS); do \
+@WIN32_FALSE@ target=`basename $$s | tr '[A-Z]' '[a-z]'`; \
+@WIN32_FALSE@ echo "$$s" | grep listings-ext.sh >/dev/null \
+@WIN32_FALSE@ || target=`echo $$target | sed 's,\.[^/]*$$,,'`; \
+@WIN32_FALSE@ rm -f $$target; \
+@WIN32_FALSE@ echo "creating link '$$target' -> '$$REL/texmf-dist/scripts/$$s'"; \
+@WIN32_FALSE@ $(LN_S) $$REL/texmf-dist/scripts/$$s $$target || exit 1; \
+@WIN32_FALSE@ done && \
+@WIN32_FALSE@ for s in $(bin_links); do \
+@WIN32_FALSE@ link=`echo $$s | sed 's,.*:,,'`; \
+@WIN32_FALSE@ file=`echo $$s | sed 's,:.*,,'`; \
+@WIN32_FALSE@ rm -f $$link; \
+@WIN32_FALSE@ echo "creating link '$$link' -> '$$file'"; \
+@WIN32_FALSE@ $(LN_S) $$file $$link || exit 1; \
+@WIN32_FALSE@ done && \
+@WIN32_FALSE@ rm -f man && \
+@WIN32_FALSE@ if test -d $$REL/texmf/doc/man; then \
+@WIN32_FALSE@ echo "creating link 'man' -> '$$REL/texmf/doc/man'" && \
+@WIN32_FALSE@ (ln -s $$REL/texmf/doc/man man || :); \
+@WIN32_FALSE@ else :; fi
.PHONY: install-links
install-links:
- @cd $(DESTDIR)$(bindir) && \
- for s in $(nobase_dist_texmf_scripts_SCRIPTS); do \
- target=`basename $$s | sed 's,\.[^/]*$$,,' | tr '[A-Z]' '[a-z]'`; \
- rm -f $$target; \
- echo "creating link '$$target' -> '$(REL)/texmf/scripts/$$s'"; \
- $(LN_S) $(REL)/texmf/scripts/$$s $$target || exit 1; \
- done && \
- for s in $(nobase_dist_texmf_dist_scripts_SCRIPTS); do \
- target=`basename $$s | tr '[A-Z]' '[a-z]'`; \
- echo "$$s" | grep listings-ext.sh >/dev/null \
- || target=`echo $$target | sed 's,\.[^/]*$$,,'`; \
- rm -f $$target; \
- echo "creating link '$$target' -> '$(REL)/texmf-dist/scripts/$$s'"; \
- $(LN_S) $(REL)/texmf-dist/scripts/$$s $$target || exit 1; \
- done && \
- for s in $(bin_links); do \
- link=`echo $$s | sed 's,.*:,,'`; \
- file=`echo $$s | sed 's,:.*,,'`; \
- rm -f $$link; \
- echo "creating link '$$link' -> '$$file'"; \
- $(LN_S) $$file $$link || exit 1; \
- done && \
- rm -f man && \
- if test -d $(REL)/texmf/doc/man; then \
- echo "creating link 'man' -> '$(REL)/texmf/doc/man'" && \
- (ln -s $(REL)/texmf/doc/man man || :); \
- else :; fi
uninstall-hook:
@for s in $(nobase_dist_texmf_scripts_SCRIPTS) $(nobase_dist_texmf_dist_scripts_SCRIPTS); do \
diff --git a/Build/source/texk/texlive/linked_scripts/scripts.lst b/Build/source/texk/texlive/linked_scripts/scripts.lst
index 5c57c4809ac..48bf20324a1 100644
--- a/Build/source/texk/texlive/linked_scripts/scripts.lst
+++ b/Build/source/texk/texlive/linked_scripts/scripts.lst
@@ -1,2 +1,88 @@
-texmf_scripts='simpdftex/simpdftex a2ping/a2ping.pl tetex/e2pall.pl tetex/texdoctk.pl texdoc/texdoc.tlu texlive/rungs.tlu texlive/tlmgr.pl'
-texmf_dist_scripts='bibexport/bibexport.sh installfont/installfont-tl listings-ext/listings-ext.sh pdfjam/pdf180 pdfjam/pdf270 pdfjam/pdf90 pdfjam/pdfbook pdfjam/pdfflip pdfjam/pdfjam pdfjam/pdfjam-pocketmod pdfjam/pdfjam-slides3up pdfjam/pdfjam-slides6up pdfjam/pdfjoin pdfjam/pdfnup pdfjam/pdfpun pst-pdf/ps4pdf accfonts/mkt1font accfonts/vpl2ovp accfonts/vpl2vpl authorindex/authorindex bundledoc/arlatex bundledoc/bundledoc cachepic/cachepic.tlu context/perl/mptopdf.pl de-macro/de-macro dviasm/dviasm.py ebong/ebong.py epspdf/epspdf.rb epspdf/epspdftk.tcl epstopdf/epstopdf.pl fig4latex/fig4latex findhyph/findhyph fontools/afm2afm fontools/autoinst fontools/cmap2enc fontools/font2afm fontools/ot2kpx fontools/pfm2kpx fontools/showglyphs fragmaster/fragmaster.pl glossaries/makeglossaries latex2man/latex2man latexdiff/latexdiff.pl latexdiff/latexdiff-vc.pl latexdiff/latexrevise.pl latexmk/latexmk.pl luaotfload/mkluatexfontdb.lua match_parens/match_parens mathspic/mathspic.pl mf2pt1/mf2pt1.pl mkjobtexmf/mkjobtexmf.pl mkgrkindex/mkgrkindex musixtex/musixflx.lua musixtex/musixtex.lua oberdiek/pdfatfi.pl pax/pdfannotextractor.pl pdfcrop/pdfcrop.pl perltex/perltex.pl pkfix/pkfix.pl pkfix-helper/pkfix-helper pst2pdf/pst2pdf purifyeps/purifyeps splitindex/perl/splitindex.pl sty2dtx/sty2dtx.pl svn-multi/svn-multi.pl texcount/texcount.pl texdef/texdef.pl texdiff/texdiff texdirflatten/texdirflatten texloganalyser/texloganalyser thumbpdf/thumbpdf.pl ulqda/ulqda.pl urlbst/urlbst vpe/vpe.pl'
+texmf_scripts='
+simpdftex/simpdftex
+a2ping/a2ping.pl
+tetex/e2pall.pl
+tetex/texdoctk.pl
+texdoc/texdoc.tlu
+texlive/rungs.tlu
+texlive/tlmgr.pl
+'
+texmf_dist_scripts='
+bibexport/bibexport.sh
+installfont/installfont-tl
+listings-ext/listings-ext.sh
+pdfjam/pdf180
+pdfjam/pdf270
+pdfjam/pdf90
+pdfjam/pdfbook
+pdfjam/pdfflip
+pdfjam/pdfjam
+pdfjam/pdfjam-pocketmod
+pdfjam/pdfjam-slides3up
+pdfjam/pdfjam-slides6up
+pdfjam/pdfjoin
+pdfjam/pdfnup
+pdfjam/pdfpun
+pst-pdf/ps4pdf
+accfonts/mkt1font
+accfonts/vpl2ovp
+accfonts/vpl2vpl
+authorindex/authorindex
+bundledoc/arlatex
+bundledoc/bundledoc
+cachepic/cachepic.tlu
+context/perl/mptopdf.pl
+ctanify/ctanify
+ctanupload/ctanupload.pl
+de-macro/de-macro
+dviasm/dviasm.py
+ebong/ebong.py
+epspdf/epspdf.rb
+epspdf/epspdftk.tcl
+epstopdf/epstopdf.pl
+fig4latex/fig4latex
+findhyph/findhyph
+fontools/afm2afm
+fontools/autoinst
+fontools/cmap2enc
+fontools/font2afm
+fontools/ot2kpx
+fontools/pfm2kpx
+fontools/showglyphs
+fragmaster/fragmaster.pl
+glossaries/makeglossaries
+latex2man/latex2man
+latexdiff/latexdiff.pl
+latexdiff/latexdiff-vc.pl
+latexdiff/latexrevise.pl
+latexmk/latexmk.pl
+luaotfload/mkluatexfontdb.lua
+match_parens/match_parens
+mathspic/mathspic.pl
+mf2pt1/mf2pt1.pl
+mkjobtexmf/mkjobtexmf.pl
+mkgrkindex/mkgrkindex
+musixtex/musixflx.lua
+musixtex/musixtex.lua
+oberdiek/pdfatfi.pl
+pax/pdfannotextractor.pl
+pdfcrop/pdfcrop.pl
+perltex/perltex.pl
+pkfix/pkfix.pl
+pkfix-helper/pkfix-helper
+pst2pdf/pst2pdf
+purifyeps/purifyeps
+splitindex/perl/splitindex.pl
+sty2dtx/sty2dtx.pl
+svn-multi/svn-multi.pl
+texcount/texcount.pl
+texdef/texdef.pl
+texdiff/texdiff
+texdirflatten/texdirflatten
+texliveonfly/texliveonfly.py
+texloganalyser/texloganalyser
+thumbpdf/thumbpdf.pl
+ulqda/ulqda.pl
+urlbst/urlbst
+vpe/vpe.pl
+'
diff --git a/Build/source/utils/chktex/Makefile.in b/Build/source/utils/chktex/Makefile.in
index c391958fdd1..bcf44c0268f 100644
--- a/Build/source/utils/chktex/Makefile.in
+++ b/Build/source/utils/chktex/Makefile.in
@@ -223,8 +223,8 @@ top_srcdir = @top_srcdir@
#
#************************************************************************
ACLOCAL_AMFLAGS = -I ../../m4
-EXTRA_DIST = $(CHKTEX_TREE) $(CHKTEX_TREE)-PATCHES ChkTeX.tex \
- chktex.test
+EXTRA_DIST = $(CHKTEX_TREE) $(CHKTEX_TREE)-PATCHES \
+ ../../build-aux/relpath ChkTeX.tex chktex.test
AM_CPPFLAGS = -DNO_KPSE_DLL
AM_CFLAGS = $(WARNING_CFLAGS)
chktex_SOURCES = \
@@ -1103,10 +1103,8 @@ uninstall-man: uninstall-man1
# in case of an SVN repository
dist-hook:
rm -rf `find $(distdir) -name .svn`
-
-#
.PHONY: install-lua-links install-perl-links install-shell-links \
- install-links make-links uninstall-links
+ install-links uninstall-links
@WIN32_TRUE@@WIN32_WRAP_TRUE@$(wrappers): $(runscript)
@WIN32_TRUE@@WIN32_WRAP_TRUE@ $(LN_S) $(runscript) $@
@@ -1119,21 +1117,18 @@ install-perl-links:
install-shell-links:
@WIN32_FALSE@ $(MAKE) $(AM_MAKEFLAGS) TYPE=shell EXT=sh install-links
-# We support both multiplatform and non-multiplatform builds.
+# We support native builds, multiplatform or not, as well as distro builds.
install-links:
- case "$(bindir)" in \
- */bin) $(MAKE) $(AM_MAKEFLAGS) REL=.. TYPE=$(TYPE) EXT=$(EXT) make-links;; \
- */bin/*) $(MAKE) $(AM_MAKEFLAGS) REL=../.. TYPE=$(TYPE) EXT=$(EXT) make-links;; \
- *) echo "strange directory '$(bindir)' for linked $(TYPE) scripts" >&2; \
- exit 1;; \
- esac
-
-make-links:
- @cd $(DESTDIR)$(bindir) && \
+ @REL=`$(SHELL) $(srcdir)/../../build-aux/relpath '$(DESTDIR)' '$(bindir)' '$(prefix)'`; \
+ if test -z "$$REL"; then \
+ echo 'unable to compute relative path for linked $(TYPE) scripts' >&2; \
+ exit 1; \
+ fi; \
+ cd $(DESTDIR)$(bindir) && \
for f in $($(TYPE)_scripts); do \
rm -f $$f; \
- echo "creating link '$$f' -> '$(REL)/$(scriptsdir)/$$f.$(EXT)'"; \
- $(LN_S) $(REL)/$(scriptsdir)/$$f.$(EXT) $$f || exit 1; \
+ echo "creating link '$$f' -> '$$REL/$(scriptsdir)/$$f.$(EXT)'"; \
+ $(LN_S) $$REL/$(scriptsdir)/$$f.$(EXT) $$f || exit 1; \
done
uninstall-links:
diff --git a/Build/source/utils/xindy/Makefile.in b/Build/source/utils/xindy/Makefile.in
index f57bd825646..493b454329a 100644
--- a/Build/source/utils/xindy/Makefile.in
+++ b/Build/source/utils/xindy/Makefile.in
@@ -248,7 +248,8 @@ EXTRA_DIST = README-clisp $(XINDY_TREE)-PATCHES $(XINDY_TREE)/AUTHORS \
$(XINDY_TREE)/configure.ac \
$(XINDY_TREE)/make-rules/alphabets/Makefile.am.not-yet \
$(XINDY_TREE)/make-rules/alphabets/lang.defs \
- $(XINDY_TREE)/make-rules/alphabets/mk-lang.sh
+ $(XINDY_TREE)/make-rules/alphabets/mk-lang.sh \
+ ../../build-aux/relpath
SUBDIRS = . $(XINDY_TREE)
DIST_SUBDIRS = $(SUBDIRS)
perl_scripts = texindy xindy
@@ -818,10 +819,8 @@ all-local: config.force
config.force:
echo timestamp >config.force
$(SHELL) ./config.status --recheck
-
-#
.PHONY: install-lua-links install-perl-links install-shell-links \
- install-links make-links uninstall-links
+ install-links uninstall-links
@WIN32_TRUE@@WIN32_WRAP_TRUE@$(wrappers): $(runscript)
@WIN32_TRUE@@WIN32_WRAP_TRUE@ $(LN_S) $(runscript) $@
@@ -834,21 +833,18 @@ install-perl-links:
install-shell-links:
@WIN32_FALSE@ $(MAKE) $(AM_MAKEFLAGS) TYPE=shell EXT=sh install-links
-# We support both multiplatform and non-multiplatform builds.
+# We support native builds, multiplatform or not, as well as distro builds.
install-links:
- case "$(bindir)" in \
- */bin) $(MAKE) $(AM_MAKEFLAGS) REL=.. TYPE=$(TYPE) EXT=$(EXT) make-links;; \
- */bin/*) $(MAKE) $(AM_MAKEFLAGS) REL=../.. TYPE=$(TYPE) EXT=$(EXT) make-links;; \
- *) echo "strange directory '$(bindir)' for linked $(TYPE) scripts" >&2; \
- exit 1;; \
- esac
-
-make-links:
- @cd $(DESTDIR)$(bindir) && \
+ @REL=`$(SHELL) $(srcdir)/../../build-aux/relpath '$(DESTDIR)' '$(bindir)' '$(prefix)'`; \
+ if test -z "$$REL"; then \
+ echo 'unable to compute relative path for linked $(TYPE) scripts' >&2; \
+ exit 1; \
+ fi; \
+ cd $(DESTDIR)$(bindir) && \
for f in $($(TYPE)_scripts); do \
rm -f $$f; \
- echo "creating link '$$f' -> '$(REL)/$(scriptsdir)/$$f.$(EXT)'"; \
- $(LN_S) $(REL)/$(scriptsdir)/$$f.$(EXT) $$f || exit 1; \
+ echo "creating link '$$f' -> '$$REL/$(scriptsdir)/$$f.$(EXT)'"; \
+ $(LN_S) $$REL/$(scriptsdir)/$$f.$(EXT) $$f || exit 1; \
done
uninstall-links: