summaryrefslogtreecommitdiff
path: root/Build/source/am/bin_links.am
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-02-25 19:22:25 +0000
committerKarl Berry <karl@freefriends.org>2021-02-25 19:22:25 +0000
commitad547a6b5986815fda458221149728d9d9ab1d87 (patch)
tree16296910eb3eca724371474ea9aea3994dc69614 /Build/source/am/bin_links.am
parent947b43de3dd21d58ccc2ffadefc4441ea1c2a813 (diff)
restore Build,TODO from r57911
git-svn-id: svn://tug.org/texlive/trunk@57915 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/am/bin_links.am')
-rw-r--r--Build/source/am/bin_links.am39
1 files changed, 39 insertions, 0 deletions
diff --git a/Build/source/am/bin_links.am b/Build/source/am/bin_links.am
new file mode 100644
index 00000000000..2ff85d0cbe1
--- /dev/null
+++ b/Build/source/am/bin_links.am
@@ -0,0 +1,39 @@
+## $Id$
+# am/bin_links.am: Makefile fragment for bindir links.
+#
+# Copyright 2017-2020 Karl Berry <tex-live@tug.org>
+# Copyright 2011-2013 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'.
+
+.PHONY: install-bin-links uninstall-bin-links
+
+install-bin-links:
+if !WIN32
+ $(MKDIR_P) $(DESTDIR)$(bindir)
+ @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
+