summaryrefslogtreecommitdiff
path: root/Build/source/texk/am/script_links.am
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/am/script_links.am')
-rw-r--r--Build/source/texk/am/script_links.am14
1 files changed, 11 insertions, 3 deletions
diff --git a/Build/source/texk/am/script_links.am b/Build/source/texk/am/script_links.am
index b7228de97ad..a0378fb4b64 100644
--- a/Build/source/texk/am/script_links.am
+++ b/Build/source/texk/am/script_links.am
@@ -1,6 +1,6 @@
## texk/am/script_links.am: Makefile fragment for lua/perl/shell script links.
##
-## Copyright (C) 2011, 2012 Peter Breitenlohner <tex-live@tug.org>
+## Copyright (C) 2011-2013 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.
##
## Install/uninstall 'linked scripts' or win32 wrappers:
@@ -59,9 +59,17 @@ EXTRA_DIST += ../../build-aux/relpath
# We support native builds, multiplatform or not, as well as distro builds.
install-links:
- @REL=`$(SHELL) $(srcdir)/../../build-aux/relpath '$(DESTDIR)' '$(bindir)' '$(datarootdir)'`; \
+ @if test -r "$(srcdir)/../../build-aux/relpath"; then \
+ relpath="$(srcdir)/../../build-aux/relpath"; \
+ elif test -r "$(srcdir)/../../../build-aux/relpath"; then \
+ relpath="$(srcdir)/../../../build-aux/relpath"; \
+ else \
+ echo 'script_links.am:install-links: could not find relpath script';\
+ exit 1; \
+ fi; \
+ REL=`$(SHELL) $$relpath '$(DESTDIR)' '$(bindir)' '$(datarootdir)'`; \
if test -z "$$REL"; then \
- echo 'unable to compute relative path for linked $(TYPE) scripts' >&2; \
+ echo 'script_links.am:install_links: unable to compute relative path for linked $(TYPE) scripts' >&2; \
exit 1; \
fi; \
cd $(DESTDIR)$(bindir) && \