summaryrefslogtreecommitdiff
path: root/Build/source/texk/am
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-05-31 09:47:04 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-05-31 09:47:04 +0000
commit15cca88e2666b7aae4e54112a21cb5c9bc312069 (patch)
tree8b31517b2e92f03da2b949831029cd9439ce7cef /Build/source/texk/am
parent18662309a8be07470a0bc6294a1fddf5ffcb8d72 (diff)
Use the Makefile fragment `bin_links.am' to create symlinks within $(bindir)
For cygwin always create links `foo->bar.exe' and not `foo.exe->bar.exe' git-svn-id: svn://tug.org/texlive/trunk@22701 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/am')
-rw-r--r--Build/source/texk/am/bin_links.am36
1 files changed, 36 insertions, 0 deletions
diff --git a/Build/source/texk/am/bin_links.am b/Build/source/texk/am/bin_links.am
new file mode 100644
index 00000000000..da0cf92c88b
--- /dev/null
+++ b/Build/source/texk/am/bin_links.am
@@ -0,0 +1,36 @@
+## texk/am/bin_links.am: Makefile fragment for bindir links.
+##
+## Copyright (C) 2011 Peter Breitenlohner <tex-live@tug.org>
+## You may freely use, modify and/or distribute this file.
+##
+## requires conditional WIN32
+## requires $(bin_links)
+## Symlinks within $(bindir): FILE:LINK indicates LINK->FILE
+## for binaries and scripts use, e.g.,
+## binprog$(EXEEXT):foo
+## script:bar
+## respectively, such that the links created on cygwin are
+## 'foo->binprog.exe' and 'bar->script'.
+## for scripts use,
+.PHONY: install-bin-links uninstall-bin-links
+
+install-bin-links:
+if !WIN32
+ @cd $(DESTDIR)$(bindir) && \
+ 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
+endif !WIN32
+
+uninstall-bin-links:
+if !WIN32
+ @for s in $(bin_links); do \
+ link=`echo $$s | sed 's,.*:,,'`; \
+ rm -f $(DESTDIR)$(bindir)/$$link; \
+ done
+endif !WIN32
+