summaryrefslogtreecommitdiff
path: root/Build/source/utils
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-09-29 12:17:38 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-09-29 12:17:38 +0000
commit307a409e5a3cc8c467bbe5d0e0fe9beacf620adf (patch)
tree77b4d4f00642c3c1c86755e63cd5d2424b058972 /Build/source/utils
parent54b9868277dbd900c93d8b750654b9ed43b51b26 (diff)
somewhat more general way to create symlinks for linked scripts
using build-aux/relpath git-svn-id: svn://tug.org/texlive/trunk@24137 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils')
-rw-r--r--Build/source/utils/chktex/Makefile.in29
-rw-r--r--Build/source/utils/xindy/Makefile.in28
2 files changed, 24 insertions, 33 deletions
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: